This repository contains the codebase for the Perfume application, including the backend server, admin panel, and client application.
- Authentication: Admin and user authentication with OTP-based login.
- User Management: Manage admin users and their permissions.
- Product Management: Add, update, and manage products.
- Category Management: Add, update, and manage categories and tags.
- Carousel Management: Manage homepage carousels.
- Cart Management: Add, update, and remove items from the cart.
- Media Management: Upload and delete unused media files.
-
Install dependencies:
cd server npm install -
Configure environment variables in
.env:DATABASE_URL= # Database connection string JWT_SECRET= # Secret for JWT
-
Run the server:
npm start
Refer to the Server README for detailed API documentation.
- Authentication: Login, logout, password reset, and OTP-based verification.
- User Management: Add, update, and delete admin users with role-based permissions.
- Product Management: Add, update, and manage products and their media.
- Category Management: Add, update, and view categories and tags.
- Carousel Management: Add, update, and delete carousel items.
- Media Upload: Upload and manage media files using UploadThing.
-
Install dependencies:
cd admin yarn install -
Configure environment variables in
.env.local:SERVER_HOST= # Backend server host UPLOADTHING_TOKEN= # UploadThing API token UPLOADTHING_APP_ID= # UploadThing App ID UPLOAD_TOKEN= # Upload token
-
Start the development server:
yarn dev
-
Open http://localhost:3000 in your browser.
src/app: Contains Next.js pages and layouts.src/components: Reusable UI components.src/assets: Static assets like images.src/lib: Utility functions and types.src/hooks: Custom React hooks.src/services: API service functions for interacting with the backend.
- Product Listings: Display a list of products with details.
- Search and Filter: Search for products and apply filters.
- Shopping Cart: Add, remove, and update items in the cart.
- User Authentication: Login and signup functionality.
- Order Management: Place and view orders.
- Responsive Design: Optimized for both desktop and mobile devices.
-
Install dependencies:
cd client npm install -
Configure environment variables in
.env:REACT_APP_SERVER_HOST= # Backend server host -
Start the development server:
npm start
-
Open http://localhost:3000 in your browser.
- React: A JavaScript library for building user interfaces.
- TypeScript: A strongly typed programming language that builds on JavaScript.
- Vite: A fast build tool and development server.
- React Router: For handling client-side routing.
- Axios: For making HTTP requests to the backend server.
- Tailwind CSS: A utility-first CSS framework for styling.
- Redux Toolkit: For state management.
- React Query: For data fetching and caching.
- ESLint: For linting and maintaining code quality.
- Prettier: For code formatting.
This project is licensed under the MIT License.