A modern e-commerce platform for construction materials and hardware supplies built with React, TypeScript, and Tailwind CSS.
- 🛍️ Browse products by category
- 🔍 Search functionality
- 🛒 Shopping cart management
- 👤 User authentication
- 📦 Order tracking
- 💳 Secure checkout process
- 📱 Responsive design
- 🗺️ Store location map
- 📞 Contact form
- Frontend Framework: React with TypeScript
- Styling: Tailwind CSS
- State Management: Zustand
- Form Handling: React Hook Form with Zod validation
- Icons: Lucide React
- Testing: Vitest + React Testing Library
- Build Tool: Vite
- HTTP Client: Axios
src/
├── components/ # Reusable UI components
├── data/ # Static data and mock data
├── pages/ # Page components
├── services/ # API services
├── store/ # State management
├── tests/ # Unit tests
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Run tests:
npm test
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm test
- Run testsnpm run test:coverage
- Generate test coverage reportnpm run lint
- Run ESLint
Navbar
- Main navigation barProductCard
- Product display cardEmptyState
- Empty state placeholderLoadingSpinner
- Loading indicatorLocationMap
- Store location map
Home
- Landing page with featured productsProducts
- Product listing with filtersProductDetail
- Detailed product viewCart
- Shopping cart managementCheckout
- Order checkout processProfile
- User profile managementOrderHistory
- Order trackingContact
- Contact form and store information
The application uses Zustand for state management with the following stores:
useAuth
- Authentication stateuseCart
- Shopping cart state
Tests are written using Vitest and React Testing Library. Run tests with:
npm test
Generate coverage report:
npm run test:coverage
The application integrates with a RESTful API using Axios. API services are organized in the services
directory:
authAPI
- Authentication endpointsproductsAPI
- Product managementordersAPI
- Order managementuserAPI
- User profile managementpaymentAPI
- Payment processing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.