Point‑of‑Sale (POS) system for restaurants, cafes, hotels, and food trucks.
Tech stack
- Frontend: React.js, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MySQL
- Deployment: Docker / Cloud (e.g., AWS, DigitalOcean)
- Multi‑tenant SaaS: Create and manage independent businesses
- User authentication: Admins, staff, and roles
- Menu & product management: Categories, items, pricing, modifiers
- Order processing: POS UI, kitchen display, invoice/bill printing
- Table management: Floor plans, table statuses, split‑check support
- Inventory tracking
- Reports & analytics: Sales summaries, daily/weekly reports
- Settings: Tax, tips, payment methods (cash/card), receipts
- Integrations (optional): Payment gateways, QR ordering, delivery platforms
- Node.js ≥ 16
- MySQL ≥ 8
- Git
- (Optional) Docker
-
Clone the repository
git clone https://github.com/your‑org/restropro-pos.git cd restropro-pos -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install -
Configure environment variables
Create.env.localinfrontendand.envinbackendusing the.env.exampletemplates.
Sample variables:backend/.env
DATABASE_URL='mysql://root:12345678@localhost:3306/restropro_saas' JWT_SECRET=restro_jwt_secret JWT_EXPIRY=15m JWT_EXPIRY_REFRESH=30d # provide in ms - milliseconds => 15 minute, 30 days COOKIE_EXPIRY=300000 COOKIE_EXPIRY_REFRESH=2592000000 PASSWORD_SALT=10 FRONTEND_DOMAIN="http://localhost:5173" FRONTEND_DOMAIN_COOKIE="localhost" STRIPE_SECRET= STRIPE_WEBHOOK_SECRET= SMTP_HOST= SMTP_PORT= SMTP_EMAIL= SMTP_PASSWORD= ENCRYPTION_KEY=uiflow
frontend/.env.local
REACT_APP_BACKEND_URL=http://localhost:4000/api -
Initialize database
Ensure your MySQL service is running. Then:cd backend npm run migrate npm run seed -
Run in development
- Backend
cd backend npm run dev - Frontend
cd ../frontend npm start
Your app should now be accessible at
http://localhost:3000. - Backend
npm run dev: Start development server with hot reloadnpm run build: Compile production buildnpm start: Start production servernpm run migrate: Run DB migrationsnpm run seed: Seed initial mock data
npm start: Launch development servernpm run build: Create optimized production buildnpm test: Run UI tests
.
├── backend
│ ├── src
│ │ ├── controllers/ # API logic
│ │ ├── models/ # Sequelize or TypeORM schema
│ │ ├── routes/ # Express routing
│ │ ├── middlewares/
│ │ ├── utils/
│ │ ├── config/ # DB, server settings
│ ├── migrations/
│ ├── seeds/
│ └── tests/
└── frontend
├── src
│ ├── components/
│ ├── pages/
│ ├── styles/
│ ├── context/ # React Context or Zustand
│ ├── hooks/
│ ├── services/ # API service calls (axios / fetch)
│ └── assets/
├── public/
└── tailwind.config.js
- JWT-based auth for backend APIs
- Role-based frontend routing and UI: Admins vs Staff
- Secure store of tokens in HTTP-only cookies /
localStorage
- Backend: Jest + Supertest
npm test - Frontend: React Testing Library + Jest
npm test
- Docker-compose:
frontend,backend,mysql,redis - Deploy to AWS EC2, ECS, or DigitalOcean App Platform
- Use managed MySQL (e.g., RDS). Configure
DATABASE_URLaccordingly.
| Name | Description | Default |
|---|---|---|
DATABASE_URL |
Full MySQL connection string | mysql://root:12345678@localhost:3306/restropro_saas |
JWT_SECRET |
JWT encryption key | restro_jwt_secret |
JWT_EXPIRY |
Token validity duration | 15m |
JWT_EXPIRY_REFRESH |
Refresh token validity duration | 30d |
COOKIE_EXPIRY |
Session cookie expiry (milliseconds) | 300000 (15m) |
COOKIE_EXPIRY_REFRESH |
Refresh session cookie expiry (milliseconds) | 2592000000 (30d) |
PASSWORD_SALT |
Password bcrypt rounds | 10 |
FRONTEND_DOMAIN |
Frontend URL for CORS | http://localhost:5173 |
FRONTEND_DOMAIN_COOKIE |
Domain name for cookie storage | localhost |
STRIPE_SECRET |
Stripe API secret key | (optional) |
STRIPE_WEBHOOK_SECRET |
Stripe webhook verification key | (optional) |
SMTP_HOST |
SMTP server host for emails | (optional) |
SMTP_PORT |
SMTP server port | (optional) |
SMTP_EMAIL |
SMTP sender email | (optional) |
SMTP_PASSWORD |
SMTP sender password | (optional) |
ENCRYPTION_KEY |
Custom string key used for symmetric encryption | uiflow |
REACT_APP_BACKEND_URL |
Frontend API endpoint URL | http://localhost:4000/api |
- Fork and create a feature branch
- Write clean, tested code
- Open a Pull Request detailing changes
Licensed under the [insert license here].
For questions, feature requests, or issues, open a GitHub Issue or email support@example.com.
Thanks for using RESTROPro – powering restaurant businesses with seamless SaaS POS!