Welcome to H-Shop! This is a simple e-commerce website that I built to practice my full-stack development skills. The website is built with NextJS, MongoDB, and Redux.
Project Live Demo
- Docker Deployment: Upcoming
- Vercel Deployment: Upcoming
If you like the project, please give it a star. It will help me to keep going and improve the project. Thank you!
As a backend developer, my frontend skills are not as good as my backend skills. After a interview for full-stack position, I realized that I need to improve my frontend skills. So I decided to build a e-commerce website to practice my frontend skills.
- Built a complete, well-structured, and scalable e-commerce website.
- Improved my frontend skills, especially in React, Redux, and NextJS.
- Use a series cutting-edge technologies: NextJS, TailwindCSS, Headless UI, Redux-Toolkit-RTK query, JWT, Docker, and MongoDB, etc.
- Focus on frontend (user interface and user experience), backend is simple enough to support the frontend.
Technologies that I used in this project:
- TypeScript: main language.
- NextJS: main framework.
- TailwindCSS: for CSS styling.
- Headless UI: for UI components.
- Redux Toolkit: for state management.
- RTK Query: A powerful data fetching and caching tool.
- JWT: for aauthentication.
- MongoDB: for database.
- Docker: for deployment.
Upcoming
๐๏ธ H-Shop Project Structure:
Key structure explanation:
-
๐ app: Main code of the application
- ๐ main: Main application components
- ๐ client-layout: Common layout pages for the user side
- ๐ empty-layout: Common blank layout pages
- ๐ admin: Admin pages
- ๐ layout.ts: Main layout configuration
- ๐ profile: User profile page
- ๐ StoreProvider.js: Global state management provider
- ๐ api: API request-related routes
- ๐ auth: User authentication API
- ๐ banner: Advertisement banner API
- ๐ category: Product category API
- ...
- ๐ main: Main application components
-
๐ components: Reusable React components
-
๐ helpers: Helper functions and tools
- ๐ api: API request-related helper functions
- ๐ auth.ts: Helper functions related to user authentication
- ...
-
๐ hooks: Custom React hooks
-
๐ models: Data model definitions
-
๐ public: Static resources, such as images, fonts, etc.
-
๐ store: Configuration related to Redux state management
- ๐ services: RTK Query
- ๐ slices: Redux Toolkit
-
๐ styles: Style files
-
๐ utils: General utilities
-
...
This structure is designed to make project easy to navigate and maintain. It is also scalable and easy to expand.
- Clone the project
```bash
git clone https://github.com/vanhung4499/h-shop.git
- Installl dependencies
npm install
# OR
yarn install
- Modify the environment variables
cp .env.example .env.local
- Start MongoDB server
You can run mongodb server locally or use docker for create an instance. I have already included a docker-compose file for this purpose.
docker-compose up -d mongodb
I have already included a docker-compose file for this purpose. You can start the project with the following command:
docker-compose up -d
This project is hosted on Vercel. You can deploy the project on Vercel by following these steps:
Upcoming...
Copyright (c) 2024 Hung Nguyen