🏍️ Project Overview: The Bike Store is an e-commerce platform where users can browse, filter, and purchase bikes. The platform includes authentication, product management, checkout, and a role-based admin dashboard.
🔐 User Authentication
- Secure Registration & Login (JWT-based authentication)
- Role-based access control (Customer, Admin)
- Logout functionality
🛒 Product Management:
- View all bikes with search & filter options
- Product details page with a "Buy Now" button
- Admin CRUD operations: Add, update, delete products
💳 Checkout & Orders
- Order form with stock validation
- Total price calculation
- Integrated SurjoPay payment gateway
- User can view and track orders in the dashboard
- Admin can manage and update order status
🎯 Dashboard Features
Customer Dashboard
- View and track orders
- Update user profile
- Update user password
Admin Dashboard
- Product Management: Add, update, delete products
- Order Management: View and update order status
- User Management: View all users, update status("blocked", "in-progress")
🎨 UI/UX & Responsiveness
- Responsive Design (Mobile, Tablet, Desktop)
- Loading states, error handling, and notifications
- Toast notifications for important actions
🏗️ Tech Stack
- Frontend: React, Redux Toolkit, TypeScript, TailwindCSS, Ant Design
- State Management: Redux Toolkit & React Query
- 💳 Secure Payment System:
This project integrates SurjoPay, a reliable and secure payment gateway, to manage customer payments efficiently. Here are the key benefits of using SurjoPay:
- Encryption: End-to-end encryption to protect sensitive financial data.
- Fraud Prevention: Advanced mechanisms to detect and prevent fraudulent transactions.
- Seamless Checkout: Provides a fast and user-friendly checkout experience for customers.
- Multi-currency Support: Allows customers to pay using various currencies.
- Payment Status: Automatic order status updates based on payment confirmations.
- Customer places an order via
/api/orders
. - SurjoPay processes the payment.
- Upon successful payment, the order is marked as "Paid" in the system.
- Payment confirmation or failure is handled through secure callbacks.
Ensure you have the following installed:
- npm or yarn
git clone https://github.com/gopalbasak1/Bike-Shop-Frontend
cd Bike-Store-Frontend
npm install
- Create a redux file and add baseApi configure your API URL:
http://localhost:5000/api/v1 # Replace with your backend URL
- Development: Start the frontend with hot reloading:
npm run dev
- Production: Build and start the server: Start the server with hot reloading:
npm run build
npm start:prod
npm run dev
: Run the fronted in development mode with hot reload.npm run build
: Build the project using TypeScript.
📦 bike-store-frontend
├── 📂 src
│ ├── 📂 components # Reusable UI components
│ ├── 📂 pages # Application pages (Home, Product, Checkout, etc.)
│ ├── 📂 features # Redux slices & state management
│ ├── 📂 hooks # Custom React hooks
│ ├── 📂 services # API services using RTK Query
│ ├── 📂 utils # Utility functions
│ ├── 📂 assets # Images, icons, and static files
│ ├── App.tsx # Main App component
│ ├── main.tsx # Entry point
├── .eslintrc.json # ESLint configuration
├── tailwind.config.js # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
- Keep components modular and reusable
- Use Redux Toolkit for state management
- Optimize API calls using React Query
- Maintain accessibility (ARIA attributes, semantic HTML)
This project is licensed under the MIT License. See the LICENSE file for details.