NaijaPOS is a secure, offline-first Point of Sale (POS) system built for Nigerian local businesses, designed to work reliably even with unstable internet.
# π³π¬ NaijaPOS - Local Point of Sale System
A secure, offline-first POS system designed for Nigerian local businesses. Built with modern web technologies and Firebase backend.
β¨ Features
- **π Role-Based Access Control**: Separate Admin and Staff dashboards
- **π¦ Inventory Management**: Add, edit, delete products with stock tracking
- **π° Sales Terminal**: Quick product search and sales recording
- **π Sales History**: View sales by date with staff filtering
- **π PDF Reports**: Generate daily sales reports
- **π Dark/Light Mode**: Easy on the eyes
- **π± Responsive Design**: Works on all devices
- **β‘ Offline-First**: Built as a PWA for unreliable connections
π‘οΈ Security Features
- β
Firebase Authentication (Email/Password)
- β
Firestore Security Rules (Role-based access)
- β
XSS Protection (HTML sanitization)
- β
Input Validation (Server-side rules + client-side)
- β
Rate Limiting (Checkout abuse prevention)
- β
Pre-commit Security Checks (Automated scanning)
- β
Audit trail (Sales cannot be edited/deleted)
π Quick Start
### Prerequisites
- A Firebase account (console.firebase.google.com)
- A modern web browser
- Basic text editor
### Setup Instructions
1. **Clone the repository**
```bash
git clone
github.com
cd naija-pos
```
2. **Create Firebase Project**
- Go to Firebase Console
- Create a new project
- Enable **Authentication** (Email/Password provider)
- Enable **Cloud Firestore**
- Enable **Firebase Storage** (optional, for product images)
3. **Configure Firebase Credentials** π
```bash
# Copy the environment template
cp js/env.example.js js/env.js
# Edit js/env.js with your Firebase credentials
# Get these from: Firebase Console β Project Settings β Your Apps
```
**Important**: The `js/env.js` file contains your actual credentials and is gitignored.
See ENV_SETUP.md for detailed setup instructions.
4. **Deploy Security Rules**
```bash
# Install Firebase CLI
npm install -g firebase-tools
# Login and initialize β¦