Skip to content

Latest commit

ย 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ˜• Brew3D Coffee Commerce Platform

Backend API Tests

A full-stack coffee e-commerce and cafรฉ management web application featuring an interactive 3D-inspired frontend, persistent shopping cart, customer checkout, table reservations, order management, and an administrative dashboard.

Built with HTML, CSS, JavaScript, Node.js, Express.js, MongoDB, and Mongoose, the application demonstrates a complete frontend-to-backend commerce workflow and is deployed using Netlify and Render.


๐ŸŒ Live Demo

๐Ÿš€ View Swa Cafe Live Website


๐Ÿ“– Project Overview

Brew3D Coffee Commerce Platform is a full-stack, multi-page web application designed to simulate a modern digital cafรฉ experience.

The platform allows customers to explore coffee products, add products to a persistent shopping cart, complete checkout, place orders, reserve tables, and contact the cafรฉ.

A dedicated administrative dashboard provides cafรฉ-management functionality, including viewing customer orders, viewing reservations, deleting completed or unwanted records, and adding products.

The project demonstrates practical full-stack development by connecting a responsive JavaScript frontend to a deployed Node.js and Express REST API backed by MongoDB Atlas.


โœจ Core Features

โ˜• Coffee Menu & Product Browsing

  • Interactive coffee product catalogue
  • Product names, images, and prices
  • Coffee-category filtering
  • Add-to-cart functionality
  • Animated product cards
  • Responsive product layouts

๐Ÿ›’ Shopping Cart

  • Add products directly from the menu
  • Persistent cart using browser LocalStorage
  • Live cart quantity indicator
  • Multiple-product support
  • Product quantity tracking
  • Individual item totals
  • Dynamic order total calculation
  • Remove products from cart
  • Cart data retained while navigating between pages

๐Ÿ’ณ Customer Checkout

  • Dedicated checkout workflow
  • Customer full-name collection
  • Email-address collection
  • Phone-number collection
  • Delivery-address collection
  • Payment-method selection
  • Complete order summary before submission
  • Product quantities and prices displayed
  • Total order value calculated automatically
  • Successful-order confirmation
  • MongoDB order persistence
  • Cart automatically cleared after successful checkout

The current card option records the selected payment method as part of the order. Integration with a production payment gateway is planned as a future enhancement.

๐Ÿ“… Table Reservations

Customers can submit table reservations through the booking interface.

Booking information is sent through the backend API and stored for administrative management.

๐Ÿ“ฉ Contact Experience

  • Dedicated contact page
  • Customer enquiry form
  • Backend contact endpoint
  • Responsive contact interface

๐Ÿ‘ฉโ€๐Ÿ’ผ Admin Dashboard

The administrative dashboard provides cafรฉ-management functionality including:

  • View customer orders
  • View customer contact information
  • View delivery addresses
  • View payment methods
  • View ordered products
  • View quantities
  • View order totals
  • View order status
  • View order timestamps
  • Delete customer orders
  • View table reservations
  • View reservation date and time
  • View guest count
  • Delete table bookings
  • Add new products

๐Ÿ”„ Complete Customer Journey

Customer Visits Website
        โ”‚
        โ–ผ
Browse Coffee Menu
        โ”‚
        โ–ผ
Select Coffee Products
        โ”‚
        โ–ผ
Add Products to Cart
        โ”‚
        โ–ผ
Persistent LocalStorage Cart
        โ”‚
        โ–ผ
Review Shopping Cart
        โ”‚
        โ–ผ
Proceed to Checkout
        โ”‚
        โ–ผ
Enter Customer Details
        โ”‚
        โ”œโ”€โ”€ Full Name
        โ”œโ”€โ”€ Email
        โ”œโ”€โ”€ Phone
        โ”œโ”€โ”€ Delivery Address
        โ””โ”€โ”€ Payment Method
        โ”‚
        โ–ผ
Review Order Summary
        โ”‚
        โ–ผ
Place Order
        โ”‚
        โ–ผ
Express REST API
        โ”‚
        โ–ผ
MongoDB Atlas
        โ”‚
        โ–ผ
Admin Dashboard
        โ”‚
        โ–ผ
View / Manage / Delete Order

๐Ÿ“… Reservation Workflow

Customer
   โ”‚
   โ–ผ
Table Booking Form
   โ”‚
   โ–ผ
Booking Details
   โ”‚
   โ–ผ
Express Booking API
   โ”‚
   โ–ผ
MongoDB Atlas
   โ”‚
   โ–ผ
Admin Dashboard
   โ”‚
   โ–ผ
View / Delete Reservation

