Skip to content

VialFlorian/clean-architecture-nestjs-formula1

Repository files navigation

Clean Architecture Nestjs Formula1

Description

A Formula 1 API following Clean Architecture principles, built with Nestjs and Prisma.
The Result pattern is implemented in usecases to handle errors explicitly rather than relying on implicit throws.

Project setup

docker build -t f1db .
docker run -d --name f1database -p 5432:5432 f1db
npm ci

Compile and run the project

npm start

Run tests

npm test

Project Structure

src/
├── core/                 # Business rules
│ ├── driver/             # Driver domain
│ │ ├── entity/
│ │ ├── repository/
│ │ └── usecase/
│ ├── circuit/            # Circuit domain
│ │ ├── entity/
│ │ ├── repository/
│ │ └── usecase/
│ └── etc.../             # Other domains following same pattern
├── infra/                # Frameworks
│ ├── app/                # Application (Nestjs)
│ ├── datasources/        # Datasources (inmemory, prisma, etc.)
│ └── repository/         # Repository implementations

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published