A visual novel game platform with interactive storytelling, built as a monorepo with web and desktop applications.
Aquila is a narrative-driven game featuring dialogue-based storytelling with character interactions, choices, and multiple language support. The project includes:
# Install dependencies
bun install
# Set up environment variables
cp apps/web/.env.example apps/web/.env
# Edit apps/web/.env with your DATABASE_URL
# Start all workspaces in development mode
bun dev
# Or start only the web app (port 5090)
bun dev:web
# Or start only the desktop app
bun --filter desktop dev
Visit http://localhost:5090 for the web app.
# Generate migrations from schema changes
bun drizzle:generate
# Apply migrations to your database
bun drizzle:migrate
# Open Drizzle Studio GUI (optional)
bun drizzle:studio
Note on CockroachDB: Drizzle's CockroachDB dialect is pre-release. The default migrate command guards against CockroachDB URLs. Use
ALLOW_COCKROACH_MIGRATIONS=trueonly after validating in staging. Prefer managed PostgreSQL for production.
This is a monorepo managed by Turborepo and Bun workspaces:
apps/
āāā web/ # Astro web application (SSR)
ā āāā src/
ā ā āāā components/ # Reusable UI components
ā ā āāā lib/ # Database, auth, utilities
ā ā āāā pages/ # Routes and API endpoints
ā ā āāā styles/ # Tailwind configuration
āāā desktop/ # Tauri desktop application
āāā src/ # SvelteKit SPA
packages/
āāā game/ # @aquila/game - Phaser scenes and engine
ā āāā src/
ā āāā scenes/ # BaseScene, StoryScene
ā āāā types.ts # Game type definitions
āāā dialogue/ # @aquila/dialogue - Story content
ā āāā src/
ā āāā characters/ # Character definitions
ā āāā stories/ # Localized dialogue files
ā āāā translations/ # UI text (en.json, zh.json)
āāā e2e/ # Playwright E2E test suite
ā āāā tests/ # E2E specs, setup, utilities
āāā assets/ # Shared game assets
bun dev - Start all workspaces (web + desktop) with hot reloadbun dev:web - Start Astro web app on port 5090bun build - Build all workspaces for productionbun preview - Preview production build (web)bun test - Run all tests (unit + E2E)bun test:e2e - Run Playwright E2E testsbun test:headed - Run E2E tests with visible browserbun test:debug - Debug E2E testsbun test:report - View Playwright HTML reportbun --filter web test - Run Vitest unit testsbun --filter web test:watch - Unit tests in watch modebun drizzle:generate - Generate SQL migrations from schemabun drizzle:migrate - Apply migrations (with CockroachDB guard)bun drizzle:studio - Open Drizzle Studio database GUIbun lint - Run ESLint across all workspacesbun lint:fix - Auto-fix ESLint issuesapps/web)apps/desktop)@aquila/game)@aquila/dialogue)packages/dialogue/src/stories/[storyName]/en.ts, zh.ts)packages/dialogue/src/stories/index.tsapps/web/src/lib/drizzle/schema.tsbun drizzle:generate to create migration filesapps/web/src/lib/drizzle/migrations/bun drizzle:migrate# Single E2E test file
bun --filter e2e test:e2e tests/homepage.spec.ts
# Specific test by name
bun --filter e2e test:e2e -g "should navigate to login"
# Unit tests for a specific file
bun --filter web test src/lib/__tests__/utils.test.ts
DATABASE_URL - PostgreSQL connection stringBETTER_AUTH_URL - Auth service URL (defaults to app URL)BETTER_AUTH_SECRET - Auth encryption key (auto-generated in dev)DB_ALLOW_SELF_SIGNED - Allow self-signed SSL certs (true/false)DB_POOL_MAX - PostgreSQL connection pool size (default: 10)ALLOW_COCKROACH_MIGRATIONS - Explicitly enable CockroachDB migrationsThe web app is configured for Vercel with automatic deployments:
DATABASE_URL in environment variablesBETTER_AUTH_SECRET for productionbun build automatically)Build platform-specific binaries:
# Build for current platform
bun --filter desktop tauri build
# Output: apps/desktop/src-tauri/target/release/
This project uses:
This project is private and not licensed for public use.