A comprehensive Point of Sale (POS) system with multi-branch support, inventory management, online ordering, and role-based access control.
- Multi-branch Management: Create and manage multiple branches under one company
- Role-based Access: Admin and Cashier roles with different permissions
- Product Management: Central product catalog with branch-specific inventory
- Sales Processing: Fast and intuitive POS interface for cashiers
- Invoice Generation: Professional PDF invoices with print support
- Sales Reports: Comprehensive reports with filters and analytics
- Dashboard: Real-time KPIs, low stock alerts, and sales trends
- Public Storefront: Customers can browse products by branch
- Real-time Inventory: Live stock availability checking
- Order Management: Complete order lifecycle (Pending β Accepted β Ready β Out for Delivery β Delivered)
- Order Tracking: Customers can track their orders
- Branch Selection: Customers choose which branch to order from
- New Order Notifications: Real-time alerts for cashiers
- JWT Authentication: Secure token-based authentication
- Google OAuth: Sign in with Google integration
- Password Reset: Forgot password functionality with email
- Multi-tenancy: Complete data isolation between companies
- Branch-specific Stock: Track inventory per branch
- Low Stock Alerts: Automatic notifications when stock runs low
- Stock Adjustments: Easy quantity and threshold management
- Product Catalog: Central product database with pricing
RetailMaster.API/
βββ Controllers/
βββ DTOs/
βββ Models/
βββ Services/
βββ Data/
βββ Migrations/
βββ Program.cs
RetailMaster.Client/
βββ public/
βββ src/
β βββ components/
β βββ context/
β βββ layouts/
β βββ pages/
β β βββ Online/
β βββ services/
β βββ App.jsx
β βββ main.jsx
β βββ index.css
βββ .env
βββ index.html
βββ package.json
βββ tailwind.config.js
βββ vite.config.js
- .NET 9.0 - Web API framework
- Entity Framework Core - ORM and database access
- PostgreSQL - Primary database
- JWT - Authentication
- BCrypt - Password hashing
- Google.Apis.Auth - Google OAuth verification
- Swagger/OpenAPI - API documentation
- React 18 - UI library
- Vite - Build tool and dev server
- React Router DOM - Routing
- Axios - HTTP client
- Framer Motion - Animations
- Tailwind CSS - Styling
- DaisyUI - UI components
- Bootstrap Icons - Icon set
- Clone the repository
git clone https://github.com/yourusername/retailmaster.git
cd retailmaster/RetailMaster.API-
Configure database connection
Update
appsettings.jsonor createappsettings.Development.json:
{
"ConnectionStrings": {
"DefaultConnection": "Host=localhost;Database=retailmaster;Username=postgres;Password=yourpassword"
},
"Jwt": {
"Key": "your-super-secret-jwt-key-with-at-least-32-characters",
"Issuer": "RetailMaster",
"Audience": "RetailMasterUsers",
"ExpireMinutes": 60
},
"Google": {
"ClientId": "your-google-client-id.apps.googleusercontent.com"
},
"Frontend": {
"Url": "http://localhost:5173"
},
"Email": {
"SmtpHost": "smtp.gmail.com",
"SmtpPort": "587",
"SmtpUser": "your-email@gmail.com",
"SmtpPass": "your-app-password",
"FromEmail": "your-email@gmail.com",
"FromName": "RetailMaster"
}
}- Run migrations
dotnet ef database update- Run the API
dotnet runThe API will be available at https://localhost:7000 and Swagger UI at https://localhost:7000/swagger
- Navigate to client directory
cd ../RetailMaster.Client- Install dependencies
npm install- Create .env file
VITE_API_BASE_URL=https://localhost:7000/api
VITE_GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com- Run the development server
npm run devThe app will be available at http://localhost:5173
- Create Company: Sign up at
/create-company - Add Branches: Navigate to Branches page and add branches
- Add Products: Add products to catalog and assign stock to branches
- Manage Staff: View and manage users in Settings
- View Reports: Analyze sales data in Reports section
- Register: Use branch invite code at
/register - Process Sales: Use POS interface to ring up customers
- Manage Orders: Handle online orders in the Orders dashboard
- Check Inventory: View products and stock levels
- Browse: Visit the public site at
/online - Select Branch: Choose a branch to order from
- Add to Cart: Select products and quantities
- Checkout: Enter delivery details and place order
- Track: Receive order number for tracking
Customer β Select Branch β Browse Products β Add to Cart β
Checkout β Order Placed β Cashier Accepts β Ready for Pickup β
Out for Delivery β Delivered
Cashier β Select Branch β Scan/Search Products β
Add to Cart β Apply Discount β Complete Sale β
Print Invoice β Update Inventory
Admin β Add Product β Assign to Branches β
Set Stock Levels β Monitor Low Stock β
Adjust as Needed
- Companies - Tenant information
- Branches - Branch details with invite codes
- Users - Staff accounts with roles
- Products - Central product catalog
- BranchProducts - Branch-specific inventory
- Sales - POS transactions
- SaleItems - Individual sale items
- OnlineOrders - Customer orders
- OnlineOrderItems - Order line items
- PasswordResets - Password reset tokens
- JWT Authentication with role-based claims
- Password Hashing using BCrypt
- Multi-tenancy - Complete data isolation
- Soft Delete - Data is never permanently deleted
- CORS - Configured for specific origins
- Input Validation - All DTOs validated
- SQL Injection Protection - Entity Framework
- XSS Protection - React's built-in escaping
The frontend is fully responsive and works on:
- Desktop - Full sidebar layout
- Tablet - Collapsible sidebar
- Mobile - Bottom navigation bar
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request


















