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: admin@shoestore.com
Password: admin123
Email: john@example.com
Password: customer123
Email: jane@example.com
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": "john@example.com",
"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: your.email@example.com
- React Documentation
- JSON Server
- Ironhack Bootcamp
For support, email support@shoestore.com 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! π