How datpham0412/swe30003-assignment3-yourlocalshop works
Project type and purpose
• This is a full-stack e-commerce/order-management system.
• Frontend: Next.js (React) app under /frontend, delivering catalog, cart, checkout, admin dashboard, reports, etc.
• Backend: ASP.NET Core Web API (Controllers + Managers + EF Core DbContext) exposing REST endpoints for auth, products, inventory, cart, orders, invoices, payments, shipments, sales reports.
• Data persistence: Relational database via Entity Framework Core and migrations.
• External integrations: Email sender/notifier (SMTP or service), payment processing (likely external gateway).
File structure
• Top-level:
• Controllers: HTTP API endpoints (AuthController, CatalogueController, InventoryController, …)
• Managers: business-logic services (AccountManager)
• Data: AppDbContext (EF Core)
• Migrations: EF Core schema versioning
• Models: domain entities (Account, Product, ShoppingCart, Order, Invoice, Payment, Shipment, SalesReport, etc.)
• Program.cs + appsettings.json: ASP.NET Core startup & configuration
• frontend/: Next.js application (app directory with page.tsx routes, shared components, utils, CSS, config)
README
• Confirms the split into two distinct runtime processes communicating over HTTP.
Main components & relationships
a. Components
• User’s browser (React/Next.js)
• Next.js frontend (UI Layer + API client)
• ASP.NET Core Web API
– Controllers (Auth, Catalogue, Inventory, Cart, Order, Invoice, Payment, Shipment, SalesReport)
– Managers (business logic)
– AppDbContext (EF Core ORM)
• Database (SQL Server / PostgreSQL / etc.)
• External services:
– Email service (SMTP or email-API) via EmailSender/EmailNotifier
– Payment gateway (credit-card processor or similar)
b. Relationships & interactions
• Browser ↔ Next.js pages/components (React hydration, SSR)
• Next.js → Web API endpoints (HTTP REST calls)
• Web API Controllers → Managers → AppDbContext → Database (CRUD)
• Web API → Payment gateway (HTTP) for /payments/process
• Web API → Email service for order confirmation, shipment notices
c. Architectural patterns & design principles
• Layered architecture: Presentation (Next.js), API (Controllers), Business (Managers), Data (EF Core)
• Use of DTOs to decouple API contract from domain models
• EF Core code-first with migrations for schema evolution
• Single API surface for web and mobile clients
d. Key technologies
• Frontend: Next.js 13 (app router), React, TypeScript
• Backend: .NET 7+, ASP.NET Core Web API, EF Core, C#
• Database: Relational (configured via AppDbContext + migrations)
• Infra: appsettings.json, launchSettings.json for env config
Detailed focus points
• Major API controller group as its own component or combine related ones under a single “Feature API” cluster.
• How DTOs flow between frontend API client and Controllers, then map to Models and persist via EF Core.
• Email notification flow triggered by order/invoice shipment events.
• Payment processing call chain inside the API layer.