How anlap2793/auction_website works
• Frontend Application: Representing everything under the “frontend” directory.
• UI Pages & Layouts (e.g., HomePage, LoginPage, Admin and User pages)
• Components (e.g., Categories, FeaturedAuctions, how-to, auth components)
• Routing (AdminRoutes, UserRoutes) and Context (AuthContext)
• Services & Utilities (e.g., apiUser, authService, tokenManager, axiosCustomize)
• Backend Application: Everything under the “backend” directory.
• Server Setup (app.js and server.js), which initializes the backend.
• API Routes for various entities (auctions, auth, categories, images, products, transactions, users)
• Controllers that process incoming requests (auctionController, authController, etc.)
• Services that encapsulate business logic (auctionService, categoryService, etc.)
• Models for the database schema (Auction, Product, User, etc.)
• Middlewares (auth middleware, etc.)
• Configuration files for connecting to external services (database.js, cloudinary.js)
• Database files (database.sql and sample_data.sql)
Out the Interactions
• Within the Backend, break out the workflow:
• API requests reach the API Routes, which hand off to corresponding Controllers.
• Controllers call Services to execute business logic.
• Services interact with Models to read/write to the database.
• Configuration modules (like cloudinary and database configuration) connected to relevant Services and Models.
• External integrations such as Cloudinary (for image services) and any email or password reset functionalities.
• Database as a central component connected to models in the backend.
Architectural Patterns
• MVC Pattern in the Backend: Controllers, Services, and Models form a layered approach.
• Separation of Concerns: Frontend handles presentation and user interaction, while the Backend handles business logic and persistent storage.
• API Layer: The demarcation between frontend and backend where RESTful calls (or similar) are made.
• Modularization: Clear directory structure separating configurations, routes, controllers, models, and utilities.
• Environmental aspects (e.g., .env configurations on both front and backend) to indicate configuration management.
• On user roles through the separation of administrative and user-specific pages/components, as seen from the frontend directory.
• That any external dependencies (like image hosting services and email/password reset functionalities) are highlighted.