A modern cake ordering website with authentication, cart, checkout, and Stripe payment integration.
- 👤 User authentication (JWT-based)
- 🍰 Browse cakes and add to cart
- 🛒 Cart & checkout system
- 💳 Payment integration with Stripe
| Layer | Technology |
|---|---|
| Frontend | React |
| Backend | Node.js + Express |
| Database | MongoDB |
| Auth | JWT (JSON Web Tokens) |
| Payments | Stripe (test mode) |
git clone https://github.com/NguyenSwan/cake-website.git
cd cake-websitecd backend
npm installcd frontend
npm installcd admin
npm installCreate a .env file in /backend and add:
JWT_SECRET="random#secret"
STRIPE_SECRET_KEY="..."👉 Users should replace it with their own Stripe test/live key.
🚫 Never commit your real keys to GitHub.
npm run servernpm run devcake-website/
├── backend/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── middleware/
│ └── server.js
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ └── ...
└── README.md
| Variable | Description |
|---|---|
JWT_SECRET |
Secret key for signing JWT tokens |
STRIPE_SECRET_KEY |
Stripe API secret key (test/live) |
-
Use Postman or Thunder Client to test API endpoints.
-
Use Stripe test cards for checkout (e.g. 4242 4242 4242 4242).
MIT License © 2025 Nguyen Thien Nga