A comprehensive cloud-based billing solution with an integrated Point of Sale (POS) desktop application. Built for restaurants, retail stores, and service businesses that need seamless billing management and real-time synchronization.
- User Authentication - Secure login/signup with JWT and bcrypt password hashing
- Real-time Dashboard - Live statistics for revenue, invoices, and sales
- Invoice Management - Create, track, and manage invoices with status updates
- Biller Portal - Generate secure access keys for POS terminals
- Business Management - Manage items, categories, staff, tables, and offers
- Email Notifications - Automated email system via Nodemailer
- Responsive Design - Beautiful UI with Tailwind CSS and Framer Motion animations
- Protected Routes - Middleware-based authentication and authorization
- Secure Authentication - Access key-based login system
- Product Catalog - Browse and search products
- Cart Management - Add, remove, and modify cart items
- Payment Processing - Process transactions and generate invoices
- Cloud Sync - Automatic synchronization with web dashboard
- Offline Capable - Works offline and syncs when connection is restored
- Native Performance - Built with Python and CustomTkinter
billify/
βββ app/ # Next.js App Router
β βββ api/ # API Routes
β β βββ auth/ # Authentication endpoints
β β βββ dashboard/ # Dashboard data endpoints
β β βββ contact/ # Contact form endpoint
β βββ dashboard/ # Dashboard pages
β β βββ biller-portal/ # Biller management
β β βββ billers/ # Biller list
β β βββ manage/ # Business management
β β βββ sales/ # Sales tracking
β β βββ settings/ # User settings
β βββ login/ # Login page
β βββ signup/ # Signup page
β βββ contact/ # Contact page
βββ biller-app/ # Desktop POS Application
β βββ main.py # Main application code
β βββ dist/ # Built executable
β βββ test_key_verification.py # Diagnostic tool
β βββ docs/ # POS documentation
βββ components/ # React components
β βββ ui/ # UI components
βββ lib/ # Utility libraries
β βββ auth.ts # Authentication utilities
β βββ db.ts # Database connection
β βββ email.ts # Email service
β βββ utils.ts # Helper functions
βββ public/ # Static assets
β βββ downloads/ # Downloadable files
β βββ software/ # Software installers
βββ middleware.ts # Route protection
- Node.js 20.x or higher
- npm or yarn
- MongoDB Atlas account (or local MongoDB)
- Python 3.x (for POS app development)
- Git
-
Clone the repository:
git clone <repository-url> cd billify
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.envfile in the root directory:# MongoDB Connection MONGO_URL=*USE MONGODB URL* # JWT Secret (use a strong random string) JWT_SECRET=your_secret_key_here # Email Configuration (Gmail SMTP) EMAIL_USER=your-email@gmail.com EMAIL_PASS=your-app-password SMTP_PORT=465 SMTP_HOST=smtp.gmail.com
-
Run the development server:
npm run dev
-
Open your browser: Navigate to http://localhost:3000
The application uses the following collections:
- users - User accounts and authentication
- billers - Biller profiles and information
- biller_keys - Temporary access keys (3-minute expiration)
- invoices - Invoice records and transactions
- items - Product/service catalog
- categories - Product categories
- staff - Staff members
- tables - Table management (for restaurants)
- offers - Promotional offers
The application automatically creates necessary indexes:
- TTL index on
biller_keys.expiresAtfor automatic key expiration
-
Navigate to biller-app directory:
cd biller-app -
Create virtual environment:
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Mac/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Run from source:
python main.py
-
Run the build script:
build.bat # Windows -
Executable location:
biller-app/dist/Billify-POS.exe -
Deploy to web: The build script automatically copies the executable to
public/downloads/
If you encounter authentication issues:
-
Test database connection:
cd biller-app test-key.bat -
Check documentation:
biller-app/QUICK-START.md- Quick fix guidebiller-app/TROUBLESHOOTING.md- Detailed diagnosticsbiller-app/FIX-SUMMARY.md- Technical details
- User signs up with email and password
- Password is hashed with bcrypt
- JWT token is created and stored in HTTP-only cookie
- Middleware validates token on protected routes
- User generates access key from web portal
- Key is stored in MongoDB with 3-minute expiration
- POS app verifies key against database
- On success, user can access POS features
- Next.js 16 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS 4 - Utility-first CSS
- Framer Motion - Animations
- Lucide React - Icon library
- Next.js API Routes - Serverless functions
- MongoDB - NoSQL database
- Jose - JWT handling
- Bcrypt - Password hashing
- Nodemailer - Email service
- Python 3.x - Programming language
- CustomTkinter - Modern GUI framework
- PyMongo - MongoDB driver
- PyInstaller - Executable builder
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationPOST /api/auth/logout- User logout
GET /api/dashboard/stats- Dashboard statisticsGET /api/dashboard/invoices- Invoice listGET /api/dashboard/billers- Biller listPOST /api/dashboard/biller-keys- Generate access keyGET /api/dashboard/biller-keys- Get active key
GET/POST /api/dashboard/manage/items- Item managementGET/POST /api/dashboard/manage/categories- Category managementGET/POST /api/dashboard/manage/staff- Staff managementGET/POST /api/dashboard/manage/tables- Table managementGET/POST /api/dashboard/manage/offers- Offer management
POST /api/contact- Send contact form email
- Enable 2-factor authentication on your Gmail account
- Generate an App Password:
- Go to Google Account Settings
- Security β 2-Step Verification β App passwords
- Generate password for "Mail"
- Use the generated password in
.envasEMAIL_PASS
- Create a MongoDB Atlas account
- Create a new cluster
- Add database user with read/write permissions
- Whitelist your IP address (or use 0.0.0.0/0 for development)
- Get connection string and add to
.env
-
Push to GitHub:
git push origin main
-
Deploy to Vercel:
- Connect your GitHub repository
- Add environment variables from
.env - Deploy
- Netlify - Similar to Vercel
- Railway - Full-stack deployment
- DigitalOcean - VPS deployment
-
Build the executable:
cd biller-app build.bat -
The executable is automatically copied to
public/downloads/ -
Users can download from the web portal
- Multi-language support
- Advanced reporting and analytics
- Inventory management
- Customer relationship management (CRM)
- Mobile app (React Native)
- Payment gateway integration
- Receipt printing
- Barcode scanning
- Multi-location support
- Role-based access control
- Keys expire after 3 minutes (by design for security)
- POS app requires internet connection for authentication
- Email service limited to Gmail SMTP
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is private and proprietary.
For issues or questions:
- Check the documentation in
biller-app/folder - Run diagnostic tools (
test-key.bat) - Review troubleshooting guides
- Next.js team for the amazing framework
- MongoDB for the database platform
- CustomTkinter for the modern Python GUI
- All open-source contributors
Built with β€οΈ for modern businesses