Skip to content

Modern, enterprise-grade Point of Sale system built with Golang, React, TypeScript, and PostgreSQL. Features beautiful admin tables, role-based access, and professional UI/UX.

License

Notifications You must be signed in to change notification settings

madebyaris/poinf-of-sales

Repository files navigation

๐Ÿฝ๏ธ Complete POS System - Professional Restaurant Management

A modern, enterprise-grade Point of Sale system built for the next generation of restaurants

Docker MIT License Go React TypeScript PostgreSQL TailwindCSS AI Enhanced

๐ŸŒŸ Built with Modern Technologies

  • ๐Ÿ”ง Backend: Golang + Gin + PostgreSQL with raw SQL for maximum performance
  • โšก Frontend: React + TanStack Start + TypeScript + Tailwind CSS + shadcn/ui
  • ๐Ÿ—„๏ธ Database: PostgreSQL with comprehensive schema and optimized queries
  • ๐Ÿณ Infrastructure: Docker containers with Docker Compose orchestration
  • ๐Ÿ” Security: JWT authentication with role-based access control (RBAC)
  • ๐Ÿง  AI-Enhanced Development: Advanced Cursor AI rules powered by Claude Sonnet 4 thinking

๐Ÿ“ธ Beautiful Professional Interface

๐Ÿฝ๏ธ Server Interface - Intuitive Order Management

Dashboard Server Interface Clean, modern interface designed for speed and efficiency with real-time updates

๐Ÿ‘จโ€๐Ÿณ Enhanced Kitchen Display - As-Ready Service Workflow

Dashboard Kitchen Interface Professional tablet-optimized kitchen interface with individual item tracking and as-ready service

๐ŸŽฏ New Kitchen Features:

  • Individual Item Checklists - Mark each dish ready independently
  • As-Ready Service - Serve dishes as they're completed (real restaurant workflow)
  • Sound Notifications - Audio alerts for new orders, ready items, and served dishes
  • Visual Progress Tracking - "1 ready โ€ข 1 served โ€ข 1 cooking (67% complete)"
  • Touch-Optimized Design - 50px+ touch targets for tablet and TV screens

โœจ Enterprise-Grade Admin Tables

Our latest update includes professional data tables with:

  • ๐Ÿ“Š Advanced sorting & filtering with TanStack Table
  • ๐ŸŽจ Beautiful visual design with gradient avatars and color-coded indicators
  • ๐Ÿ“ฑ Responsive layout that works perfectly on tablets and desktop
  • โšก Real-time search with debouncing for instant results
  • ๐Ÿ”„ Table/Cards view toggle for optimal data visualization

๐Ÿš€ Core Features

๐Ÿ’ผ Complete POS Functionality

  • ๐Ÿ“‹ Order Management: Create, modify, and track customer orders with real-time kitchen updates
  • ๐Ÿ‘จโ€๐Ÿณ Enhanced Kitchen Workflow: Professional as-ready service system with individual item tracking, sound notifications, and tablet-optimized interface
  • ๐Ÿ’ณ Payment Processing: Complete multi-step payment flow with receipt generation and payment history
  • ๐Ÿ• Product Management: Full menu and category management with pricing, images, and inventory control
  • ๐Ÿช‘ Table Management: Comprehensive table and seating arrangement system with availability tracking
  • ๐Ÿ‘ฅ Multi-Role Support: Role-based access control (Admin, Manager, Server, Counter, Kitchen)

๐Ÿข Advanced Admin Features

  • ๐Ÿ“Š Comprehensive Admin Dashboard: Complete control center with navigation to all system areas
  • ๐Ÿ”„ Role-Based Interface Switching: Admin can access and monitor all role interfaces seamlessly
  • ๐Ÿ‘ค Staff Management: Create, manage, and delete user accounts with role assignments and permissions
  • ๐Ÿ’ฐ Financial Reporting: Income reports, sales analytics, and performance metrics with visual charts
  • โš™๏ธ System Settings: Restaurant configuration, currency settings, tax rates, and operational parameters
  • ๐Ÿ“‹ Menu Management: Full CRUD operations for categories and products with advanced table views

๐ŸŽฏ Role-Specific Interfaces

  • ๐Ÿ”‘ Admin: Full system access with comprehensive management dashboard and beautiful data tables
  • ๐Ÿฝ๏ธ Server: Streamlined dine-in order creation interface optimized for speed
  • ๐Ÿ’ฐ Counter/Checkout: All order types plus complete payment processing system
  • ๐Ÿ‘จโ€๐Ÿณ Kitchen: Order preparation workflow with status updates and timing management

