How abdulhamidshahade/blueberry24 works
Project type and purpose
• BlueBerry24 is a modern, full-stack e-commerce platform.
• Backend: .NET 9 Web API following Clean Architecture.
• Frontend: Next.js 15 with React, TypeScript, Bootstrap.
File structure
• Top-level solution contains five main projects:
• BlueBerry24.API – ASP.NET Core Minimal Web API (Controllers, Program.cs, appsettings).
• BlueBerry24.Application – Application/use-case layer (DTOs, services, AutoMapper, authorization).
• BlueBerry24.Domain – Core business entities, validations, repository interfaces, constants.
• BlueBerry24.Infrastructure – EF Core DbContext, repository implementations, Redis and Identity stores.
• BlueBerry24.Web – Next.js frontend (app router pages, components, client-side services, API routes).
• Tests folder reserved for xUnit/Playwright in future.
• Dockerfiles at API and Web roots signal containerized deployment.
• Endpoints.md and Swagger integration suggest documented API surface.
README for architecture insights
• Clean Architecture with strict layer dependencies:
Domain → Application → Infrastructure → API
• Frontend organizes pages under src/app, reusable components under src/components, client services under src/lib/services, server actions under src/lib/actions.
• External concerns: SQL Server (via EF Core), Redis caching, Gmail SMTP, JWT/ASP.NET Identity.
• Key features: products, categories, inventory, cart, checkout, orders, coupons, wishlists, role-based auth, admin dashboard.
• User’s Browser / Mobile App (HTTP client)
• Next.js Frontend (BlueBerry24.Web)
• API Gateway / Reverse Proxy (optional, e.g., Nginx or Vercel)
• ASP.NET Core Web API (BlueBerry24.API – Controllers)
• Application Layer (BlueBerry24.Application – services & use-cases)
• Domain Layer (BlueBerry24.Domain – entities, repository interfaces)
• Infrastructure Layer (BlueBerry24.Infrastructure – DbContext, repo implementations, Redis, Identity store)
• Data Stores: SQL Server database, Redis cache
• External Services: SMTP/Gmail, Identity Provider (JWT issuance), optional CDN or blob storage (for uploads under Web/public).
1. Browser → Next.js pages/components → calls client-side services (fetch/axios) → API endpoint
2. BlueBerry24.API Controllers → inject Application services → orchestrate business logic
3. Application services → reference Domain entities & repository interfaces → apply use-case rules
4. Repository implementations in Infrastructure → EF Core → SQL Server
5. Application may call Infrastructure Redis cache or external SMTP for email
6. Authentication flow: API issues JWT via Identity stores, returned to frontend → stored and used in Authorization header for subsequent calls
c. Architectural patterns & design principles:
• Clean Architecture / Hexagonal: clear concentric layers, dependency inversion (inward).
• Repository + Unit of Work patterns for data access.
• DTOs & AutoMapper for boundary mapping.
• Attribute-based authorization and policy handlers.
• Server actions vs client services in Next.js for data mutations.
d. Key technologies & frameworks (annotate near each component):
• Next.js 15 + React 19 + TypeScript + Bootstrap 5
• ASP.NET Core 9 Minimal APIs, Swashbuckle/Swagger
• EF Core 9, SQL Server
• Redis distributed cache
• ASP.NET Identity + JWT Bearer
• FluentValidation, AutoMapper
Final recommendations
• Critical components: UI pages, client services, API controllers, services, repositories, entities, DB, cache, external SMTP.
• Iterate with the team to ensure all edge cases (e.g., admin vs user flows, caching, email) are visually represented.