๐Ÿ—๏ธ Application Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           CUSTOMER           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       NETLIFY FRONTEND       โ”‚
โ”‚                              โ”‚
โ”‚  HTML5                       โ”‚
โ”‚  CSS3                        โ”‚
โ”‚  JavaScript                  โ”‚
โ”‚  LocalStorage                โ”‚
โ”‚  Swiper.js                   โ”‚
โ”‚  ScrollReveal                โ”‚
โ”‚  Boxicons                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ”‚ HTTPS / REST API
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        RENDER BACKEND        โ”‚
โ”‚                              โ”‚
โ”‚  Node.js                     โ”‚
โ”‚  Express.js                  โ”‚
โ”‚  Mongoose                    โ”‚
โ”‚  REST API                    โ”‚
โ”‚  CORS                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        MONGODB ATLAS         โ”‚
โ”‚                              โ”‚
โ”‚  Orders                      โ”‚
โ”‚  Bookings                    โ”‚
โ”‚  Products                    โ”‚
โ”‚  Contact Requests            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Technology Stack

Frontend

Technology Purpose
HTML5 Multi-page website structure
CSS3 Responsive styling and visual effects
JavaScript Frontend application logic
LocalStorage Persistent shopping-cart storage
Swiper.js Interactive content components
ScrollReveal Scroll-based animations
Boxicons Interface icons

Backend

Technology Purpose
Node.js Server-side JavaScript runtime
Express.js REST API and server routing
Mongoose MongoDB object modelling
CORS Frontend/backend cross-origin communication
dotenv Environment-variable management

Database

Technology Purpose
MongoDB Atlas Cloud database
Mongoose Schemas Application data modelling

Deployment & Development

Technology Purpose
Netlify Frontend deployment
Render Backend API deployment
GitHub Version control and source-code hosting
Git Source-control workflow
VS Code Development environment

๐Ÿ–ฅ๏ธ Website Pages

The application contains multiple dedicated pages:

index.html
about.html
menu.html
services.html
booking.html
cart.html
contact.html
admin.html

Home

Introduces Swa Cafe through an animated, coffee-themed landing experience.

About

Presents the cafรฉ concept and brand experience.

Menu

Displays coffee products and allows customers to add selected products to their shopping cart.

Services

Presents the services offered by Swa Cafe.

Booking

Allows customers to submit table reservations.

Cart & Checkout

Displays selected products, quantities, prices and totals before allowing customers to complete their order.

Contact

Provides a dedicated customer-contact interface.

Admin

Provides administrative access to application data and cafรฉ-management functionality.


โš™๏ธ REST API

The frontend communicates with the Express backend through REST-style API endpoints.

Orders

Method Endpoint Purpose
POST /api/orders Place a customer order
GET /api/orders Retrieve customer orders
DELETE /api/orders/:id Delete an order

Bookings

Method Endpoint Purpose
POST /api/bookings Create a table reservation
GET /api/bookings Retrieve reservations
DELETE /api/bookings/:id Delete a reservation

Products

Method Endpoint Purpose
POST /api/products Add a product

Contact

Method Endpoint Purpose
POST /api/contacts Submit a customer enquiry

๐Ÿงพ Order Data Model

Customer orders can contain information such as:

Order
โ”‚
โ”œโ”€โ”€ Customer
โ”‚   โ”œโ”€โ”€ Name
โ”‚   โ”œโ”€โ”€ Email
โ”‚   โ”œโ”€โ”€ Phone
โ”‚   โ””โ”€โ”€ Address
โ”‚
โ”œโ”€โ”€ Items
โ”‚   โ”œโ”€โ”€ Product Name
โ”‚   โ”œโ”€โ”€ Price
โ”‚   โ”œโ”€โ”€ Quantity
โ”‚   โ””โ”€โ”€ Image
โ”‚
โ”œโ”€โ”€ Total
โ”œโ”€โ”€ Payment Method
โ”œโ”€โ”€ Status
โ”œโ”€โ”€ Created Time
โ””โ”€โ”€ Updated Time

This information is persisted in MongoDB and retrieved by the administrative dashboard.


๐Ÿ›๏ธ Shopping Cart Logic

The cart is managed on the frontend using browser LocalStorage.

This provides:

  • Cart persistence between pages
  • Dynamic cart-count updates
  • Quantity tracking
  • Product removal
  • Automatic price calculations
  • Checkout order-summary generation

After a successful order is stored through the backend API, the customer's cart is automatically cleared.


๐Ÿ‘ฉโ€๐Ÿ’ผ Administrative Order Management

Orders submitted through checkout are stored in MongoDB Atlas.

The admin dashboard retrieves these records through:

GET /api/orders

Each administrative order card can display:

  • Order ID
  • Order date and time
  • Customer name
  • Customer email
  • Customer phone
  • Delivery address
  • Payment method
  • Order status
  • Products ordered
  • Quantity
  • Individual item values
  • Total order value

Administrators can remove an order through:

DELETE /api/orders/:id

The dashboard refreshes after a successful deletion.


๐Ÿ“… Administrative Booking Management

Table reservations submitted by customers are retrieved by the admin dashboard.

Administrators can view reservation information such as:

  • Customer name
  • Phone number
  • Reservation date
  • Reservation time
  • Number of guests

Reservations can also be removed from the system through the booking DELETE endpoint.


๐Ÿ“ธ Project Screenshots

๐Ÿ  Home Page

Swa Cafe Home Page

โœจ Home Features

Swa Cafe Home Features

โ˜• About Swa Cafe

About Swa Cafe

๐Ÿ“‹ Coffee Menu

