How yamakazeankk/book-store-be works
1. A .NET 6 back-end API (the “BookStore” project) that handles the core business logic, data access, and exposes REST API endpoints.
3. A Flutter mobile application for the Book Store client that interacts with the API (with configuration differences for web versus emulator/mobile).
Main Components
• API Backend (.NET 6):
• Controllers (provide REST endpoints for authentication, book management, orders, reviews, etc.)
• DTOs (for data transfer between layers)
• Models (domain/data objects like Book, Order, User, Voucher, etc.)
• Data Layer (includes the BookStoreContext for EF Core, Migrations to handle schema changes)
• Repositories (abstract the data access logic; interfaces and concrete implementations)
• Services (business logic handling such as BookService, EmailService, FileUploadService, etc.)
• Helper utilities (AutoMapperProfile for mapping, NotificationHub, etc.)
• Database:
• SQL Server (as configured in appsettings.json and data.sql for initial seeding)
• Admin Web (React Dashboard):
• Likely making API calls to the back-end to perform administrative tasks.
• Mobile Client (Flutter Book_Store):
• A Flutter/Dart application configured via api_config.dart to point to the back-end API.
• Implements UI and logic for mobile users to interact with the book store.
Relationships and Interactions
• The API Backend serves as the central hub for the system:
• It processes HTTP requests coming from both the Admin Dashboard and Flutter Mobile application.
• Controllers receive requests, invoke Services for business processing, then interact with Repositories which communicate with the Database.
• The Database (SQL Server) stores all persistent data (books, orders, users, reviews, etc.).
• The API layer might also integrate with external services (e.g., FirebaseStorageService indicates file storage integration).
• The Admin Dashboard and Mobile Client interact with the API through clearly defined endpoints:
• Use HTTP protocols where requests and responses are exchanged via JSON.
• Authentication, data fetching, and business operations are triggered from the client side.
Architectural Patterns and Design Principles
• Layered (n-tier) architecture within the API:
• Presentation Layer (Controllers)
• Business Logic Layer (Services)
• Data Access Layer (Repositories, Data Context, and EF Core Migrations)
• Separation of concerns:
• Each directory (Controllers, DTOs, Models, Repositories, Services, etc.) is responsible for a distinct aspect of the application.
• Use of dependency injection and mapping (AutoMapper) are evident for decoupling components.
• RESTful API design is presumed for handling client-server interactions.
Relevant Technologies, Frameworks, and Libraries
• .NET 6, ASP.NET Core for the API.
• Entity Framework Core for ORM with SQL Server.
• Flutter and Dart for the mobile application.
• Supporting tools like Git, SQL Server, and development tools (Visual Studio, VS Code).
Elements
• Use clear labels for each component:
• “Web API (BookStore)”, “React Admin Dashboard”, “Flutter Mobile Client”, and “SQL Server Database”.
• Controllers (entry point) → Services (business logic) → Repositories (data access) → EF Core and Database.