๐Ÿง  AI-Enhanced Development Experience

๐Ÿš€ Claude Sonnet 4 Powered Cursor Rules

This project features cutting-edge AI development assistance through advanced Cursor AI rules engineered with Claude Sonnet 4 thinking capabilities:

๐ŸŽฏ Intelligent Code Understanding

  • ๐Ÿง  Business Logic Awareness: AI understands restaurant operations, user journeys, and revenue flows
  • ๐Ÿ“Š Context-Aware Decisions: Every code suggestion considers business impact and user experience
  • ๐Ÿ”ฎ Predictive Insights: ML-powered recommendations for optimization and issue prevention
  • โšก Performance-First: Built-in performance monitoring and automated optimization suggestions

๐Ÿ›ก๏ธ Proactive Quality Assurance

  • ๐Ÿ”’ Tech Debt Prevention: Automated consistency enforcement and code quality gates
  • ๐Ÿงช Error Prevention: Comprehensive testing patterns with business boundary validation
  • ๐Ÿ“ˆ Performance Monitoring: Real-time tracking with business intelligence integration
  • ๐ŸŽฏ DRY Principle: Automated duplicate code detection and pattern consolidation

๐Ÿ‘ฅ Role-Specific Optimization

  • ๐Ÿฝ๏ธ Server Journey: <30s order creation with intelligent UI optimization
  • ๐Ÿ‘จโ€๐Ÿณ Kitchen Workflow: <5s status updates with real-time queue optimization
  • ๐Ÿ’ฐ Counter Operations: <10s payment processing with multi-modal support
  • ๐Ÿ‘‘ Admin Intelligence: Business dashboards with predictive analytics

๐Ÿ”„ Continuous Improvement

  • ๐Ÿ“Š Automated Code Review: Business logic validation and architectural consistency
  • ๐Ÿš€ Performance Regression Detection: Automatic rollback triggers for critical issues
  • ๐ŸŽจ Component Optimization: ML-powered suggestions for UI/UX improvements
  • ๐Ÿ“ˆ Business Impact Analysis: Every change evaluated for revenue and customer satisfaction impact

๐Ÿ’ก Development Superpower: These AI rules transform Cursor into a restaurant domain expert, providing intelligent suggestions, preventing issues before they happen, and ensuring every line of code contributes to business success.


๐Ÿ”ง System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Frontend (React)      โ”‚    โ”‚   Backend (Golang)      โ”‚    โ”‚  Database (PostgreSQL)  โ”‚
โ”‚                         โ”‚    โ”‚                         โ”‚    โ”‚                         โ”‚
โ”‚ โ€ข TanStack Start        โ”‚โ—„โ”€โ”€โ–บโ”‚ โ€ข Gin Web Framework     โ”‚โ—„โ”€โ”€โ–บโ”‚ โ€ข User Management       โ”‚
โ”‚ โ€ข TypeScript            โ”‚    โ”‚ โ€ข Raw SQL Queries       โ”‚    โ”‚ โ€ข Order System          โ”‚
โ”‚ โ€ข TanStack Table        โ”‚    โ”‚ โ€ข JWT Authentication    โ”‚    โ”‚ โ€ข Product Catalog       โ”‚
โ”‚ โ€ข Tailwind CSS          โ”‚    โ”‚ โ€ข Role-based APIs       โ”‚    โ”‚ โ€ข Financial Data        โ”‚
โ”‚ โ€ข shadcn/ui Components  โ”‚    โ”‚ โ€ข RESTful Endpoints     โ”‚    โ”‚ โ€ข Comprehensive Logs    โ”‚
โ”‚ โ€ข Real-time Updates     โ”‚    โ”‚ โ€ข CORS Middleware       โ”‚    โ”‚ โ€ข Optimized Indexes     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โšก Quick Start

๐Ÿš€ One Command Startup

# Start the entire system (easiest way)
make dev

# Or use Docker Compose directly  
docker-compose -f docker-compose.dev.yml up -d

# Access the applications
Frontend: http://localhost:3000
Backend API: http://localhost:8080/api/v1
Database: localhost:5432

๐ŸŽญ Demo Accounts

