How vodoquangduong/spring2025swd392_net1709_gabong works
This project is clearly a full-stack application that separates concerns into a frontend and a backend. The frontend, built with React (using TypeScript, Vite, Tailwind CSS, etc.), handles the user interface across multiple pages (e.g., Login, Register, Dashboard, Project details, Profile, etc.) and components (chat, notifications, modals, etc.). The backend is an ASP.NET Web API organized into a clearly layered structure with controllers (e.g., AccountController, BidController, NotificationController, etc.), business objects (domain models and enums), data access objects (DAOs with migrations and Entity Framework style mappings), repositories (abstracting data persistence responsibilities), and services (encapsulating business logic for authentication, project management, messaging, PayPal integration, and SignalR hubs for real-time notifications and chat).
Main Components
● Frontend: A React-based client application that manages routing (with multiple pages like Home, Dashboard, Profile, etc.) and state management using stores. Indicate that it uses Vite as the build tool and Tailwind CSS for styling.
● Backend API: The ASP.NET Core-based API including the Controllers layer that exposes endpoints, the Services layer (implementing business logic), the Repository layer for data access abstractions, and the DAOs for direct database communication. Include additional internal components such as the Business Objects (models, enums) and the DTOs (for data transfer between client and server).
● Database: A relational database (evidenced by SQL script files and migration history) that the backend uses via Entity Framework (or a similar ORM) to persist data.
● Real-Time Communication and External Integrations: Highlight the use of SignalR components (ChatHub, NotifyUserHub) for real-time communication. Also include integration with external services (e.g., PayPal as shown in the PayPal controller and related DTOs).
Relationships & Interactions
● Show the Backend interacting with the Database for CRUD operations via the DAOs and migrations.
● Include connections from the Backend’s SignalR hubs to the clients, demonstrating real-time bi-directional communication.
● Optionally, indicate auxiliary files/configs (e.g., Dockerfile for containerization) as part of the deployment pipeline.
Architectural Patterns & Design Principles
● The project follows layered (or N-tier) architecture segregating controllers, business logic, data access, and presentation (frontend).
● The backend is designed with separation of concerns: the Controllers handle HTTP requests, Services encapsulate business logic, and Repositories/DAOs manage database access.
● The frontend separates UI components, layouts, hooks, and state management into distinct modules.
● Use of DTOs and Mapper profiles hints at a careful mapping between internal domain models and external API models.