Welcome to the Ecommerce React repository! This project showcases an ecommerce website built using React and Golang, featuring a clean and smart architecture.
- Features
- Technologies Used
- Installation
- Usage
- API Documentation
- Architecture
- Contributing
- License
- Contact
- User authentication with JWT
- Product management
- Shopping cart functionality
- Order processing
- Admin dashboard for managing products and orders
- Real-time data monitoring with Grafana and Prometheus
- Scalable architecture using Docker and Kubernetes
This project employs a variety of technologies to ensure performance and scalability:
- Frontend: React
- Backend: Golang with Gin Gonic
- Database: PostgreSQL
- Caching: Redis
- Storage: MinIO
- Web Server: Nginx
- Monitoring: Grafana and Prometheus
- API Documentation: Swagger
- Containerization: Docker
To get started with the Ecommerce React project, follow these steps:
-
Clone the repository:
git clone https://github.com/wxcvbni838/ecommerce-react.git
-
Navigate to the project directory:
cd ecommerce-react
-
Set up the backend:
- Navigate to the backend folder:
cd backend
- Install the necessary dependencies:
go mod tidy
- Navigate to the backend folder:
-
Set up the frontend:
- Navigate to the frontend folder:
cd ../frontend
- Install the necessary dependencies:
npm install
- Navigate to the frontend folder:
-
Create a
.env
file in both backend and frontend folders to configure your environment variables. You can refer to the.env.example
files for guidance. -
Start the backend server:
go run main.go
-
Start the frontend server:
npm start
Now you can access the application at http://localhost:3000
.
Once the application is running, you can explore the following features:
- User Registration and Login: Create an account or log in to your existing account.
- Browse Products: View the available products in the store.
- Add to Cart: Add products to your shopping cart for purchase.
- Checkout: Complete your purchase through a secure checkout process.
- Admin Dashboard: If you log in as an admin, you can manage products and view orders.
For detailed API documentation, you can refer to the Swagger UI. Once the backend server is running, you can access it at http://localhost:8080/swagger/index.html
.
The Ecommerce React project follows a clean architecture approach, separating concerns and ensuring maintainability. Here’s a brief overview of the architecture:
- Frontend: The React application serves as the client interface, handling user interactions and displaying data.
- Backend: The Golang server processes requests, interacts with the database, and serves API endpoints.
- Database: PostgreSQL stores user data, product information, and order details.
- Caching: Redis is used for caching frequently accessed data, improving performance.
- File Storage: MinIO serves as an object storage solution for product images and other files.
- Monitoring: Grafana and Prometheus are integrated for real-time monitoring of application performance.
We welcome contributions! If you want to contribute to the Ecommerce React project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeatureName
- Make your changes and commit them:
git commit -m "Add your message here"
- Push to the branch:
git push origin feature/YourFeatureName
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or suggestions, feel free to reach out:
- Author: Your Name
- Email: your.email@example.com
- GitHub: Your GitHub Profile
For the latest updates and releases, please visit the Releases section. You can download the latest version and execute it as needed.
Happy coding!