Role Username Password Access Level
๐Ÿ‘‘ Admin admin admin123 Full system access, all interfaces, beautiful admin tables
๐Ÿ“Š Manager manager1 admin123 Business operations and oversight with reporting
๐Ÿฝ๏ธ Server server1 / server2 admin123 Dine-in orders only with streamlined interface
๐Ÿ’ฐ Counter counter1 / counter2 admin123 All orders + complete payment processing
๐Ÿ‘จโ€๐Ÿณ Kitchen kitchen1 admin123 Order preparation and status updates

๐ŸŽฏ First Login Experience

  1. ๐ŸŒ Navigate to: http://localhost:3000
  2. ๐Ÿ”‘ Login as Admin: Use admin / admin123 for full system access
  3. ๐Ÿ“Š Explore Admin Dashboard: Access all interfaces via the beautiful sidebar navigation
  4. ๐Ÿ”„ Switch Interfaces: Admin can view Server, Counter, Kitchen, and POS interfaces
  5. โš™๏ธ Manage System: Create staff, manage menu with professional tables, configure settings

๐Ÿ› ๏ธ Available Make Commands

# Development
make help         # Show all available commands  
make dev          # Start development environment with hot reloading
make up           # Start Docker containers
make down         # Stop Docker containers
make restart      # Restart all services

# Database Management
make create-admin # Create a super admin user
make backup       # Backup database and files
make restore      # Restore from backup  
make remove-data  # Remove all data (DESTRUCTIVE)
make db-reset     # Reset database with fresh schema and seed data
make db-shell     # Access PostgreSQL shell

# Utilities
make logs         # View all service logs
make status       # Show service status
make clean        # Clean up Docker resources
make test         # Run tests
make lint         # Run linting

๐Ÿ’ป Technology Stack

๐Ÿ—๏ธ Backend Stack

  • โšก Golang 1.21 - High-performance server runtime
  • ๐ŸŒ Gin Framework 1.9.1 - Fast HTTP web framework with middleware support
  • ๐Ÿ—„๏ธ Raw SQL with PostgreSQL Driver - Direct database operations for maximum control and performance
  • ๐Ÿ” JWT Authentication (v5.2.0) - Secure token-based authentication system
  • ๐Ÿ›ก๏ธ CORS Middleware - Cross-origin request handling for development and production

๐ŸŽจ Frontend Stack

  • โš›๏ธ TanStack Start 1.57.15 - Full-stack React framework with file-based routing
  • โš›๏ธ React 18.3.1 - Latest React with concurrent features and hooks
  • ๐Ÿ“ TypeScript 5.6.2 - Type-safe development with comprehensive type definitions
  • ๐Ÿ“Š TanStack Table 8.21.3 - Powerful data table with sorting, filtering, and pagination
  • ๐Ÿ”„ TanStack Query 5.56.2 - Powerful data synchronization and caching
  • ๐ŸŽจ Tailwind CSS 3.4.13 - Utility-first CSS framework for rapid UI development
  • โšก Vite 5.4.8 - Lightning-fast build tool and dev server
  • ๐Ÿงฉ shadcn/ui + Radix UI - Beautiful, accessible component library

๐Ÿ—„๏ธ Database & Infrastructure

  • ๐Ÿ˜ PostgreSQL 15-Alpine - Robust relational database with advanced features
  • ๐Ÿ“‹ Comprehensive Schema - Users, orders, products, payments, and audit logs
  • ๐Ÿ”’ Role-based Security - Database-level access control and permissions
  • โšก Optimized Queries - Strategically indexed for maximum performance
  • ๐Ÿณ Docker Compose - Containerized development and production environments
  • ๐ŸŸข Node.js 24.3.0 - Modern JavaScript runtime for development tools

๐Ÿง  AI Development Enhancement

  • ๐ŸŽฏ Claude Sonnet 4 Intelligence - Advanced reasoning and business logic understanding
  • ๐Ÿ“œ 14 Enhanced Cursor Rules - Comprehensive development patterns and best practices
  • ๐Ÿ”ฎ Predictive Code Assistance - Proactive suggestions based on business context
  • ๐Ÿ›ก๏ธ Automated Quality Gates - Tech debt prevention and performance monitoring
  • ๐Ÿš€ Performance-First Patterns - Built-in optimization and monitoring capabilities

๐Ÿ† Key Achievements

