f8bd97229b08db28029832b002dc0906f4d4e340
Tillo POS Software
Welcome to the Tillo POS Software, a comprehensive Canteen Automation Ecosystem. This project is designed to handle point-of-sale (POS), inventory management, user ordering, and administrative tasks for canteen operations.
🏗️ Ecosystem Architecture
The application is split into several interconnected modules:
-
Backend (
/backend)- Stack: Java, Spring Boot, Maven, PostgreSQL.
- Purpose: Serves as the core API for all frontend applications. Handles business logic, database transactions, and security.
-
Admin & Counter Frontend (
/frontend)- Stack: React 19, TypeScript, Vite, Tailwind CSS, Recharts.
- Purpose: The main dashboard for canteen administrators and counter staff to manage POS, inventory, and reports. Includes PDF generation and charts.
-
Ordering Site (
/ordering_site)- Stack: React 19, TypeScript, Vite, Tailwind CSS, Framer Motion.
- Purpose: The customer-facing application where users can browse the menu, place orders, and view order status.
-
Counter Frontend (
/counter-frontend)- Stack: React 19, TypeScript, Vite, Tailwind CSS.
- Purpose: A streamlined interface specifically for counter operations.
🔐 Security & Authentication
The system uses a robust JWT-based Authentication architecture to secure endpoints.
Critical: Security Configuration
To run this application securely, you MUST configure the following environment variables. Do NOT commit real secrets to the repository.
| Variable | Description | Example/Hint |
|---|---|---|
JWT_SECRET |
Secret key for signing tokens | openssl rand -base64 32 |
DB_PASSWORD |
Database user password | Your PostgreSQL password |
MASTER_USER |
Initial admin email | admin@example.com |
MASTER_PASSWORD |
Initial admin password | SecurePassword123 |
Setting Environment Variables:
- Local Development: Create a
.envfile or set them in your IDE (IntelliJ/Eclipse) Run Configurations. - Production: Set them as System Environment Variables on your server or CI/CD platform.
Security Features
- Backend: Protected by JWT guards (
JwtAuthFilter,JwtUtil). Role-based access restricts sensitive endpoints (Orders, Wallets, Coupons) to authenticated users. Implements rate limiting (LoginRateLimiter) to prevent brute-force attacks. - Frontend: Centralized API wrapper (
src/api.ts) injects authentication headers automatically.AuthContextpersists tokens securely.
🚀 How to Run
Backend
- Ensure Java 17+ and Maven are installed.
- Navigate to the
backenddirectory:cd backend - Update
src/main/resources/application.propertieswith your database credentials and set thejwt.secret(or use environment variables). - Run the application:
./mvnw spring-boot:run
Frontends (frontend, ordering_site, counter-frontend)
- Ensure Node.js (v18+) is installed.
- Navigate to the desired frontend directory:
cd frontend(orordering_site/counter-frontend) - Install dependencies:
npm install - Set up your
.envfile to point to the backend URL (e.g.,VITE_API_URL=http://localhost:8080). - Run the development server:
npm run dev
🛠️ Additional Tools & Scripts
generate_report.py: A Python script used to generate deployment or analytics reports.push_to_git.bat: A quick batch script for Windows users to automate git commits and pushes.migrate_fetch.ps1: A PowerShell script in thefrontenddirectory used to automate the transition of fetch calls to the secure API wrapper.
Developed by the Canteen Automation Team.
Description
Languages
TypeScript
63.3%
Java
27.4%
CSS
8.4%
Python
0.6%
JavaScript
0.1%