A web app that allows users to track their income and expenses. Users can add, categorize, edit, and delete transactions, view a summary of their finances, and set monthly budgets for different categories like "Food," "Entertainment," and "Bills."
install node dependencies:
npm install
set-up the database:
docker compose up -d
npx drizzle-kit push
npm run dev
npm run test
http://locahost:{PORT}/documentation
- Allow account creation with name, email, and password.
- Secure password storage (encryption).
- Implement login with email and password.
- Session or JWT-based authorization.
- Route authentication to ensure only authenticated users access protected resources.
- Allow users to create a new expense entry with:
- Amount
- Date
- Description (optional)
- Each expense should be associated with the user who created it.
- Allow user to create categories.
- View expenses in a list.
- Filter and group expenses by date and category.
- Allow profile information updates (name and email).
- Secure password storage (e.g., bcrypt).
- Secure authentication using JWT tokens.
- Data validation to prevent attacks like SQL Injection and XSS.
- Modular structure following best development practices to facilitate maintenance.
- Clear documentation for code and APIs.
- Contents: Contains entities, value objects, and business rules that represent the core business logic. These are pure classes and functions that describe "what" the business does, independent of "how" it’s done or "who" uses it.
- Responsibilities: Enforces and encapsulates the business rules, ensuring that the essential business logic remains consistent. This layer defines "what" happens in the business, independent of application use cases or infrastructure.
- Dependencies: Completely independent of other layers. The Domain layer has no dependencies on Application, Infrastructure, or Presentation.
- Contents: Contains services, use case classes, and application-specific logic. These elements define the steps necessary to execute a use case or workflow, such as "Create User" or "Process Payment."
- Responsibilities: Orchestrates and executes use cases, coordinating actions across entities and resources. This layer controls how the business rules (from the Domain layer) interact to achieve specific application goals.
- Dependencies: Depends on the Domain layer for business logic. It should only have interface contracts (e.g., repositories) for any external dependencies (like data storage or APIs), keeping the layer independent of the Infrastructure layer.
- Contents: Implements the actual infrastructure components, like database repositories, data mappers, external API clients, and other resources needed by the Application layer.
- Responsibilities: Provides concrete implementations of the interfaces required by the Application layer. For example, if the Application layer needs to retrieve a list of users, the Infrastructure layer would provide a repository that fetches data from a database.
- Dependencies: Implements interfaces or adapters defined in the Application layer, following dependency inversion. This layer can depend on Application interfaces but should avoid referencing specific Application or Domain logic.
- Contents: Controllers, routing, serializers, and response handlers that create a RESTful API for the application. Each route or controller method represents an endpoint (e.g., POST /accounts or GET /transaction/{id}).
- Responsibilities: Exposes the Application layer’s use cases to external clients via HTTP. The API receives HTTP requests, translates them into application use cases, and returns HTTP responses with the appropriate status codes and data.
- Dependencies: Depends on the Application layer, as it calls application use cases and receives data structures or response objects for clients. It follows dependency inversion, ensuring the Web API only depends on the use case interfaces, keeping business rules and core logic shielded.
👤 Guilherme Oliveira
- Github: @GuiAkuro
- LinkedIn: @guilherme-alves-de-oliveira
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator