How welissonarley/myrecipebook works
Project type and purpose
• This repository contains a backend API named “Meu Livro de Receitas” built on .NET 8, providing REST endpoints for user registration/login (including Google OAuth), recipe CRUD (create, read, update, delete, filter, generate via OpenAI), image upload, and account‐deletion messaging.
• It follows Domain-Driven Design (DDD) and SOLID principles, layered into API, Application, Domain, and Infrastructure modules, with shared DTOs/exception libraries and comprehensive unit/integration/web-api tests.
File structure
• Top-level artifacts: Dockerfile, GitHub Actions/workflows, Azure Pipelines YAML, solution file (.sln), README, and an images folder.
• src/Backend subdivides into four DDD layers:
• MyRecipeBook.API – Web API controllers, middleware, filters, HTTP binding, background services
• MyRecipeBook.Application – Use-case classes (Dashboard, Login, Recipe, User, Token), validation (FluentValidation via shared validators), AutoMapper profiles, DI extensions
• MyRecipeBook.Domain – Entities, value objects, DTOs, repository and service bus/storage/tokens/security abstractions
• MyRecipeBook.Infrastructure – EF Core DbContext, migrations, repository implementations, cryptography (BCrypt), JWT/refresh token generators/validators, Azure Service Bus processor, Azure Blob Storage, OpenAI ChatGPT service
• Shared libraries: Communication (request/response DTOs) and Exceptions (custom exception types).
• tests/ covers common utilities, unit tests for use cases and validators, WebAPI integration tests.
Architecture insights from README
• Supports MySQL or SQL Server via EF Core
• Uses JWT + Refresh Token for authentication, Google external login, Service Bus for asynchronous deletion, Azure Blob Storage for images, OpenAI for recipe generation
• CI/CD pipelines with SonarCloud quality/gate analysis
• Emphasizes modularity through DI, layered separation, and automated migrations
Attention to detail
• Every crucial component: middleware (culture, exception filter, authentication), background services, token providers, validators, repositories, and message processors.
• Don’t over-abstract: show both interface and concrete implementation for key services and repositories.
• Data flow for login, recipe generation, recipe CRUD, image upload, and account deletion.