How farouk4web/todolist_cleanarch_dapper works
Nota is a Clean Architecture ASP.NET Core notes API. Clients send note requests to the controller, which dispatches CQRS requests through MediatR; handlers implement note operations, with repository-backed persistence described by the README. The graph also preserves user commands, domain models, pagination, and exception handling. Some application-to-repository calls are documented but their handler source excerpts were not provided, so those links cite the README rather than implying inspected code.
Main entry points: Program.cs MediatR dispatch · GenericRepository.cs Generic repository · Note.cs Note entity · GetNotesHandler.cs List notes handler
Components 20
API presentation
- Notes controller
Nota.Api/Controllers/NotesController.cs - MediatR dispatch
Nota.Api/Program.cs - Exception middleware
Nota.Api/Middlewares/ExceptionMiddleware.cs
Application features
- Note commands
Nota.Application/Features/Notes/Commands - Create note handler
Nota.Application/Features/Notes/Commands/Create/CreateNoteCommandHandler.cs - Update note handler
Nota.Application/Features/Notes/Commands/Update/UpdateNoteCommandHandler.cs - Toggle delete handler
Nota.Application/Features/Notes/Commands/Delete/ToggleDeleteNoteCommandHandler.cs - Get note handler
Nota.Application/Features/Notes/Queries/GetById/GetNoteByIdHandler.cs - List notes handler
Nota.Application/Features/Notes/Queries/GetList/GetNotesHandler.cs - User commands
Nota.Application/Features/Auth/Commands - Pagination models
Nota.Application/Common/PaginatedRequest.cs - Note DTO
Nota.Application/Features/Notes/Dtos/NoteDto.cs
Domain model
- Note entity
Nota.Domain/Entities/Note.cs - User entity
Nota.Domain/Entities/User.cs - Base entity
Nota.Domain/Entities/BaseEntity.cs - Priority enum
Nota.Domain/Enums/Priority.cs
Persistence
- Generic repository
Nota.Infrastructure/Repositories/GenericRepository.cs - Unit of work
Nota.Infrastructure/Repositories/UnitOfWork.cs - SQL database
Other components
- API client
Connections 29
- API client → Notes controller: sends requests
Nota.Api/Controllers/NotesController.cs - Notes controller → MediatR dispatch: dispatches requests
Nota.Api/Controllers/NotesController.cs - MediatR dispatch → Create note handler: routes commands
README.md - MediatR dispatch → Update note handler: routes commands
README.md - MediatR dispatch → Toggle delete handler: routes commands
README.md - MediatR dispatch → Get note handler: routes queries
README.md - MediatR dispatch → List notes handler: routes queries
README.md - Notes controller → Note commands: accepts commands
Nota.Api/Controllers/NotesController.cs - Create note handler → Note entity: creates entity
Nota.Application/Features/Notes/Commands/Create/CreateNoteCommandHandler.cs - Update note handler → Note entity: updates entity
Nota.Application/Features/Notes/Commands/Update/UpdateNoteCommandHandler.cs - Toggle delete handler → Note entity: updates entity
Nota.Application/Features/Notes/Commands/Delete/ToggleDeleteNoteCommandHandler.cs - Get note handler → Note entity: queries entity
Nota.Application/Features/Notes/Queries/GetById/GetNoteByIdHandler.cs - List notes handler → Note entity: queries entities
Nota.Application/Features/Notes/Queries/GetList/GetNotesHandler.cs - List notes handler → Pagination models: uses pagination
Nota.Application/Features/Notes/Queries/GetList/GetNotesHandler.cs - Get note handler → Note DTO: uses DTO
Nota.Application/Features/Notes/Queries/GetById/GetNoteByIdHandler.cs - List notes handler → Note DTO: returns DTOs
Nota.Application/Features/Notes/Queries/GetList/GetNotesHandler.cs - Create note handler → Generic repository: uses repository
README.md - Update note handler → Generic repository: uses repository
README.md - Toggle delete handler → Generic repository: uses repository
README.md - Get note handler → Generic repository: uses repository
README.md - List notes handler → Generic repository: uses repository
README.md - User commands → User entity: handles users
Nota.Application/Features/Auth/Commands/Create/CreateUserCommandHandler.cs - Note entity → Base entity: inherits fields
Nota.Domain/Entities/Note.cs - User entity → Base entity: inherits fields
Nota.Domain/Entities/User.cs - Note DTO → Priority enum: uses enum
Nota.Application/Features/Notes/Dtos/NoteDto.cs - Generic repository → SQL database: executes SQL
Nota.Infrastructure/Repositories/GenericRepository.cs - Unit of work → Generic repository: creates repositories
Nota.Infrastructure/Repositories/UnitOfWork.cs - MediatR dispatch → Unit of work: registers service
Nota.Api/Program.cs - Notes controller → Exception middleware: uses middleware