Coffee Menu

๐Ÿšš Services

Services

๐Ÿ“… Table Booking

Table Booking

๐Ÿ“ฉ Contact Page

Contact Page

๐Ÿ‘ฉโ€๐Ÿ’ผ Admin Dashboard

Swa Cafe Admin Dashboard


๐Ÿ“ Project Structure

Coffee-commerce-fullstack/
โ”‚
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ images/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ server.js
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ screenshots/
โ”‚
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ about.html
โ”œโ”€โ”€ menu.html
โ”œโ”€โ”€ services.html
โ”œโ”€โ”€ booking.html
โ”œโ”€โ”€ cart.html
โ”œโ”€โ”€ contact.html
โ”œโ”€โ”€ admin.html
โ”œโ”€โ”€ style.css
โ”œโ”€โ”€ main.js
โ””โ”€โ”€ README.md

๐Ÿš€ Deployment Architecture

The project uses separate frontend and backend deployments.

Frontend

The static frontend is deployed on Netlify.

It contains:

  • HTML pages
  • CSS styling
  • JavaScript application logic
  • Product images and visual assets

Backend

The Node.js and Express REST API is deployed on Render.

The frontend communicates with the deployed API to perform operations including:

Create Order
Retrieve Orders
Delete Order
Create Booking
Retrieve Bookings
Delete Booking
Add Product
Submit Contact Request

Database

The backend communicates with MongoDB Atlas for persistent cloud data storage.


๐Ÿ” Environment Configuration

Sensitive backend configuration is managed through environment variables rather than being hard-coded into the application.

Typical backend configuration includes:

PORT=5000
MONGO_URL=your_mongodb_connection_string

Real credentials and database secrets should never be committed to the public repository.


๐Ÿ’ป Local Development

1. Clone the Repository

git clone <repository-url>
cd Coffee-commerce-fullstack

2. Install Backend Dependencies

cd backend
npm install

3. Configure Environment Variables

Create:

backend/.env

Add the required MongoDB connection configuration.

4. Start the Backend

Development mode:

npm run dev

or:

npm start

The backend uses port 5000 by default when no deployment port is provided.

5. Open the Frontend

Open the frontend using a local development server or deploy the static application to a hosting provider such as Netlify.


๐ŸŽจ UI / UX Highlights

The application focuses on creating a visually engaging cafรฉ experience through:

  • Coffee-inspired visual design
  • Glass-style cards
  • Animated backgrounds
  • Interactive product cards
  • Scroll-based animations
  • Responsive navigation
  • 3D-inspired presentation
  • Mobile-friendly layouts
  • Dynamic cart notifications
  • Smooth checkout flow

๐ŸŽฏ Skills Demonstrated

This project demonstrates practical experience with:

  • Full-stack web development
  • JavaScript application development
  • REST API design
  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • CRUD operations
  • Asynchronous JavaScript
  • Fetch API
  • JSON data exchange
  • Browser LocalStorage
  • Responsive UI development
  • Form handling
  • Client/server integration
  • Cloud database integration
  • Frontend deployment
  • Backend deployment
  • Git and GitHub version control
  • Debugging deployed full-stack applications

๐Ÿ”ฎ Future Improvements

Potential future development includes:

  • ๐Ÿ” Secure administrator authentication
  • ๐Ÿ‘ฅ Role-based access control
  • ๐Ÿ’ณ Stripe or another production payment gateway
  • ๐Ÿ“ฆ Inventory management
  • ๐Ÿ”„ Admin order-status updates
  • ๐ŸŸก Pending orders
  • ๐Ÿ”ต Preparing orders
  • ๐ŸŸข Completed orders
  • ๐Ÿšš Delivery-status tracking
  • ๐Ÿ‘ค Customer accounts
  • ๐Ÿ“ง Automated order-confirmation emails
  • ๐Ÿ“Š Admin analytics dashboard
  • ๐Ÿ”Ž Order search and filtering
  • ๐Ÿงพ Digital receipts
  • ๐Ÿงช Automated frontend and backend testing
  • โš™๏ธ CI/CD pipeline
  • ๐Ÿณ Docker containerisation
  • โ˜๏ธ Expanded cloud deployment

๐Ÿ“Œ Project Status

Current Status: Functional Full-Stack Application

The current deployed application supports the complete core workflow:

Product Selection
      โ†“
Shopping Cart
      โ†“
Checkout
      โ†“
Customer Order
      โ†“
REST API
      โ†“
MongoDB Persistence
      โ†“
Admin Order Management

Table reservations and administrative booking management are also integrated into the application.


๐Ÿ‘ฉโ€๐Ÿ’ป Developer

Developed as a full-stack portfolio project demonstrating frontend development, backend API engineering, database integration, deployment, and practical e-commerce workflow implementation.


๐Ÿ“„ License

This project is intended for educational and portfolio purposes.

About

Developed a responsive multi-page coffee e-commerce platform with interactive visual content, product browsing, cart and ordering functionality, booking and contact workflows. Built a Node.js/Express backend with MongoDB data models and REST-style routes for products, orders, bookings and customer enquiries.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages