How mariangle/ecommerce-app-ms-sql-net-react works
Main Components
• Frontend: This is handled by the React.js application. The “frontend” directory shows separation into components (e.g., authentication, product listing, cart, checkout, account management), Redux state management (located under “src/store”), public assets, and utility/helper functions.
• Backend: The “backend” directory indicates a .NET Web API project built in C#. It is organized into Controllers (handling various endpoints for orders, products, users, etc.), Models (domain classes such as Order, Product, and User), and Repositories (for abstracting database access). Additional support files such as JWTService.cs signal that JWT token authentication is used.
• Database: Although not explicitly present among the files, the README and project setup note usage of Microsoft SQL Server. This include connection configuration in “appsettings.json” and instructions on using Entity Framework for updating the database.
• External Services: As mentioned, the project uses JWT for secure authentication and has integrations for payment methods (e.g., PayPal as laid out in the Roadmap).
Relationships and Interactions
• A secure authentication flow is in place via JWT tokens. Highlight a separate authentication flow where the front end sends login credentials to an authentication endpoint in the backend, which returns a token that is subsequently attached to API calls.
• Additionally, show the state management flow on the front end (Redux store), used to manage application state across components, and persisting data such as cart items and wishlists.
Architectural Patterns
• The backend uses an MVC-like (or layered) design: Controllers manage HTTP endpoints, Models represent data structures, and Repositories encapsulate data access logic.
• Frontend organization leverages component-based design (React components) with a global state managed by Redux.
• JWT-based authentication is an important design principle to secure the backend API.
• The Repository pattern is evident in the “Repositories” directory.