A modern, full-featured Point-of-Sale (POS) system built with React, TypeScript, and Supabase. This system provides comprehensive retail management capabilities with role-based access control, real-time inventory management, and detailed reporting.
- Point of Sale Terminal - Intuitive checkout interface with product search and cart management
- Receipt Printing - Generate and print receipts for transactions
- Multiple Payment Methods - Support for various payment options
- Sales Management - Complete transaction history and management
- Product Catalog - Add, edit, and manage product inventory
- Stock Tracking - Real-time inventory levels and alerts
- Category Management - Organize products by categories
- Barcode Support - Product identification and quick scanning
- Customer Database - Store and manage customer information
- Purchase History - Track customer buying patterns
- Customer Profiles - Detailed customer records and preferences
- Role-Based Access Control - Admin, Manager, and Cashier roles
- User Authentication - Secure login with Supabase Auth
- Permission Management - Granular access control for different features
- Sales Reports - Comprehensive sales analytics and insights
- Inventory Reports - Stock levels, low inventory alerts
- Transaction History - Detailed transaction records
- Performance Metrics - Business performance tracking
- Discount Management - Create and apply various discount types
- Settings Configuration - Customizable system settings
- Dark/Light Theme - Modern UI with theme switching
- Responsive Design - Works on desktop, tablet, and mobile devices
- Frontend: React 18.3.1, TypeScript 5.5.3
- Styling: Tailwind CSS 3.4.1
- Backend: Supabase (Database, Auth, Real-time)
- Build Tool: Vite 5.4.2
- UI Components: Custom components with Framer Motion animations
- Charts: Recharts for data visualization
- Icons: Lucide React
- Notifications: SweetAlert2
Before running this project, make sure you have:
- Node.js (v16 or higher)
- npm or yarn package manager
- Supabase Account - For database and authentication
-
Clone the repository
git clone https://github.com/Keshara1997/POS-system.git cd POS-system -
Install dependencies
npm install
-
Set up Supabase
- Create a new project at supabase.com
- Run the SQL script in
supabase_init.sqlto set up your database schema - Copy your Supabase URL and anon key
-
Configure environment variables Create a
.env.localfile in the root directory:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173to view the application
src/
βββ components/ # React components
β βββ auth/ # Authentication components
β βββ customers/ # Customer management
β βββ discounts/ # Discount management
β βββ inventory/ # Inventory management
β βββ layout/ # Layout components
β βββ pos/ # POS terminal components
β βββ reports/ # Reporting components
β βββ settings/ # Settings components
β βββ transactions/ # Transaction management
β βββ users/ # User management
β βββ ui/ # Reusable UI components
βββ context/ # React contexts
βββ lib/ # Utility libraries and services
βββ types/ # TypeScript type definitions
βββ main.tsx # Application entry point
- Full system access
- User management
- All reports and analytics
- System settings
- POS operations
- Inventory management
- Customer management
- Sales reports
- Discount management
- POS terminal access only
- Process transactions
- View basic product information
For testing purposes, you can use the following user credentials:
Admin User:
- URL:
https://possystemtest.netlify.app/ - Email:
inctimo.pvt.ltd@gmail.com - Password:
inctimo - Role: Admin (Full system access)
- Username:
inctimo
Note: This user has full administrative privileges and can access all features of the POS system including user management, reports, and system settings.
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
The system uses Supabase with the following main tables:
users- User accounts and rolesproducts- Product catalogcategories- Product categoriescustomers- Customer informationtransactions- Sales transactionstransaction_items- Individual transaction itemsdiscounts- Discount configurations
- Modern Design - Clean, professional interface
- Responsive Layout - Works on all device sizes
- Dark/Light Themes - User preference support
- Smooth Animations - Enhanced user experience with Framer Motion
- Intuitive Navigation - Easy-to-use interface for all user types
- Authentication - Secure user login with Supabase Auth
- Role-Based Access - Granular permissions system
- Data Validation - Input validation and sanitization
- Secure API - Protected database operations
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
This project follows a structured branching strategy to ensure organized development and deployment:
main- Production-ready code, always stable and deployabledevelop- Integration branch for features, staging environmentfeature/*- Feature development branches (e.g.,feature/user-authentication)bugfix/*- Bug fix branches (e.g.,bugfix/inventory-calculation)hotfix/*- Critical production fixes (e.g.,hotfix/security-patch)release/*- Release preparation branches (e.g.,release/v1.1.0)
- Features:
feature/description-of-feature - Bug fixes:
bugfix/issue-description - Hotfixes:
hotfix/critical-issue - Releases:
release/version-number - Documentation:
docs/update-description
-
Feature Development
git checkout develop git pull origin develop git checkout -b feature/your-feature-name # Make your changes git push origin feature/your-feature-name -
Bug Fixes
git checkout develop git pull origin develop git checkout -b bugfix/issue-description # Fix the issue git push origin bugfix/issue-description -
Hotfixes (for critical production issues)
git checkout main git pull origin main git checkout -b hotfix/critical-issue # Fix the critical issue git push origin hotfix/critical-issue
To contribute to this project, you'll need to fork the repository:
-
Fork on GitHub
- Go to the repository page
- Click the "Fork" button in the top-right corner
- Choose your account to fork to
-
Clone Your Fork
git clone https://github.com/YOUR_USERNAME/POS-system.git cd POS-system -
Add Upstream Remote
git remote add upstream https://github.com/Keshara1997/POS-system.git
-
Keep Your Fork Updated
git fetch upstream git checkout main git merge upstream/main git push origin main
- Sync with upstream: Regularly pull changes from the main repository
- Create branches: Always work on feature branches, never directly on main
- Submit PRs: Create pull requests from your fork to the main repository
- Stay updated: Keep your fork synchronized with the upstream repository
- Fork the repository (see Git Repository Fork section above)
- Clone your fork and set up the development environment
- Create a feature branch following our branch naming conventions
- Make your changes and test thoroughly
- Commit your changes with descriptive commit messages
- Push to your fork and create a Pull Request
-
Create a Pull Request from your feature branch to
develop -
Fill out the PR template with:
- Description of changes
- Screenshots (if applicable)
- Testing instructions
- Related issues (if any)
-
Code Review - Maintainers will review your code
-
Address feedback - Make requested changes
-
Merge - Once approved, your changes will be merged
Use conventional commit format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
Example:
git commit -m "feat: add user authentication system"
git commit -m "fix: resolve inventory calculation bug"
git commit -m "docs: update API documentation"This project is licensed under the MIT License - see the LICENSE file for details.
sekaLabs 2025
- Email: info@sekalabs.lk
- GitHub: @Keshara1997
- Built with modern web technologies
- Powered by Supabase for backend services
- UI components inspired by modern design systems
- Icons provided by Lucide React
sekaLabs 2025 - Empowering businesses with modern POS solutions.