โœจ Latest Features

  • ๐Ÿง  AI-Enhanced Development: Advanced Cursor AI rules powered by Claude Sonnet 4 thinking capabilities
  • ๐Ÿš€ Intelligent Code Assistance: Business logic awareness, predictive insights, and automated optimization
  • ๐Ÿ“Š Professional Table Views: Enterprise-grade data tables with TanStack Table integration
  • ๐ŸŽจ Beautiful UI/UX: Modern design with gradient avatars, color-coded badges, and smooth animations
  • ๐Ÿ“ฑ Responsive Design: Optimized for desktop, tablet, and mobile devices
  • โšก Real-time Search: Instant filtering with debouncing and visual feedback
  • ๐Ÿ”„ View Toggle System: Switch between table and card views for optimal data visualization

๐ŸŽฏ Development Excellence

  • ๐Ÿง  AI-Powered Development - 14 advanced Cursor AI rules with Claude Sonnet 4 intelligence for business-aware coding
  • ๐Ÿ“š Comprehensive Documentation - Extensive AI-enhanced rules and development guidelines
  • ๐Ÿงช Type Safety - Complete TypeScript integration throughout the application
  • ๐Ÿ”’ Security First - JWT authentication, SQL injection prevention, and role-based access
  • โšก Performance Optimized - Efficient queries, caching, and optimized bundle sizes with AI monitoring
  • ๐Ÿณ Docker Ready - Full containerization with development and production configurations

๐Ÿค Support the Project

๐Ÿ’ Open for Sponsorship & Donations

This project represents hundreds of hours of development work, creating a modern, professional POS system that's completely free and open source. If you find this project valuable:

๐ŸŒŸ Ways to Support:

  • โญ Star this repository to show your appreciation
  • ๐Ÿ› Report bugs or suggest features to help improve the system
  • ๐Ÿ’ฐ Sponsor development to help maintain and add new features
  • โ˜• Buy me a coffee to fuel late-night coding sessions
  • ๐Ÿ—ฃ๏ธ Share the project with other restaurant owners or developers

๐Ÿ’ณ Donation Options:

  • ๐ŸŒŸ GitHub Sponsors - Support ongoing development
  • ๐Ÿ’ฐ PayPal - Send donations to: [email protected] (one-time or recurring)
  • ๐Ÿ’Ž Cryptocurrency - Contact for wallet addresses
  • ๐Ÿข Commercial Licensing - Enterprise support and customization available

Every contribution helps make this project better for everyone! ๐Ÿ™


๐Ÿ“‹ Project Structure

pos-full/
โ”œโ”€โ”€ ๐Ÿง  .cursor/rules/           # AI-Enhanced Cursor rules (Claude Sonnet 4 powered)
โ”‚   โ”œโ”€โ”€ business-logic-patterns.mdc    # POS domain understanding & workflows
โ”‚   โ”œโ”€โ”€ user-journey-optimization.mdc  # Role-specific performance patterns
โ”‚   โ”œโ”€โ”€ tech-debt-prevention.mdc       # Code quality & consistency gates
โ”‚   โ”œโ”€โ”€ testing-patterns.mdc           # QA integration & error prevention
โ”‚   โ””โ”€โ”€ performance-optimization.mdc   # Performance-first development
โ”œโ”€โ”€ ๐Ÿ”ง backend/                 # Golang REST API server
โ”‚   โ”œโ”€โ”€ internal/api/           # Route definitions and handlers
โ”‚   โ”œโ”€โ”€ internal/handlers/      # Business logic controllers
โ”‚   โ”œโ”€โ”€ internal/middleware/    # Authentication and CORS
โ”‚   โ”œโ”€โ”€ internal/models/        # Data models and DTOs
โ”‚   โ””โ”€โ”€ main.go                 # Application entry point
โ”œโ”€โ”€ ๐ŸŽจ frontend/                # TanStack Start React application
โ”‚   โ”œโ”€โ”€ src/components/         # Reusable UI components
โ”‚   โ”œโ”€โ”€ src/routes/            # File-based routing system
โ”‚   โ”œโ”€โ”€ src/api/               # API client and integrations
โ”‚   โ”œโ”€โ”€ src/types/             # TypeScript type definitions
โ”‚   โ””โ”€โ”€ src/hooks/             # Custom React hooks
โ”œโ”€โ”€ ๐Ÿ—„๏ธ database/               # SQL schema and seed data
โ”‚   โ””โ”€โ”€ init/                  # Database initialization scripts
โ”œโ”€โ”€ ๐Ÿณ docker/                 # Docker configuration files
โ”œโ”€โ”€ ๐Ÿ“š docs/                   # Project documentation
โ””โ”€โ”€ ๐Ÿ› ๏ธ scripts/               # Development and deployment scripts

๐Ÿš€ Getting Started

Prerequisites

  • Docker & Docker Compose
  • Make (for convenience commands)
  • Git (for cloning the repository)

Installation

# Clone the repository
git clone https://github.com/madebyaris/poinf-of-sales.git
cd poinf-of-sales

# Start everything with one command
make dev

# Open your browser
open http://localhost:3000

Development

# Development mode with hot reloading
make dev

# Individual service startup (for advanced users)
cd backend && go run main.go
cd frontend && npm run dev

๐Ÿ”ง Troubleshooting

Docker Build Issues

If you encounter Docker build errors, try these solutions:

Backend Build Errors (go.mod/go.sum issues)

# Clean up Go modules and rebuild
cd backend
go mod tidy
go mod download
cd ..
docker-compose down
docker-compose -f docker-compose.dev.yml up -d --build

General Docker Issues

# Clean rebuild everything
make clean
make dev

# Or manually clean and rebuild
docker system prune -f
docker-compose down --volumes --remove-orphans
docker-compose -f docker-compose.dev.yml up -d --build

Permission Issues (Linux/WSL)

# Fix file permissions
sudo chown -R $USER:$USER .
chmod -R 755 .

Common Solutions

  • ๐Ÿ”„ Restart Docker Desktop if you're on Windows/Mac
  • ๐Ÿงน Clear Docker cache: docker system prune -f
  • ๐Ÿ“ฆ Update dependencies: Run go mod tidy in backend and npm install in frontend
  • ๐Ÿณ Rebuild containers: Use --build flag with docker-compose commands

๐Ÿ’ก Still having issues? Open a GitHub issue with your error logs!


๐Ÿ“ฑ Upcoming Mobile Applications

๐Ÿš€ React Native Development Roadmap

We're expanding the POS system with native mobile applications to provide even better flexibility for restaurant operations:

๐Ÿ“‹ GitHub Milestones Created

Based on the project milestones, we're developing:

๐Ÿณ Kitchen Staff Mobile App (iOS & Android)

  • Target Devices: Tablets and TV screens for kitchen display
  • Key Features: Touch-optimized kitchen interface, real-time order sync, offline support
  • Status: ๐Ÿ“‹ Planned - Milestone created
  • Timeline: 3-4 weeks development

๐Ÿ‘จโ€๐Ÿ’ผ Server Group Mobile App (iOS & Android)

  • Target Devices: Smartphones and tablets for server staff
  • Key Features: Mobile order taking, table management, payment processing
  • Status: ๐Ÿ“‹ Planned - Milestone created
  • Timeline: 3-4 weeks development

๐ŸŽฏ Mobile App Benefits

  • ๐Ÿ“ฑ Native Performance - Smooth, responsive interfaces optimized for mobile devices
  • ๐Ÿ”„ Real-time Sync - Seamless integration with existing web-based POS system
  • ๐Ÿ“ก Offline Support - Continue operations during network connectivity issues
  • ๐ŸŽจ Platform-Optimized UI - Native iOS and Android design patterns
  • ๐Ÿ“บ Large Screen Support - Kitchen displays on wall-mounted TVs and tablets

๐Ÿ”— Track Progress: Follow development on our GitHub Milestones


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License - Free for commercial and personal use
โœ… Commercial use    โœ… Modification    โœ… Distribution    โœ… Private use

๐Ÿ™ Acknowledgments

  • ๐Ÿ”ง Golang Community for the amazing ecosystem and performance
  • โš›๏ธ React Team for the incredible frontend framework
  • ๐ŸŽจ Tailwind CSS for making beautiful designs accessible
  • ๐Ÿ“Š TanStack for the powerful table and query libraries
  • ๐Ÿงฉ shadcn/ui for the beautiful component system
  • ๐Ÿณ Docker for making deployment seamless

โญ Star this project if you find it useful! โญ

Built with โค๏ธ by developers, for developers

Ready to transform your restaurant operations? Get started today!

๐Ÿš€ Get Started โ€ข ๐Ÿ’ Support the Project โ€ข ๐Ÿ“š Documentation โ€ข ๐Ÿ› Report Issues

About

Modern, enterprise-grade Point of Sale system built with Golang, React, TypeScript, and PostgreSQL. Features beautiful admin tables, role-based access, and professional UI/UX.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published