Build Status | Mutation testing coverage (only on back unit tests) |
---|---|
This is an online ordering website for Boulangerie Le Panivore.
The frontend application built with Nuxt.js.
Methods to interact with REST Api are defined in front/services/api.service.ts
.
This service is injected in Nuxt Context to be able to access it from components in front/plugins/api-service.plugin.ts
.
The backend application built with NestJS. The application uses a Clean Architecture pattern (see below).
The back
application is designed using a Clean Architecture pattern (also known as Hexagonal Architecture).
Therefore, SOLID principles are used in code, especially the Dependency Inversion Principle (do not mix up with the classic dependency injection in NestJS for example).
Concretely, there are 3 main packages: domain
, use_cases
and infrastructure
. These packages have to respect these rules:
domain
contains the business code and its logic, and has no outward dependency: nor on frameworks (NestJS for example), nor onuse_cases
orinfrastructure
packages.use_cases
is like a conductor. It will depend only ondomain
package to execute business logic.use_cases
should not have any dependencies oninfrastructure
.infrastructure
contains all the technical details, configuration, implementations (database, web services, etc.), and must not contain any business logic.infrastructure
has dependencies ondomain
,use_cases
and frameworks.
The npm
commands are the same, whether you are on back
or front
application.
- Node LTS 16.x
npm install
npm test
npm run start:dev
When running back
for the first time, or after database deletion, you have to run migrations to create a local database:
npm run typeorm:migration:run
See INSTALL.md.