Skip to content

Latest commit

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

POS System

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.

Prerequisites

First-time setup

1. Clone and install dependencies

git clone <repo-url>cd Pos_System
cd backend && npm install
cd ../frontend && npm install

2. Set up the database

Create a PostgreSQL database, then apply the schema:

psql -U <your-postgres-user> -d <your-database-name> -f backend/schema.sql

Seed the database with sample data (company, menu items, and orders):

cd backend
npm run seed

3. Configure environment variables

Backend — create backend/.env:

DATABASE_USERNAME=your_postgres_userDATABASE_HOST=localhostDATABASE_NAME=your_database_nameDATABASE_PASSWORD=your_postgres_passwordDATABASE_PORT=5432SERVER_PORT=5000TAX_RATE=0

Frontend — create frontend/.env:

VITE_API_URL=http://localhost:5000/api/v1

How to start the project

Open two terminal windows and run one command in each:

Terminal 1 — Backend (runs on port 5000):

cd backend
npm run dev

If npm run dev fails with a permission error on nodemon, start the server directly instead:

cd backend
NODE_ENV=development node server.js

Terminal 2 — Frontend (runs on port 5173):

cd frontend
npm run dev

Then open the app in your browser:

ServiceURL
Frontendhttp://localhost:5173/
Backendhttp://localhost:5000/

Available pages

RouteDescription
/Landing page with sales overview
/dashboardSales dashboard and charts
/productsMenu item management
/billingBilling screen (placeholder)
/receiptsReceipt printing and order history

Useful commands

# Backendcd 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# Frontendcd frontend
npm run dev # Start Vite dev server
npm run build # Production build
npm run preview # Preview production build

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages