A simple, affordable sales and inventory management platform designed specifically for small and micro-businesses in Africa. Track inventory, record sales, and understand your business with real-time analytics—all at a price that makes sense for your budget.
SmartBiz solves a critical problem: most business management tools are built for enterprises and priced accordingly. Small business owners, traders, and micro-entrepreneurs are left with spreadsheets, notebooks, or expensive solutions they can't afford. SmartBiz changes that.
Built with small businesses in mind, SmartBiz offers:
- Intuitive inventory tracking with low-stock alerts
- Real-time sales recording and revenue tracking
- Simple but powerful analytics
- Affordable subscription plans in KES
- Mobile-responsive design for on-the-go access
- Product Management - Add, edit, and delete products with buying and selling prices
- Sales Tracking - Record sales instantly and track revenue in real-time
- Inventory Management - Monitor stock levels and receive automatic low-stock alerts
- Sales History - View complete transaction history with timestamps and totals
- Real-time Dashboard - See key metrics at a glance: daily sales, product count, and low-stock items
- 7-Day Activity Chart - Visual representation of sales trends over the past week
- Free Plan - Up to 50 products, basic sales tracking, email support
- Basic Plan (KES 499/month) - Up to 500 products, advanced tracking, real-time analytics, priority support
- Premium Plan (KES 1,499/month) - Unlimited products, advanced reports, custom alerts, API access, 24/7 support
- Manage business owner accounts
- Monitor all subscriptions and due renewals
- Track total platform revenue
- Activate or deactivate user accounts
- View subscription status and details
- Clean, modern interface with no unnecessary complexity
- Mobile-responsive design works on phones, tablets, and desktops
- Fast performance optimized for low-bandwidth environments
- Role-based access control (admin vs regular users)
- Secure authentication and data protection
- Backend - Django 6.0, Python 3.12
- Frontend - HTML5, CSS3, Bootstrap 5.3.3, JavaScript
- Database - SQLite (development) / PostgreSQL (production-ready)
- Styling - Bootstrap 5, Google Fonts (Inter, Poppins)
- Authentication - Django built-in auth system with custom decorators
- Deployment - WSGI-compatible (Gunicorn, uWSGI)
smart-biz/
├── smartbiz/ # Main Django project
│ ├── settings.py # Django configuration
│ ├── urls.py # URL routing
│ ├── wsgi.py # WSGI entry point
│ └── asgi.py # ASGI entry point
├── core/ # Main application
│ ├── models.py # Database models (User, Product, Sale, Subscription, SubscriptionPlan)
│ ├── views.py # View logic (dashboard, products, sales, subscriptions, admin)
│ ├── utils.py # Decorators (@subscription_required, @admin_required)
│ ├── context_processors.py # Global context for templates
│ ├── management/
│ │ └── commands/
│ │ └── create_subscription_plans.py # Management command for seeding plans
│ └── migrations/ # Database migrations
├── templates/
│ └── core/
│ ├── base.html # User dashboard base template
│ ├── admin_base.html # Admin dashboard base template
│ ├── landing.html # Public landing page
│ ├── login.html # Login page
│ ├── register.html # Registration page
│ ├── dashboard.html # User dashboard
│ ├── product_list.html # Products page
│ ├── product_form.html # Add/edit product form
│ ├── product_confirm_delete.html # Delete confirmation
│ ├── record_sale.html # Record sale form
│ ├── sales_history.html # Sales history view
│ ├── subscription_plans.html # Subscription tiers
│ ├── subscription_status.html # User subscription details
│ ├── renew_subscription.html # Subscription renewal
│ ├── admin_dashboard.html # Admin overview
│ ├── admin_users.html # User management
│ └── admin_subscriptions.html # Subscription management
├── static/
│ └── images/ # Static images (carousel, etc)
├── db.sqlite3 # Development database
├── manage.py # Django management script
├── requirements.txt # Python dependencies
└── .gitignore # Git ignore rules
- Python 3.12 or higher
- pip (Python package manager)
- Virtual environment tool (venv or virtualenv)
- Clone the repository
git clone <repository-url>
cd smart-biz- Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Configure environment variables
cp .env.example .env
# Edit .env with your configuration- Run migrations
cd smartbiz
python manage.py migrate- Create subscription plans
python manage.py create_subscription_plans- Create superuser (admin account)
python manage.py createsuperuser- Run development server
python manage.py runserver- Access the application
- Public site: http://localhost:8000/
- Admin panel: http://localhost:8000/admin/
- User dashboard: http://localhost:8000/dashboard/
- Register - Create an account on the landing page
- Choose Plan - Select Free, Basic, or Premium subscription
- Add Products - Create your product inventory with prices
- Record Sales - Log sales as they happen with quantities
- View Analytics - Check dashboard for sales trends and metrics
- Manage Inventory - Edit products, track low stock, delete items
- Access Admin Dashboard - Navigate to /admin-dashboard/
- Manage Users - View all registered businesses, activate/deactivate accounts
- Monitor Subscriptions - Track active subscriptions, see due renewals
- View Revenue - Monitor total revenue from all subscriptions
- Manage Plans - Update or modify subscription tiers as needed
Extended Django User model with role-based access control (admin/staff flags)
- Represents subscription tier options (Free, Basic, Premium)
- Stores pricing, duration, and feature descriptions
- Links users to their current subscription plan
- Tracks activation dates, expiration, and renewal status
- One-to-one relationship with User
- User inventory items with buying/selling prices
- Stock quantity tracking
- Many-to-one relationship with User
- Transaction records for each product sale
- Quantity and total price tracking
- Timestamp for analytics
- Many-to-one relationships with User and Product
POST /login/- User loginPOST /logout/- User logoutPOST /register/- New user registration
GET /dashboard/- Main dashboard with metricsGET /products/- List all productsPOST /products/new/- Create new productPOST /products/<id>/edit/- Edit existing productPOST /products/<id>/delete/- Delete productGET /products/<id>/sale/- Record sale formPOST /products/<id>/sale/- Submit sale recordGET /sales/history/- View all sales
GET /subscription/plans/- Browse subscription tiersGET /subscription/plans/<id>/renew/- Renew/upgrade subscriptionGET /subscription/status/- View current subscription
GET /admin-dashboard/- Admin overviewGET /admin-users/- Manage usersGET /admin-subscriptions/- Manage subscriptionsPOST /admin-users/<id>/toggle/- Activate/deactivate userPOST /admin-subscriptions/<id>/toggle/- Toggle subscription status
DEBUG=False
SECRET_KEY=your-secret-key-here
ALLOWED_HOSTS=localhost,127.0.0.1
# Database (optional, defaults to SQLite)
DB_ENGINE=django.db.backends.sqlite3
DB_NAME=db.sqlite3
# Email (for password resets and notifications)
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
# Payment Gateway (when implemented)
STRIPE_PUBLIC_KEY=pk_test_xxxxx
STRIPE_SECRET_KEY=sk_test_xxxxx
Key settings in smartbiz/settings.py:
DEBUG- Set to False in productionALLOWED_HOSTS- Add your domainDATABASES- Configure database connectionEMAIL_BACKEND- Configure email serviceINSTALLED_APPS- Modify if adding new appsTEMPLATES- Template configuration
- Never commit .env files - Store sensitive data in environment variables
- Use strong SECRET_KEY - Change the default Django secret key
- Enable HTTPS - Use SSL/TLS in production
- Database Security - Use strong database passwords
- User Permissions - Role-based access control is implemented
- CSRF Protection - All forms include CSRF tokens
- SQL Injection - Using Django ORM prevents SQL injection
- XSS Protection - Django template engine escapes user input
- Query optimization with select_related and prefetch_related
- Database indexing on frequently queried fields
- Static file caching in production
- Responsive images for mobile devices
- Minimal CSS/JS to reduce page load time
- Lazy loading for heavy components
Run tests with:
python manage.py testTest coverage includes:
- User authentication flows
- Product CRUD operations
- Sales recording and calculations
- Subscription management
- Admin dashboard functionality
python manage.py runserver 0.0.0.0:8000pip install gunicorn
gunicorn smartbiz.wsgi:application --bind 0.0.0.0:8000FROM python:3.12
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["gunicorn", "smartbiz.wsgi:application", "--bind", "0.0.0.0:8000"]- Set
DEBUG=False - Update
SECRET_KEYto a strong random value - Configure
ALLOWED_HOSTSwith your domain - Use PostgreSQL instead of SQLite
- Set up email configuration for notifications
- Use environment variables for all secrets
- Enable HTTPS and security headers
- Configure CORS if needed for API access
- Payment gateway integration (Stripe/PayPal)
- Email notifications for subscription renewals
- Advanced reporting and export to CSV/PDF
- Multi-currency support
- Multi-user support for Premium tier
- API access for Premium customers
- Mobile app (iOS/Android)
- Offline mode with sync
- Multi-location/branch management
- Custom branding for businesses
- Advanced inventory forecasting
- Integration with payment processors
Issue: "No module named 'django'"
- Solution: Activate virtual environment and install requirements
source venv/bin/activate
pip install -r requirements.txtIssue: "ModuleNotFoundError: No module named 'core'"
- Solution: Ensure you're running commands from the smartbiz directory
cd smartbiz
python manage.py runserverIssue: Database errors on first run
- Solution: Run migrations
python manage.py migrate
python manage.py create_subscription_plansIssue: "Permission denied" for venv activation
- Solution: Check file permissions
chmod +x venv/bin/activate
source venv/bin/activate- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
This project is licensed under the MIT License - see LICENSE file for details.
For issues, questions, or suggestions:
- Open an issue on GitHub
- Contact: support@smartbiz.local
- Documentation: [Add documentation link]
- Django framework and community
- Bootstrap for responsive design
- Google Fonts for typography
- Built with passion for African small business owners
- Initial release
- User authentication and registration
- Product inventory management
- Sales recording and tracking
- Dashboard with 7-day analytics
- Three-tier subscription system
- Admin dashboard for platform management
- Mobile-responsive design
- KES pricing for African markets
Made with focus on simplicity, affordability, and the needs of small business owners.