Modern management system for the "BANGMOD HACKATHON" event — streamlining event coordination, registration, and operations.
- Bun runtime (v1.3.5 or later)
- PostgreSQL database (or Docker for local development)
First, install the dependencies:
bun installCreate a .env file in apps/server/ with the following required variables:
Server Environment Variables:
DATABASE_URL- PostgreSQL connection stringBETTER_AUTH_SECRET- Secret key for Better Auth (minimum 32 characters)BETTER_AUTH_URL- Base URL for authentication (e.g.,http://localhost:3000)CORS_ORIGIN- Allowed CORS origin URLs (e.g.,http://localhost:3001,http://localhost:3002)NODE_ENV- Environment mode (development,production, ortest)
Web Environment Variables:
Create a .env file in apps/web/ and apps/staff/ with:
VITE_SERVER_URL- Backend API URL (e.g.,http://localhost:3000)
This project uses PostgreSQL with Drizzle ORM.
Start a PostgreSQL database using Docker Compose:
bun run db:startThis will start a PostgreSQL container with the following defaults:
- Database:
bmhkms - User:
postgres - Password:
password - Port:
5432
Update your apps/server/.env file with:
DATABASE_URL=postgresql://postgres:password@localhost:5432/bmhkms
- Make sure you have a PostgreSQL database set up.
- Update your
apps/server/.envfile with your PostgreSQL connection details.
Apply the schema to your database:
bun run db:pushbun run db:push- Push schema changes to databasebun run db:generate- Generate Drizzle migration filesbun run db:migrate- Run database migrationsbun run db:studio- Open Drizzle Studio UI for database managementbun run db:start- Start PostgreSQL with Docker Composebun run db:watch- Watch database with Docker Compose (foreground)bun run db:stop- Stop database containerbun run db:down- Stop and remove database container
Then, run the development server:
bun run devOpen http://localhost:3001 in your browser to see the web application. Open http://localhost:3002 in your browser to see the staff application. The API is running at http://localhost:3000.
This project uses Husky for git hooks and Ultracite (Biome) for code formatting and linting.
bun run prepare: Initialize git hooks with Husky (run once after cloning)bun run check: Check for formatting and linting issues without fixingbun run fix: Automatically format and fix code with Ultracite
Git hooks are configured to run bun run fix on staged files before commits.
bmhkms/
├── apps/
│ ├── web/ # Frontend application (React + TanStack Start)
│ ├── staff/ # Staff application (React + TanStack Start)
│ ├── server/ # Backend API (Elysia, TRPC)
│ └── fumadocs/ # Documentation app (Fumadocs)
├── packages/
│ ├── api/ # API layer / business logic
│ ├── auth/ # Authentication configuration & logic
│ ├── db/ # Database schema & queries
│ ├── env/ # Environment variable validation
│ └── config/ # Shared TypeScript configuration
bun run dev: Start all applications in development modebun run dev:web: Start only the web application (port 3001)bun run dev:staff: Start only the staff application (port 3002)bun run dev:server: Start only the server
bun run build: Build all applications
bun run check-types: Check TypeScript types across all appsbun run check: Check for formatting and linting issuesbun run fix: Format and fix code with Ultracite (Biome)
bun run db:push: Push schema changes to databasebun run db:generate: Generate Drizzle migration filesbun run db:migrate: Run database migrationsbun run db:studio: Open Drizzle Studio UI for database managementbun run db:start: Start PostgreSQL with Docker Composebun run db:watch: Watch database with Docker Compose (foreground)bun run db:stop: Stop database containerbun run db:down: Stop and remove database container
bun run prepare: Initialize git hooks with Husky