A monorepo containing the registration website for Bangmod Hackathon 2025, built with Next.js, Express.js, and PostgreSQL.
Before setting up the development environment, make sure you have the following installed:
- Node.js (>= 20.0.0)
- pnpm (>= 10.14.0) - Package manager
- Docker and Docker Compose - For database and services
- Git - Version control
-
Clone the repository
git clone <repository-url> cd bmhk-2025
-
Install dependencies
pnpm install
-
Set up environment variables
Create a
.envfile in the root directory with the following variables:# Database Configuration DATABASE_USER=postgres DATABASE_PW=password DATABASE_NAME=bmhk_2025 DATABASE_URL=postgresql://postgres:password@localhost:5432/bmhk_2025 # Add other environment variables as needed for your specific setup
-
Start the database
docker-compose -f docker-compose.dev.yml up -d
-
Run database migrations
pnpm db:migrate
-
Development
pnpm dev # Start all services in development modepnpm --filter auth auth:seed <email> <username> # Add admin user for staffapp
-
Database
pnpm db:check # Check database schema pnpm db:generate # Generate database schema pnpm db:migrate # Run database migrations
-
Code Quality
pnpm lint # Run linting across all packages pnpm lint:fix # Fix linting issues pnpm format # Format code with Prettier
-
Build
pnpm build # Build all packages and applications
bmhk-2025/
├── apps/
│ ├── api/ # Express.js API server
│ └── web/ # Next.js web application
├── packages/
│ ├── auth/ # Authentication utilities
│ ├── db/ # Database schema and migrations
│ ├── ui/ # Shared UI components
│ └── ... # Other shared packages
└── docker-compose.dev.yml # Development services
-
Start the development environment:
pnpm dev
-
The following services will be available:
- Web App: http://localhost:3000
- API Server: http://localhost:3001
- Database: localhost:5432
-
Make changes to the code and see them reflected in real-time thanks to hot reloading.
- Database connection issues: Make sure Docker is running and the database container is healthy
- Port conflicts: Check if ports 3000, 3001, or 5432 are already in use
- Dependency issues: Try running
pnpm installagain or clear the cache withpnpm store prune
- Create a feature branch from
main - Make your changes
- Run linting and formatting:
pnpm lint && pnpm format - Submit a pull request
For more detailed information about each package, check the individual README files in the apps/ and packages/ directories.