- Overview
- Features
- Tech Stack
- Project Structure
- Screenshots
- Getting Started
- Docker Setup
- API Documentation
- Contributing
- License
Hanouti Store is a full-featured e-commerce platform built with modern web technologies. The name "Hanouti" means "my shop" in Arabic, reflecting the platform's focus on providing a personalized shopping experience for users in Tunisia and beyond.
The application features a responsive design, robust user authentication, product management, shopping cart functionality, and secure payment processing with both online payments via Stripe and cash-on-delivery options.
- Email-based registration with verification
- Login and logout functionality
- Google authentication integration
- Password recovery via OTP
- User profile management with avatar uploads
- Category and subcategory organization
- Product search and filtering
- Product detail views with multiple images
- Admin dashboard for product management
- Add to cart functionality
- Cart management (update quantities, remove items)
- Address management for delivery
- Order tracking
- Stripe integration for online payments
- Cash on delivery option
- Order confirmation and history
- Product upload and management
- Category and subcategory management
- Comprehensive dashboard
- Next.js: React framework for server-rendered applications
- Redux Toolkit: State management with Redux Persist for local storage
- Tailwind CSS: Utility-first CSS framework
- Framer Motion: Animation library
- Axios: HTTP client
- React Hook Form: Form validation
- React Hot Toast: Toast notifications
- Express.js: Web framework for Node.js
- MongoDB: NoSQL database with Mongoose ODM
- JWT: Authentication with JSON Web Tokens
- Bcrypt: Password hashing
- Multer: File uploads
- Resend: Email service integration
- Stripe: Payment processing
- Docker & Docker Compose: Containerization
- Environment Variables: Configuration management
The project follows a client-server architecture with clear separation of concerns:
hanouti-store/
βββ client/ # Frontend Next.js application
β βββ app/ # Next.js app router
β βββ components/ # Reusable UI components
β βββ api/ # API client configurations
β βββ lib/ # Utility functions
β βββ providers/ # Context providers
β βββ store/ # Redux store setup
β βββ public/ # Static assets
β
βββ server/ # Backend Express.js application
β βββ config/ # Configuration files
β βββ controllers/ # Route controllers
β βββ middleware/ # Custom middleware
β βββ models/ # Mongoose data models
β βββ routes/ # API routes
β βββ utils/ # Utility functions
β
βββ docker-compose.yml # Docker Compose configuration
- Node.js (v16 or higher)
- MongoDB
- npm or yarn
- Stripe account for payment processing
- Resend account for email services
-
Clone the repository:
git clone https://github.com/yourusername/hanouti-store.git cd hanouti-store -
Set up the server:
cd server npm install # Create a .env file with necessary environment variables npm run dev
-
Set up the client:
cd ../client npm install # Create a .env.local file with necessary environment variables npm run dev
-
Access the application at http://localhost:3000
For easy deployment, the project is containerized using Docker:
-
Make sure Docker and Docker Compose are installed on your machine.
-
Create environment files:
- Create
.envin the server directory - Create
.env.localin the client directory
- Create
-
Build and run the containers:
docker-compose up -d
-
Access the application at http://localhost:3000
The backend provides a RESTful API with the following main endpoints:
POST /api/user/signup- Register a new userPOST /api/user/verify-email- Verify user emailPOST /api/user/signin- User loginGET /api/user/signout- User logoutPOST /api/user/forget-password- Password recoveryPOST /api/user/verify-otp- Verify OTP for password recoveryPUT /api/user/reset-password- Reset password
GET /api/product/get-products- Get products with paginationGET /api/product/productDetails- Get single product detailsGET /api/product/search-product- Search productsPOST /api/product/create-product- Create product (admin)PUT /api/product/update-product- Update product (admin)DELETE /api/product/delete-product- Delete product (admin)
GET /api/category/get-categories- Get all categoriesPOST /api/category/add-category- Add category (admin)PUT /api/category/update-category- Update category (admin)DELETE /api/category/delete-category- Delete category (admin)
GET /api/cart/get-cart- Get user's cartPOST /api/cart/add-cart- Add item to cartPUT /api/cart/update-cart- Update cart itemDELETE /api/cart/delete-cart- Remove item from cartPOST /api/order/cash-on-delivery- Create cash on delivery orderPOST /api/order/payment- Process online paymentGET /api/order/order-details- Get user's orders
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License
Built with β€οΈ by Mohamed Amine Ammar
