How rivaanranawat/flutter-amazon-clone-tutorial works
Main Components
• Client Application: Represent the Flutter application which includes multiple features (authentication, product listing, search, cart, order management, and the admin panel). Under the "lib" directory, notice the modular structure with individual feature directories (e.g., features/account, features/admin, features/cart, etc.). The client uses the Provider pattern for state management, meaning design your client part to show the separation between UI components (screens, widgets) and state providers.
• Server-Side API: Outline the Node.js backend (server folder). This component includes:
• Middleware (for authentication and admin checks)
• Route handlers (for different aspects like auth, user management, products, admin functions)
• Mongoose models that encapsulate data (orders, products, ratings, user, etc.)
• Third-Party Services: Include Cloudinary for managing images/uploads and external payment systems (Google/Apple Pay). It’s useful to show that the server (and possibly even specific admin services) interacts with Cloudinary.
Relationships and Interactions
• The server interacts with the database (MongoDB) for storing/fetching persistent data and makes calls to Cloudinary for image-related functionalities.
• Authentication flow with middleware intercepting API requests to ensure security.
Architectural Patterns and Design Principles
• RESTful API design on the server: Highlight the routing structure, use of Express middleware, and data handling through Mongoose.
• Modular structure: Both client and server codebases are split into clearly defined modules or features. Emphasize the separation between UI and business logic in Flutter as well as the separation of routes, models, and middleware in the server.
Relevant Technologies and Frameworks
• Client: Flutter, Provider (state management system), along with native platform files for Android, iOS, macOS, etc.
• Server: Node.js, Express, Mongoose, MongoDB, Cloudinary.
• Mention additional tools like npm for server-side package management and flutter commands for client-side operations.