2025-06-24 19:56:56 +00:00
|
|
|
# Getting Started Guide
|
|
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
- Devbox
|
|
|
|
|
- Docker
|
|
|
|
|
- Go 1.24.x (provided by devbox)
|
|
|
|
|
- Task (`task`)
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
## Local Setup
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git clone <repository-url>
|
|
|
|
|
cd query-orchestration.2
|
|
|
|
|
touch .env
|
|
|
|
|
devbox shell
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
## Verify Tooling
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
```bash
|
|
|
|
|
go version
|
2025-06-24 19:56:56 +00:00
|
|
|
docker --version
|
2026-02-19 20:22:59 +00:00
|
|
|
task --version
|
2025-06-24 19:56:56 +00:00
|
|
|
task --list
|
|
|
|
|
```
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
## Common Tasks
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
### Generate and Build
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
```bash
|
2026-02-19 20:22:59 +00:00
|
|
|
task generate
|
|
|
|
|
task build
|
2025-06-24 19:56:56 +00:00
|
|
|
```
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
### Full Test/Validation Suite
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
```bash
|
2026-02-19 20:22:59 +00:00
|
|
|
task fullsuite
|
2025-06-24 19:56:56 +00:00
|
|
|
```
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
### Local Compose Lifecycle
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
```bash
|
|
|
|
|
task compose:up
|
|
|
|
|
task compose:down
|
|
|
|
|
task compose:clean
|
2025-06-24 19:56:56 +00:00
|
|
|
```
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
### Linting
|
|
|
|
|
|
2025-06-24 19:56:56 +00:00
|
|
|
```bash
|
|
|
|
|
task lint
|
2026-02-19 20:22:59 +00:00
|
|
|
```
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
## Useful Focused Tasks
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
```bash
|
|
|
|
|
task openapi:generate
|
|
|
|
|
task db:generate
|
|
|
|
|
task db:lint
|
|
|
|
|
task test:functional
|
|
|
|
|
task test:race
|
2025-06-24 19:56:56 +00:00
|
|
|
```
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
## Key Local Ports
|
|
|
|
|
|
|
|
|
|
- `queryAPI`: `8080`
|
|
|
|
|
- `storeEventRunner`: `8081`
|
|
|
|
|
- `docInitRunner`: `8082`
|
|
|
|
|
- `docSyncRunner`: `8083`
|
|
|
|
|
- `docCleanRunner`: `8084`
|
|
|
|
|
- `clientSyncRunner`: `8089`
|
|
|
|
|
- `prometheus`: `9091`
|
|
|
|
|
- `postgres`: `5432`
|
|
|
|
|
- `localstack`: `4566`
|
|
|
|
|
- `permit_pdp`: `7766`
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
### Deprecated compatibility services (still present in compose in some environments)
|
|
|
|
|
- `docTextRunner`: `8085`
|
|
|
|
|
- `querySyncRunner`: `8087`
|
|
|
|
|
- `queryRunner`: `8088`
|
|
|
|
|
- `queryVersionSyncRunner`: `8090`
|
|
|
|
|
|
|
|
|
|
## Minimal `.env` Example
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
PGUSER=postgres
|
|
|
|
|
PGPASSWORD=password
|
|
|
|
|
PGDATABASE=queryorchestration
|
2026-02-19 20:22:59 +00:00
|
|
|
PGHOST=localhost
|
|
|
|
|
PGPORT=5432
|
|
|
|
|
DB_NOSSL=true
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
AWS_REGION=us-east-1
|
|
|
|
|
AWS_ACCESS_KEY_ID=test
|
|
|
|
|
AWS_SECRET_ACCESS_KEY=test
|
2026-02-19 20:22:59 +00:00
|
|
|
AWS_SESSION_TOKEN=test
|
|
|
|
|
AWS_ENDPOINT_URL=http://localhost:4566
|
|
|
|
|
AWS_S3_USE_PATH_STYLE=true
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
DISABLE_AUTH=true
|
|
|
|
|
LOG_LEVEL=DEBUG
|
2026-02-19 20:22:59 +00:00
|
|
|
BUCKET=<your-bucket-name>
|
2026-05-07 20:56:18 +00:00
|
|
|
|
|
|
|
|
# Chatbot (required+notEmpty for queryAPI to start). See
|
|
|
|
|
# `.env.example` and the Chatbot Guide for the full reference.
|
|
|
|
|
CHATBOT_SERVICE_URL=http://chatbot.local:8000
|
|
|
|
|
CHATBOT_API_KEY=replace_me
|
|
|
|
|
# Optional with defaults:
|
|
|
|
|
# CHATBOT_REQUEST_TIMEOUT_SECONDS=60
|
|
|
|
|
# CHATBOT_MAX_TURN_CHARS=2000
|
|
|
|
|
# CHATBOT_RECENT_TURNS=5
|
2025-06-24 19:56:56 +00:00
|
|
|
```
|
|
|
|
|
|
2026-05-07 20:56:18 +00:00
|
|
|
To enable the chatbot endpoints, set `CHATBOT_SERVICE_URL` and
|
|
|
|
|
`CHATBOT_API_KEY` in your environment; the queryAPI process will fail
|
|
|
|
|
to start without them. See [Chatbot Guide](12-chatbot-guide.md) for
|
|
|
|
|
the full operator reference.
|
|
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
## Troubleshooting
|
2025-06-24 19:56:56 +00:00
|
|
|
|
|
|
|
|
```bash
|
2026-02-19 20:22:59 +00:00
|
|
|
# Validate compose files
|
|
|
|
|
task compose:lint
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
# Check migrations/codegen
|
2025-06-24 19:56:56 +00:00
|
|
|
task db:generate
|
2026-02-19 20:22:59 +00:00
|
|
|
task openapi:generate
|
2025-06-24 19:56:56 +00:00
|
|
|
|
2026-02-19 20:22:59 +00:00
|
|
|
# Recreate local containers/volumes
|
|
|
|
|
task compose:clean
|
|
|
|
|
task compose:up
|
2025-06-24 19:56:56 +00:00
|
|
|
```
|
|
|
|
|
|