This project is an example of implementing clean architecture in Node.js, focusing on Facebook authentication.
The project adheres to the principles of Clean Architecture, dividing the code into different layers:
- Application: Contains the controllers and application logic.
- Domain: Defines the entities, errors, and interfaces for authentication.
- Data: Implements services and repositories for interaction with APIs and databases.
- Infra: Holds infrastructure implementations, such as data access and external APIs.
- Dependency Injection: Used to inject dependencies, promoting looser coupling and facilitating testing.
- Repository Pattern: Applied to abstract the data access layer, allowing for the substitution of repository implementations.
The project includes unit tests to validate the behavior of the different layers and services.
To run the project, follow these steps:
- Clone the repository
- Install the dependencies with
npm install - Run the project with
npm start