This is an ecommerce system for ordering coffee using M-Pesa
A modern coffee ordering kiosk with M-Pesa payment integration, built with React, TypeScript, and Node.js.
## π Features
- **Modern UI/UX**: Beautiful, responsive interface built with React, TypeScript, and Tailwind CSS
- **M-Pesa Integration**: Seamless payment processing using Safaricom's M-Pesa API
- **User Authentication**: Secure login system with JWT tokens
- **Order Management**: Track and manage coffee orders
- **Admin Panel**: Administrative interface for order management
- **Real-time Updates**: Live order status updates
- **Mobile Responsive**: Optimized for all device sizes
## ποΈ Project Structure
```
coffee-and-code/
βββ client/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Application pages
β β βββ data/ # Static data (coffee products)
β β βββ lib/ # Utility functions and API
β β βββ hooks/ # Custom React hooks
β βββ package.json
βββ Backend/ # Node.js backend server
β βββ routes/ # API route handlers
β βββ middleware/ # Express middleware
β βββ utils/ # Utility functions
β βββ index.js # Main server file
βββ index.js # M-Pesa STK Push API service
βββ package.json
```
## π οΈ Technology Stack
### Frontend
- **React 18** with TypeScript
- **Vite** for fast development and building
- **Tailwind CSS** for styling
- **Shadcn/ui** for UI components
- **React Router** for navigation
- **React Query** for data fetching
- **Axios** for HTTP requests
### Backend
- **Node.js** with Express
- **MongoDB** with Mongoose for data persistence
- **JWT** for authentication
- **bcrypt** for password hashing
- **M-Pesa API** integration
## π Prerequisites
Before running this project, make sure you have:
- **Node.js** (v16 or higher)
- **npm** or **yarn** or **pnpm**
- **MongoDB** (local installation or MongoDB Atlas)
- **M-Pesa Developer Account** with sandbox cr β¦