CafeCanopy is a modern, full-stack, web-based Restaurant Point of Sale (POS) system. It features a complete Admin Backend, POS Terminal, Kitchen Display System (KDS), Reporting Dashboard, and Role-Based Access Control.
Before you start, make sure you have the following installed:
- Node.js (v18 or higher recommended)
- PostgreSQL database (Local instance or Neon PostgreSQL)
CafeCanopy/
├── client/ # Frontend application (React, Vite, TypeScript, Tailwind)
└── server/ # Backend API application (Node.js, Express, TypeScript, pg)
Follow these steps to set up and run the application locally:
Ensure PostgreSQL is running and create a database named cafecanopy (or use your preferred database name).
-
Navigate to the
serverdirectory:cd server -
Install dependencies:
npm install
-
Configure your environment variables. Copy
.env.exampleto.env:cp .env.example .env
-
Open the
.envfile and update the following settings:DATABASE_URL: Update this with your PostgreSQL connection string.- Example (Local):
postgresql://username:password@localhost:5432/cafecanopy - Example (Neon Cloud):
postgresql://user:password@ep-xxx.neon.tech/cafecanopy?sslmode=require
- Example (Local):
JWT_SECRET&JWT_REFRESH_SECRET: Generate random hex strings for secure authentication token signing:node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"- Cloudinary settings (Optional, for image uploads): Register on Cloudinary and fill in your Cloud Name, API Key, and API Secret.
- Email settings (Optional, for receipt/system emails): Set your SMTP host, user, and password details.
-
Run database migrations to create the database schema:
npm run db:migrate
- Navigate to the
clientdirectory:cd client - Install dependencies:
npm install
- Set up the environment variables. Copy
.envfrom.env.exampleif available, or make sure.envcontains:VITE_API_URL=http://localhost:5000/api VITE_SOCKET_URL=http://localhost:5000 VITE_APP_NAME=CafeCanopy
To run both the backend server and frontend client in development mode, open two terminal windows:
cd server
npm run devThe server API will start on http://localhost:5000.
cd client
npm run devThe Vite development server will start on http://localhost:5173.
Once the database migrations are completed, you can use the default/seeded roles:
- Check
server/src/db/schema.sqlfor the database schema definition. - You can create your first admin account via the registration flow or direct database insert.