ShipAI Documentation
Implementation-focused docs for building, extending, and operating the ship-ai monorepo.
Scope
These docs describe the ship-ai monorepo. This website repository hosts the docs and marketing experience, while implementation details come from the main ship-ai codebase.
ship-ai is a Bun + Turborepo monorepo for an AI chat/research product with billing, admin operations, background jobs, and optional integrations (search, memory, Telegram).
This documentation is reference-first: it maps source files, runtime boundaries, and operational workflows directly to implementation.
Documentation Map
Getting Started
Bootstrap local runtime, configure environments, and fix first-run issues.
Codebase
Understand boundaries across apps, packages, and end-to-end data paths.
Features
Review auth, AI pipeline, billing, search, memory, Telegram, and branding.
Operations
Run migrations, monitor workers/services, and perform maintenance safely.
Deployment
Deploy via Docker or GitLab/Swarm with environment and release checklists.
Recipes
Execute common implementation changes with concise, task-oriented playbooks.
Repository Snapshot
Start Quickly
bun install
bun run setup
bun devUse this for fastest reliable first boot on a new machine.
bun install
cp .env.example apps/app/.env
cp .env.example apps/admin/.env
cp .env.example apps/web/.env
docker compose up -d
bun db:migrate
bun db:seed
bun devUse this when you want explicit control over each startup stage.
Start by Goal
- Go to Getting Started
- Follow Setup
- Validate env in Configuration
- Use Troubleshooting if boot fails
- Start with Codebase
- Read Monorepo Structure
- Continue with Apps and Packages
- Finish with Data Flow
- Review Features
- Review Operations
- Apply Deployment guidance
- Use Recipes for common implementation tasks
Command Reference
bun dev
bun dev:app
bun dev:admin
bun dev:web
bun dev:workerbun db:migrate
bun db:generate
bun db:seed
bun db:seed:plans
bun db:studiobun health
bun health:wait
docker compose ps
docker compose logs -fbun lint
bun typecheck
bun test
bun buildAPI Surface (App)
Major route groups in apps/app/src/app/api/*:
auth: Better Auth entrypoint (/api/auth/[...all])chat: message streaming (/api/chat,/api/chat/[id]/stream)billing: plans/usage/subscription/checkout/portal/webhookfiles: upload URL, upload, file by idinstruments: transcription and compare endpointsartifact: create, patch, exportwebhooks: Telegram webhook endpoint
Use the Features and Data Flow sections for request-level behavior and dependencies.
Reference Baseline
- Feature flags (
FEATURE_*): control user-visible capabilities like search, memory, and billing enforcement. - Service availability (
SERVICE_*): represent whether backing services are deployed/reachable. - Development mode (
DEVELOPMENT_MODE): relaxes selected production constraints for local iteration. - Workspace boundaries:
apps/*own route/UI orchestration,packages/*own reusable domain/platform logic. - Ground truth docs: authoritative docs in
ship-aithat this site should mirror.
Learn Next
Setup Checklist
Follow the end-to-end local bootstrap sequence.
Monorepo Structure
Navigate workspace model, dependency boundaries, and build behavior.
AI Chat Flow
Understand request orchestration, search routing, and streaming stages.
Production Checklist
Use preflight and post-release verification gates before production traffic.
Docs Maintenance
Keep docs synced with source-of-truth files and component patterns.