Aesap is a full-stack web application for managing and showcasing products, inspired by the Aesop website. It consists of a backend RESTful API and a modern frontend client. The platform supports public product browsing and a CMS dashboard for admins and staff to manage content and inventory.
- Responsive public portal for browsing products and categories
- Product detail view
- User authentication (login)
- CMS dashboard for admins/staff:
- Manage products (add, edit, delete, update image)
- Manage categories
- Add staff users
- Modern UI built with React and Vite
- RESTful API for products, categories, and users
- JWT-based authentication and role-based authorization (Admin, Staff)
- CRUD operations for products and categories
- Image upload for products (Cloudinary integration)
- Public endpoints for viewing products and categories
- Error handling middleware
- Comprehensive test coverage (Jest)
- Frontend: ReactJS, Vite, Axios, React Router, SweetAlert2, CSS
- Backend: Node.js, Express.js, PostgreSQL, Sequelize ORM, JWT, Cloudinary, Multer, Jest
server/— Backend REST API (Express, Sequelize, PostgreSQL)client/— Frontend client (React, Vite)
POST /login— User loginPOST /add-user— Add new user (Admin only)
GET /products— List products (auth required)POST /products— Create product (auth required)GET /products/:id— Get product by ID (auth required)PUT /products/:id— Update product (Admin/Staff)DELETE /products/:id— Delete product (Admin/Staff)PATCH /products/:id/image-url— Update product image (Admin/Staff, Cloudinary)
GET /categories— List categoriesPOST /categories— Create categoryPUT /categories/:id— Update category
GET /pub/products— List products (public)GET /pub/categories— List categories (public)GET /pub/products/:id— Get product by ID (public)
- Clone the repository
- Install dependencies:
npm install - Setup PostgreSQL and update
config/config.json - Run migrations and seeders:
npx sequelize-cli db:migrate && npx sequelize-cli db:seed:all - Start server:
npm run dev
- Navigate to client folder
- Install dependencies:
npm install - Start development server:
npm run dev
- Backend: Create a
.envfile for sensitive configs (e.g., JWT secret, Cloudinary keys) - Frontend: Configure API base URL in
src/lib/http.jsif needed
- Backend: Run tests with
npm test
This project is intended solely for educational purposes as part of a bootcamp assignment. It is not intended to copy or infringe upon the original Aesop website and is not affiliated with or endorsed by Aesop.