A point-of-sale web app for managing menu items, billing, receipts, and sales dashboards. The stack is React + Vite on the frontend and Node.js + Express + PostgreSQL on the backend.
- Node.js (v18 or later recommended)
- PostgreSQL running locally on port
5432
git clone <repo-url>
cd Pos_System
cd backend && npm install
cd ../frontend && npm installCreate a PostgreSQL database, then apply the schema:
psql -U <your-postgres-user> -d <your-database-name> -f backend/schema.sqlSeed the database with sample data (company, menu items, and orders):
cd backend
npm run seedBackend — create backend/.env:
DATABASE_USERNAME=your_postgres_user
DATABASE_HOST=localhost
DATABASE_NAME=your_database_name
DATABASE_PASSWORD=your_postgres_password
DATABASE_PORT=5432
SERVER_PORT=5000
TAX_RATE=0Frontend — create frontend/.env:
VITE_API_URL=http://localhost:5000/api/v1Open two terminal windows and run one command in each:
Terminal 1 — Backend (runs on port 5000):
cd backend
npm run devIf npm run dev fails with a permission error on nodemon, start the server directly instead:
cd backend
NODE_ENV=development node server.jsTerminal 2 — Frontend (runs on port 5173):
cd frontend
npm run devThen open the app in your browser:
| Service | URL |
|---|---|
| Frontend | http://localhost:5173/ |
| Backend | http://localhost:5000/ |
| Route | Description |
|---|---|
/ |
Landing page with sales overview |
/dashboard |
Sales dashboard and charts |
/products |
Menu item management |
/billing |
Billing screen (placeholder) |
/receipts |
Receipt printing and order history |
# Backend
cd backend
npm run dev # Start dev server with auto-reload
npm run seed # Re-seed the database with sample data
npm test # Run backend tests
# Frontend
cd frontend
npm run dev # Start Vite dev server
npm run build # Production build
npm run preview # Preview production build