Getting Started
Getting started
Run a fresh V03 checkout with versioned migrations and policy-gated seed data.
1. Initialize the source checkout
Source checkouts pin the shared agent core as a Git submodule. Signed buyer artifacts already contain the pinned files.
if [[ -f .gitmodules ]]; then git submodule update --init --recursive; fi
pnpm install --frozen-lockfile
2. Configure local services
Copy .env.example to apps/web/.env.local. Set at least:
DATABASE_URLfor a disposable local Postgres database.NEXT_PUBLIC_SITE_URL=http://localhost:3001.BETTER_AUTH_URL=http://localhost:3001.BETTER_AUTH_SECRETto a random value of at least 32 characters.BUILD_ID=development.
The full AI, browser, Push, R2, Polar, and release variables are needed only when testing those integrations locally.
3. Apply the database contract
V03 uses checked-in migrations. Do not substitute prisma db push.
pnpm --filter @repo/database analyze
pnpm migrate:deploy
pnpm seed
The seed is idempotent. It creates the primary Site, task packages, policies, Demo Sites, normalized assets, and Site-scoped relations. Imported data does not bypass publication gates.
4. Run the application
pnpm --filter web dev
Open http://localhost:3001. Visit /admin to create the first owner if the database has no owner account. Public signup remains disabled.
For task execution, run the worker and scheduler in separate terminals:
pnpm --filter web ops:worker
pnpm --filter web ops:scheduler
Run the browser worker only when testing crawl or screenshot jobs:
pnpm --filter browser-worker dev
5. Verify before editing content
pnpm --filter @aiworkflowpro/agent-core verify
pnpm --filter @repo/database test
pnpm --filter web test
pnpm build
The database tests create disposable fresh and upgrade databases, verify forced row-level security, replay the backfill, and import all normalized assets twice to prove idempotency.
First operator actions
- Confirm the current Site and verified Host in
/admin/sites. - Register only allowlisted credential references in
/admin/settings. - Create scoped API keys; plaintext is displayed once.
- Review imported Links and Dimensions before publication.
- Queue a task in
/admin/tasks; the page writes an Outbox event and the Worker executes it. - Resolve model-generated output in
/admin/reviews.
Use Deployment for the full production topology.