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 …