Skip to content

Latest commit

 

History

History
221 lines (161 loc) · 5.1 KB

File metadata and controls

221 lines (161 loc) · 5.1 KB

RESTROPro SaaS POS

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)

🚀 Features

  • 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

🎞️ Getting Started

Prerequisites

  • Node.js ≥ 16
  • MySQL ≥ 8
  • Git
  • (Optional) Docker

Setup Instructions

  1. Clone the repository

    git clone https://github.com/your‑org/restropro-pos.git
    cd restropro-pos
  2. Install backend dependencies

    cd backend
    npm install
  3. Install frontend dependencies

    cd ../frontend
    npm install
  4. Configure environment variables
    Create .env.local in frontend and .env in backend using the .env.example templates.
    Sample variables:

    backend/.env

    DB_HOST=localhost
    DB_PORT=3306
    DB_USER=root
    DB_PASS=yourpassword
    DB_NAME=restropro
    JWT_SECRET=your_jwt_secret
    PORT=4000
    

    frontend/.env.local

    REACT_APP_BACKEND_URL=http://localhost:4000/api
    
  5. Initialize database
    Ensure your MySQL service is running. Then:

    cd backend
    npm run migrate
    npm run seed
  6. Run in development

    • Backend
      cd backend
      npm run dev
    • Frontend
      cd ../frontend
      npm start

    Your app should now be accessible at http://localhost:3000.


🧰 Available Scripts

Backend (Node.js / Express)

  • npm run dev: Start development server with hot reload
  • npm run build: Compile production build
  • npm start: Start production server
  • npm run migrate: Run DB migrations
  • npm run seed: Seed initial mock data

Frontend (React.js / Tailwind)

  • npm start: Launch development server
  • npm run build: Create optimized production build
  • npm test: Run UI tests

⚙️ Project Structure

.
├── 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

✅ Authentication & Authorization

  • JWT-based auth for backend APIs
  • Role-based frontend routing and UI: Admins vs Staff
  • Secure store of tokens in HTTP-only cookies / localStorage

🧪 Testing

  • Backend: Jest + Supertest
    npm test
  • Frontend: React Testing Library + Jest
    npm test

📦 Deployment Options

  • Docker-compose: frontend, backend, mysql, redis
  • Deploy to AWS EC2, ECS, or DigitalOcean App Platform
  • Use managed MySQL (e.g., RDS). Configure DB_* variables accordingly.

⚙️ Environment Variables

Name Description Default
DB_HOST MySQL hostname or IP localhost
DB_PORT MySQL port 3306
DB_USER MySQL user root
DB_PASS MySQL password (none)
DB_NAME Database name restropro
JWT_SECRET JWT encryption key (set it)
PORT Backend server port 4000
REACT_APP_BACKEND_URL API endpoint URL http://localhost:4000/api

🙏 Contributing

  1. Fork and create a feature branch
  2. Write clean, tested code
  3. Open a Pull Request detailing changes

📝 License

Licensed under the [insert license here].


📞 Contact

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!