A modern, full-featured shoe store application with separate admin and customer interfaces built with React and JSON Server.
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Running the Application
- API Endpoints
- User Roles
- Development Workflow
- Database Schema
- ✅ Browse products by category
- ✅ View detailed product information with images
- ✅ Add products to favorites/wishlist
- ✅ Shopping cart management
- ✅ Secure checkout process
- ✅ Order tracking with status updates
- ✅ Write product reviews and ratings
- ✅ Manage multiple shipping addresses
- ✅ View order history
- ✅ Real-time notifications
- ✅ User profile management
- ✅ Complete product management (CRUD operations)
- ✅ Inventory management by size and color
- ✅ Stock level tracking with alerts
- ✅ Order management (accept/reject/update status)
- ✅ Customer management
- ✅ Purchase orders to suppliers
- ✅ Inventory log tracking
- ✅ Low stock notifications
- ✅ Dashboard with analytics
- ✅ Warehouse management
- React - UI Library
- React Router DOM - Routing
- Context API - State Management
- Axios - HTTP Client
- CSS Modules / Tailwind CSS - Styling
- JSON Server - Mock REST API
- JSON Server Auth - Authentication (optional)
shoe-store-app/
├── public/
│ └── index.html
│
├── src/
│ ├── assets/
│ │ └── images/
│ │
│ ├── components/
│ │ ├── admin/
│ │ │ ├── AdminNavbar.jsx
│ │ │ ├── AdminSidebar.jsx
│ │ │ ├── InventoryTable.jsx
│ │ │ ├── OrderTable.jsx
│ │ │ ├── ProductForm.jsx
│ │ │ └── StockOrderForm.jsx
│ │ │
│ │ ├── customer/
│ │ │ ├── CustomerNavbar.jsx
│ │ │ ├── ProductCard.jsx
│ │ │ ├── CartItem.jsx
│ │ │ ├── ReviewForm.jsx
│ │ │ └── OrderCard.jsx
│ │ │
│ │ └── shared/
│ │ ├── Header.jsx
│ │ ├── Footer.jsx
│ │ ├── Loader.jsx
│ │ ├── Modal.jsx
│ │ └── Notification.jsx
│ │
│ ├── context/
│ │ ├── AuthContext.jsx
│ │ ├── CartContext.jsx
│ │ └── NotificationContext.jsx
│ │
│ ├── hooks/
│ │ ├── useAuth.js
│ │ ├── useCart.js
│ │ └── useFetch.js
│ │
│ ├── pages/
│ │ ├── admin/
│ │ │ ├── Dashboard.jsx
│ │ │ ├── ProductManagement.jsx
│ │ │ ├── InventoryManagement.jsx
│ │ │ ├── OrderManagement.jsx
│ │ │ └── StockOrders.jsx
│ │ │
│ │ ├── customer/
│ │ │ ├── Home.jsx
│ │ │ ├── ProductList.jsx
│ │ │ ├── ProductDetail.jsx
│ │ │ ├── Cart.jsx
│ │ │ ├── Checkout.jsx
│ │ │ ├── Orders.jsx
│ │ │ ├── Profile.jsx
│ │ │ └── Favorites.jsx
│ │ │
│ │ ├── auth/
│ │ │ ├── Login.jsx
│ │ │ └── Register.jsx
│ │ │
│ │ └── shared/
│ │ ├── NotFound.jsx
│ │ └── Unauthorized.jsx
│ │
│ ├── routes/
│ │ ├── PrivateRoute.jsx
│ │ ├── AdminRoute.jsx
│ │ └── CustomerRoute.jsx
│ │
│ ├── services/
│ │ ├── api.js
│ │ ├── authService.js
│ │ ├── productService.js
│ │ ├── orderService.js
│ │ ├── inventoryService.js
│ │ └── cartService.js
│ │
│ ├── utils/
│ │ ├── constants.js
│ │ ├── helpers.js
│ │ └── validators.js
│ │
│ ├── styles/
│ │ ├── global.css
│ │ ├── admin.css
│ │ └── customer.css
│ │
│ ├── App.jsx
│ └── index.js
│
├── json-server-backend/
│ ├── db.json
│ └── routes.json (optional)
│
├── .gitignore
├── package.json
└── README.md
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- npm or yarn
- Git
git clone https://github.com/yourusername/shoe-store-app.git
cd shoe-store-appnpm install
# or
yarn installnpm install -g json-server
# or install locally
npm install json-server --save-devcd json-server-backend
# db.json should already be present with all the schemaOpen a terminal and run:
cd json-server-backend
json-server --watch db.json --port 3000JSON Server will run on: http://localhost:3000
Open another terminal and run:
npm start
# or
yarn startReact App will run on: http://localhost:3001
- Customer Portal:
http://localhost:3001 - Admin Portal:
http://localhost:3001/admin - API Server:
http://localhost:3000
Email: [email protected]
Password: admin123
Email: [email protected]
Password: customer123
Email: [email protected]
Password: customer123
GET /products- Get all productsGET /products/:id- Get single productPOST /products- Create product (Admin)PUT /products/:id- Update product (Admin)PATCH /products/:id- Partial update (Admin)DELETE /products/:id- Delete product (Admin)
GET /categories- Get all categories
GET /admins?email={email}&password={password}- Admin loginGET /customers?email={email}&password={password}- Customer loginPOST /customers- Register new customer
GET /customerFavorites?customerId={id}- Get favoritesPOST /customerFavorites- Add to favoritesDELETE /customerFavorites/:id- Remove from favoritesGET /customerCart?customerId={id}- Get cartPOST /customerCart- Add to cartPUT /customerCart/:id- Update cartDELETE /customerCart/:id- Clear cartGET /customerOrders?customerId={id}- Get customer ordersPOST /customerOrders- Place orderGET /customerReviews?productId={id}- Get product reviewsPOST /customerReviews- Add reviewGET /customerNotifications?customerId={id}- Get notifications
GET /adminInventory- Get all inventoryGET /adminInventory?productId={id}- Get product inventoryPOST /adminInventory- Add inventoryPUT /adminInventory/:id- Update stockGET /adminInventoryLog- Get inventory historyPOST /adminInventoryLog- Log inventory changeGET /adminStockOrders- Get purchase ordersPOST /adminStockOrders- Create purchase orderPUT /adminStockOrders/:id- Update PO statusGET /adminNotifications?adminId={id}- Get admin notificationsGET /customerOrders- Get all orders (Admin view)PUT /customerOrders/:id- Update order status
- ✅ Setup React app and JSON Server
- ✅ Create folder structure
- ✅ Setup routing with React Router
- ✅ Implement authentication (login/register)
- ✅ Create AuthContext
- ✅ Build basic layout components
- ✅ Product listing page with filters
- ✅ Product detail page
- ✅ Shopping cart functionality
- ✅ Favorites/Wishlist
- ✅ Checkout process
- ✅ Order history
- ✅ Admin dashboard
- ✅ Product management (CRUD)
- ✅ Inventory management
- ✅ Order management
- ✅ Stock ordering system
- ✅ Reviews and ratings
- ✅ Notifications system
- ✅ Search functionality
- ✅ Filters and sorting
- ✅ Responsive design
- ✅ Form validations
- ✅ Error handling
- ✅ Loading states
- ✅ Toast notifications
- ✅ Performance optimization
- ✅ Testing
- ✅ Deployment
{
"id": 1,
"name": "Classic Running Shoes",
"brand": "Nike",
"price": 89.99,
"sizes": [8, 9, 10, 11, 12],
"colors": ["Black", "White"],
"category": "Running",
"images": ["url1", "url2"],
"description": "...",
"features": ["..."],
"isActive": true,
"averageRating": 4.5,
"totalReviews": 120
}{
"id": 1,
"email": "[email protected]",
"password": "customer123",
"role": "customer",
"firstName": "John",
"lastName": "Doe",
"addresses": [...]
}{
"id": 1,
"productId": 1,
"size": 10,
"color": "Black",
"stock": 50,
"reorderLevel": 5,
"status": "in_stock",
"warehouse": "Warehouse A"
}{
"id": 1,
"orderNumber": "ORD-2025-0001",
"customerId": 1,
"status": "pending",
"items": [...],
"total": 239.79,
"shippingAddress": {...}
}import styles from './ProductCard.module.css';
<div className={styles.card}>...</div><div className="bg-white rounded-lg shadow-md p-4">...</div>import styled from 'styled-components';
const Card = styled.div`
background: white;
border-radius: 8px;
`;- Store JWT tokens securely
- Validate all inputs on frontend and backend
- Use HTTPS in production
- Implement rate limiting
- Sanitize user inputs
- Use environment variables for sensitive data
- Mobile First Approach
- Breakpoints:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
# Run tests
npm test
# Run tests with coverage
npm test -- --coverage# Create production build
npm run build
# The build folder will contain optimized filesnpm run build
# Deploy the build folder# JSON Server can be deployed as Node.js app- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
Your Name
- GitHub: @yourusername
- Email: [email protected]
- React Documentation
- JSON Server
- Ironhack Bootcamp
For support, email [email protected] or join our Slack channel.
- Issue 1
- Issue 2
- Initial release
- Basic customer and admin features
- Product catalog with inventory management
- Order processing system
Happy Coding! 🚀