The backend API for the NIAEFEUP website, built with NestJS.
- NestJS - Backend framework
- TypeORM - ORM for database interactions
- PostgreSQL - Database
- Swagger - API documentation
- Biome - Linter and formatter
Copy the example environment file:
cp .env.example .envThe project uses PostgreSQL as its database. Start it with Docker:
docker compose up -dTo stop the database:
docker compose downTo reset the database (wipe volume):
docker compose down -v# Install project dependencies
npm install
# Start the development server
npm run start:devThe API will be available at http://localhost:3000/api.
To create the database schema:
npm run schema:createTo seed the database with test data:
npm run seedWe use Biome for linting and formatting to ensure a consistent coding style.
# Check for issues
npm run check
# Auto-fix issues
npm run check:fix
# Format only
npm run format
# Lint only
npm run lintWe recommend installing the Biome VS Code extension.
# Run unit tests
npm run test
# Run tests with coverage
npm run test:cov
# Run e2e tests
npm run test:e2eAPI documentation is available through Swagger UI. After starting the application, visit:
http://localhost:3000/api/docsThe OpenAPI JSON specification will be available at:
http://localhost:3000/api/docs-jsonTo create a production build:
npm run buildTo run the production build:
npm run start:prodThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.