Skip to content

Repository files navigation

Website NIAEFEUP - BackEnd

Checks codecov Node.js TypeScript Biome License

The backend API for the NIAEFEUP website, built with NestJS.

Technologies used

Development setup

Prerequisites

Running

1. Environment variables

Copy the example environment file:

cp .env.example .env

2. Start the database

The project uses PostgreSQL as its database. Start it with Docker:

docker compose up -d

To stop the database:

docker compose down

To reset the database (wipe volume):

docker compose down -v

3. Install dependencies and run

# Install project dependencies
npm install

# Start the development server
npm run start:dev

The API will be available at http://localhost:3000/api.

Database setup

To create the database schema:

npm run schema:create

To seed the database with test data:

npm run seed

Linting

We 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 lint

We recommend installing the Biome VS Code extension.

Testing

# Run unit tests
npm run test

# Run tests with coverage
npm run test:cov

# Run e2e tests
npm run test:e2e

API Documentation

API documentation is available through Swagger UI. After starting the application, visit:

http://localhost:3000/api/docs

The OpenAPI JSON specification will be available at:

http://localhost:3000/api/docs-json

Building

To create a production build:

npm run build

To run the production build:

npm run start:prod

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

About

The backend for NIAFEUP's website.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Used by

Contributors

Languages