A modern, AI-powered Point of Sale (POS) system built with React frontend and FastAPI backend, featuring MongoDB integration for data persistence.
- Modern UI: Beautiful, responsive React frontend with real-time updates
- AI Analytics: Machine learning-powered demand prediction and analytics
- MongoDB Integration: Persistent data storage with real-time synchronization
- Session Management: Complete shop session tracking and management
- Inventory Management: Real-time inventory tracking with low-stock alerts
- Customer Management: Customer database with purchase history
- Billing System: Complete transaction processing with multiple payment methods
- Real-time Dashboard: Live analytics and business insights
- React 18 with Vite
- Modern CSS with custom design system
- Axios for API communication
- Context API for state management
- FastAPI with async/await support
- MongoDB with Motor (async driver)
- Pydantic for data validation
- Uvicorn ASGI server
- Python 3.11+
- Node.js 18+
- MongoDB Atlas account (free tier available)
git clone https://github.com/hitman298/smartpos-ai.git
cd smartpos-aicd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Mac
pip install -r requirements.txt
python working_mongodb_server.pycd frontend
npm install
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- API Docs: http://localhost:5000/docs
smartpos-ai/
├── backend/
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ ├── models/ # Database models
│ │ ├── ml/ # Machine learning modules
│ │ └── services/ # Business logic
│ ├── working_mongodb_server.py # Main server file
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── services/ # API services
│ │ └── contexts/ # React contexts
│ └── package.json
└── README.md
GET /- API health checkGET /items/- Get all itemsPOST /transactions/- Create new transactionGET /sessions/- Get all sessionsPOST /sessions/open- Open new sessionPOST /sessions/close- Close current sessionGET /customers/- Get all customersGET /dashboard/overview- Get dashboard data
- Dashboard: Real-time analytics and overview
- Billing: Transaction processing and cart management
- Inventory: Item and stock management
- Customers: Customer database management
- Sessions: Shop session management
- Analytics: Advanced business analytics
cd backend
python working_mongodb_server.pycd frontend
npm run devThe application uses MongoDB Atlas for data persistence. All data is automatically saved and synchronized across sessions.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
hitman298 - GitHub Profile