Elevated Spa & E-commerce Platform offers a seamless experience that combines spa services and e-commerce functionalities. The platform is designed to simplify appointment bookings, showcase available services, and provide an online shopping experience for skincare products. Future updates will introduce subscription-based services for personalized skincare solutions.
The backend is built using Node.js and MongoDB and serves as the central hub for business logic, database interactions, and communication with both frontends.
controllers/
: Houses the logic for handling API requests and responses.models/
: Defines the data models, such as User, Appointment, Product, etc.routes/
: Contains the API endpoints.tests/
: Includes Jest test cases for models and routes.auth/
: Manages authentication logic and routes.utils/
: Utility functions and middleware.config/
: Configuration files and environment variables.
-
Customer Profile
POST /api/customers
: Create a new customer profilePUT /api/customers/:id
: Update a customer profile by IDGET /api/customers/:id
: Get a customer profile by IDGET /api/customers
: Get all customer profilesDELETE /api/customers/:id
: Delete a customer profile by IDGET /api/customers/search
: Search for customer profilesPOST /api/customers/reset/:id
: Reset a customer profile
-
Staff Profile
POST /api/staff
: Create a new staff profilePUT /api/staff/:id
: Update a staff profile by IDGET /api/staff/:id
: Get a staff profile by IDGET /api/staff
: Get all staff profilesDELETE /api/staff/:id
: Delete a staff profile by IDGET /api/staff/search
: Search for staff profilesPOST /api/staff/reset/:id
: Reset a staff profile
-
Admin Profile
POST /api/admin
: Create a new admin profilePUT /api/admin/:id
: Update an admin profile by IDGET /api/admin/:id
: Get an admin profile by IDGET /api/admin
: Get all admin profilesDELETE /api/admin/:id
: Delete an admin profile by IDGET /api/admin/search
: Search for admin profilesPOST /api/admin/reset/:id
: Reset an admin profile
-
Customer Auth
POST /api/auth/customer/register
: Register a new customerPOST /api/auth/customer/login
: Login as a customerPOST /api/auth/customer/verify-phone
: Verify phone numberPOST /api/auth/customer/logout
: Logout
-
Staff Auth
POST /api/auth/staff/register
: Register new staffPOST /api/auth/staff/login
: Login as staffPOST /api/auth/staff/verify-phone
: Verify phone numberPOST /api/auth/staff/approve
: Approve staff and issue company emailPOST /api/auth/staff/logout
: Logout
-
Admin Auth
POST /api/auth/admin/register
: Register new adminPOST /api/auth/admin/login
: Login as adminPOST /api/auth/admin/logout
: Logout
This frontend showcases the spa and its services, facilitating appointment setup.
pages/
: Main pages including Home, About, Services, Appointments, Gift Cards, Policies.
This frontend focuses on showcasing the spa and its services, and it facilitates appointment bookings.
pages/
: Main pages including Home, About, Services, Appointments, Gift Cards, Policies, etc.components/
: Reusable UI components.assets/
: Static files like images and stylesheets.
This frontend is dedicated to the e-commerce aspect, including product listings, cart management, and user accounts.
pages/
: Main pages including Home, Products, Cart, Account, etc.components/
: Reusable UI components.assets/
: Static files like images and stylesheets.
Both frontends communicate with the backend through specific API endpoints:
- SPA Frontend: Fetches available services and manages appointment bookings.
- Ecomm Frontend: Manages product listings, shopping cart, and user accounts.
Shared UI components or functionalities can be managed in a shared library or a common folder.
We follow the Test-Driven Development (TDD) approach, facilitated by Jest for writing test cases. This ensures robust, error-free code and simplifies debugging.
We prioritize security by implementing JWT-based authentication, rate limiting,
and data validation. For production, consider replacing console.error
with a
more robust logging solution.
- Lead:
Del M.
- Backend Developer:
- Frontend Developer:
- QA Engineer:
The architecture is modular, separating the spa and e-commerce functionalities into distinct frontends while maintaining a unified backend. This allows for focused development and easier maintenance.
To get started with development, please refer to the Getting Started
section
(to be added).