Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🎂 Cake Website

A modern cake ordering website with authentication, cart, checkout, and Stripe payment integration.


✨ Features

  • 👤 User authentication (JWT-based)
  • 🍰 Browse cakes and add to cart
  • 🛒 Cart & checkout system
  • 💳 Payment integration with Stripe

🛠️ Tech Stack

Layer Technology
Frontend React
Backend Node.js + Express
Database MongoDB
Auth JWT (JSON Web Tokens)
Payments Stripe (test mode)

🚀 Installation & Setup

1. Clone repository

git clone https://github.com/NguyenSwan/cake-website.git
cd cake-website

2. Install dependencies

Backend

cd backend
npm install

Frontend

cd frontend
npm install

Admin

cd admin
npm install

3. Environment variables

Create a .env file in /backend and add:

JWT_SECRET="random#secret"
STRIPE_SECRET_KEY="..."

⚠️ Note: The STRIPE_SECRET_KEY above is a test key.

👉 Users should replace it with their own Stripe test/live key.

🚫 Never commit your real keys to GitHub.

4. Run backend server

npm run server

5. Run frontend app

npm run dev

📁 Project Structure

cake-website/
├── backend/
│   ├── controllers/
│   ├── models/
│   ├── routes/
│   ├── middleware/
│   └── server.js
├── frontend/
│   ├── public/
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   └── ...
└── README.md

🔐 Environment Variables

Variable Description
JWT_SECRET Secret key for signing JWT tokens
STRIPE_SECRET_KEY Stripe API secret key (test/live)

🧪 Testing

  • Use Postman or Thunder Client to test API endpoints.

  • Use Stripe test cards for checkout (e.g. 4242 4242 4242 4242).


📄 License

MIT License © 2025 Nguyen Thien Nga

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages