Prerequisites
| Component | Version | Notes |
|---|---|---|
| PHP | ^8.3 | The application targets PHP 8.3+. |
| Laravel | ^13.0 | Framework. |
| Composer | latest | PHP dependency manager. |
| Node.js | 20+ | Builds the React SPA + Vite assets. |
| PostgreSQL | ≥ 15 | With the pgvector extension. |
| Sanctum | ^4.2 | Ships with the app; powers SPA + token auth. |
SQLite is used only for the automated test suite (the
vector(N) columns
swap to JSON text via the test migrations). Production and development run on
PostgreSQL + pgvector.1. Install dependencies
2. Provision PostgreSQL + pgvector
pgvector must exist in the target database before migrating:.env at it:
3. Choose AI providers
Chat and embeddings are configured separately — Anthropic, for example, has no embeddings endpoint, so you pair it with an embeddings-capable provider.When
AI_PROVIDER=anthropic and AI_EMBEDDINGS_PROVIDER is empty, AskMyDocs
auto-selects the first embeddings-capable provider with a configured key in a
dimension-safety-first order (openai → openrouter → regolo → gemini), so a
deployment never silently corrupts ingest writes with a mismatched dimension.
See AI providers for the full matrix.4. Migrate
- Embedding dimensions
6. Run it
/app for the SPA (chat + admin), or hit the JSON API directly. Create
your first admin user with the role seeder / auth:grant command (see
Admin panel).
Scheduler
Several rotations run on the Laravel scheduler (bootstrap/app.php). Enable the
system cron entry so they fire:
| Time (UTC) | Command | Purpose |
|---|---|---|
| 03:10 | kb:prune-embedding-cache | LRU cache rotation |
| 03:20 | chat-log:prune | chat-log retention |
| 03:30 | kb:prune-deleted | hard-delete expired soft-deletes |
| 03:40 | kb:rebuild-graph | canonical graph rebuild |
--days=N and --project= overrides; 0 disables the corresponding rotation.
Next steps
Quickstart
Ingest and ask your first question.
Configuration reference
Every env knob, grouped by subsystem.