A modern web-based game built with Astro, Svelte, and Phaser, featuring Turso database integration and Vercel deployment.
Install dependencies:
pnpm install
Set up database: See DATABASE.md for detailed setup instructions.
cp .env.example .env
# Edit .env with your Turso credentials
pnpm db:migrate
Start development server:
pnpm dev
Open in browser:
Navigate to http://localhost:5090
pnpm dev
- Start development serverpnpm build
- Build for productionpnpm preview
- Preview production buildpnpm lint
- Run ESLintpnpm lint:fix
- Fix ESLint issuespnpm db:migrate
- Run database migrationspnpm db:migrate:down
- Rollback last migrationsrc/
āāā components/ # Reusable UI components
āāā game/ # Phaser game logic
ā āāā scenes/ # Game scenes
ā āāā characters/ # Character classes
ā āāā dialogue/ # Dialogue systems
āāā layouts/ # Astro layouts
āāā lib/ # Database and utilities
ā āāā db.ts # Database connection
ā āāā repositories.ts # Database operations
ā āāā migrations/ # Database migrations
āāā pages/ # Astro pages and API routes
ā āāā api/ # API endpoints
ā āāā story/ # Game story pages
āāā styles/ # Global styles
The project uses Turso as the database provider with Kysely as the ORM. See DATABASE.md for complete setup instructions.
The app is configured for Vercel deployment with the Vercel adapter. Environment variables should be set in your Vercel dashboard.
For complete setup instructions, please see our Tailwind Integration Guide.