A comprehensive billing and inventory management application built with Next.js 14 and Supabase, designed for Indian retail businesses.
- Create and manage multiple shops from a single account
- Shop-specific data isolation with Row Level Security
- Invite employees with role-based access (Admin/Cashier)
- Nested category hierarchy with tree view
- Brand management
- Bilingual support (English + Tamil)
- Multiple pricing tiers (Retail, Wholesale, Dealer, etc.)
- SKU and barcode support
- Fast product search with barcode scanning
- Real-time cart management
- Price type selection with automatic fallback
- GST calculation
- Multiple payment methods (Cash, Card, UPI, Credit)
- Discount support
- 80mm thermal receipt formatting
- Shop branding with logo support
- GST invoice format with CGST/SGST breakdown
- Tamil language support on receipts
- Real-time stock tracking
- Low stock alerts
- Stock adjustment with audit trail
- Purchase order management
- Supplier management
- Stock movement history
- Framework: Next.js 14 (App Router)
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Storage: Supabase Storage
- UI: Tailwind CSS + shadcn/ui
- State Management: Zustand
- Forms: React Hook Form + Zod
- Icons: Lucide React
- Printing: react-to-print
- Node.js 18+
- npm or yarn
- Supabase account
- Clone the repository:
git clone <repository-url>
cd Kanaku360- Install dependencies:
npm install- Set up environment variables:
cp .env.local.example .env.localEdit .env.local with your Supabase credentials:
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key-
Set up the database:
- Go to your Supabase project
- Navigate to SQL Editor
- Run the migration file:
supabase/migrations/001_initial_schema.sql
-
Set up storage buckets in Supabase:
- Create buckets:
shop-assets,product-images,category-images,brand-images - Set them as public buckets
- Create buckets:
-
Run the development server:
npm run devOpen http://localhost:3000 to view the application.
├── app/
│ ├── (auth)/ # Authentication pages
│ │ ├── login/
│ │ └── register/
│ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── dashboard/
│ │ └── shops/
│ │ └── [shopId]/
│ │ ├── billing/
│ │ ├── products/
│ │ ├── categories/
│ │ ├── brands/
│ │ ├── price-types/
│ │ ├── inventory/
│ │ ├── purchase-orders/
│ │ ├── suppliers/
│ │ ├── bills/
│ │ ├── employees/
│ │ └── settings/
│ └── auth/callback/ # OAuth callback
├── components/
│ ├── ui/ # shadcn/ui components
│ ├── layout/ # Layout components
│ ├── billing/ # Billing components
│ └── products/ # Product components
├── lib/
│ ├── supabase/ # Supabase client utilities
│ ├── store/ # Zustand stores
│ ├── hooks/ # Custom hooks
│ └── utils.ts # Utility functions
├── types/ # TypeScript types
└── supabase/
└── migrations/ # Database migrations
The application uses a PostgreSQL database with the following main tables:
profiles- User profiles (extends auth.users)shops- Shop informationshop_employees- Employee assignments and rolescategories- Product categories (supports nesting)brands- Product brandsproducts- Product catalogprice_types- Different pricing tiersproduct_prices- Product-specific prices per tierbills- Sales billsbill_items- Bill line itemssuppliers- Supplier informationpurchase_orders- Purchase orderspurchase_order_items- PO line itemsstock_movements- Stock change audit trail
- Full access to all shop features
- Can manage employees, products, categories, brands
- Can view reports and settings
- Can process billing
- Can view products
- Can process billing
- Cannot modify products or settings
MIT License - feel free to use this project for your own purposes.
For support, please open an issue on the GitHub repository.