A backend service for managing duels and game interactions. Built with NestJS and TypeScript.
This API handles the backend logic for duel-based gameplay. It connects to a PostgreSQL database hosted on AWS RDS and is deployed on Heroku in the EU region.
- Node.js (18+)
- Bun
- PostgreSQL database
bun installCopy the environment variables and update them:
cp .env.example .envMake sure to set:
DATABASE_URL- Your PostgreSQL connection stringNODE_ENV- Set todevelopmentfor local workPORT- API port (defaults to 3000)CORS_ORIGIN- Frontend URL for CORS
# Development with hot reload
bun run start:dev
# Production build
bun run build
bun run start:prodThe API uses PostgreSQL with SSL enabled for production. Database migrations and schema are managed through the application.
This project is set up for Heroku deployment with Terraform for infrastructure management:
# Deploy infrastructure
cd terraform
terraform plan
terraform apply
# Deploy code to Heroku
git push heroku mainThe app runs in the EU region (eu) on Heroku.
Add your API endpoints documentation here as you build them
# Run tests
bun test
# Run tests with coverage
bun run test:cov
# Run e2e tests
bun run test:e2e- Framework: NestJS
- Language: TypeScript
- Database: PostgreSQL (AWS RDS)
- Deployment: Heroku (EU region)
- Infrastructure: Terraform
- Runtime: Bun
This is a personal project, but if you spot any issues or have suggestions, feel free to open an issue.
MIT