How focus1102/cake-selling-website works
Project Type and Purpose
• This is a full-stack e-commerce web application (“Cake Selling Website”) with a Vue-based SPA frontend and a Node/Express/MongoDB backend.
• It serves two user groups: customers (browse cakes, manage cart, place orders) and administrators (product, order, and user management + analytics dashboard).
File Structure Analysis
• Top-level directories:
• frontend code in src + public + root Vue config files (babel.config.js, vue.config.js, jsconfig.json).
• backend API in backend (controllers, models, middleware, routes, server.js).
• There is also a server folder (with its own package.json) which appears to be a duplicate or alternate backend entry point—assess whether one can be removed or consolidated.
• Backend follows an MVC-inspired pattern:
• models/ (Mongoose schemas)
• controllers/ (business logic)
• routes/ (HTTP endpoints)
• middleware/ (auth, admin guard, error handling)
• Frontend uses Vue 3 with:
• src/router (Vue Router setup)
• src/store (Vuex modules: auth, cart, products, paymentHistory)
• src/components & src/admin/components + src/admin/views for UI
• Configuration & deployment files: .env (Mongo URI, JWT secret, email creds), package.json files in each subproject.
README Insights
• Tech stack: Vue 3, Vuex, Vue Router, Axios, Node.js, Express, MongoDB, JWT, Nodemailer.
• API runs on port 5001, frontend on 8080.
• Key features map neatly to frontend views/components and backend controllers/routes.
Elements
• Clear labels: “Vue SPA”, “Express API”, “MongoDB”, “SMTP Email”
• HTTP calls from SPA to API (label: Axios/REST)
• DB queries from API to MongoDB (label: Mongoose)
• Email requests from API to SMTP (label: Nodemailer)
• Blue rectangles for services you host (SPA, API)