A mobile-first web application for making PAYE (Pay As You Earn) literacy engaging through quizzes, community discussions, and a practical tax calculator for Nigeria.
- 3-question rounds with MCQ and multi-select questions
- Scoring system: +10 for correct answers, +2 for attempts
- Badges: Tax Rookie, PAYE Pro, Relief Ranger, Streak Starter, Hot Streak, Boss Level
- Daily streaks based on Africa/Lagos timezone
- 3 Progressive levels: Basics (L1), Calculations (L2), Scenarios (L3)
- Leaderboard: Weekly + All-time Top 50
- Create threads with markdown support and tags
- Reply, vote (upvote/downvote), and report content
- Mention system with
@usernamesuggestions - Subscribe to threads for notifications
- Moderation tools: hide/lock/pin threads, accept answers
- Full-text search across threads
- Rate limiting and profanity filtering
- Consultant applications with document uploads (CV, certificates, IDs)
- Admin approval workflow with verification and activity statuses
- Consultant profiles (experience, specialties, rates, availability)
- Browse and discover verified, active consultants
- Real-time chat between users and consultants
- Invoices with VAT and Paystack fees
- Paystack payments, wallet credits, withdrawals
- Service completion workflow with 48-hour hold and dispute support
- Admin monitoring for transactions, disputes, and refunds
- Monthly or Annual calculation modes
- Configurable PAYE rules (admin-editable)
- Progressive tax brackets
- Deductions: Pension, NHF, Life Assurance, Voluntary Contributions
- Clean breakdown with line items
- Save calculations to profile
- Export/Print as PDF
- Framework: Next.js 16 (App Router) + TypeScript
- Styling: Tailwind CSS v4 + class-variance-authority
- Animations: Framer Motion
- State Management: Zustand
- Backend: Firebase (Auth, Firestore, Storage, Cloud Functions)
- Validation: Zod
- Date Handling: date-fns + date-fns-tz (Africa/Lagos)
- Testing: Vitest + React Testing Library
- Markdown: react-markdown + remark-gfm + rehype-sanitize
- Payments: Paystack
- Node.js 18+ and npm
- Firebase project with:
- Authentication (Anonymous + Google provider)
- Firestore Database
- Cloud Functions
- App Check (optional but recommended)
git clone <your-repo-url>
cd ijoba606
npm install- Create a Firebase project at https://console.firebase.google.com
- Enable Authentication:
- Go to Authentication > Sign-in method
- Enable Anonymous and Google providers
- Create Firestore Database:
- Go to Firestore Database > Create database
- Start in test mode (we'll deploy rules later)
- Get your Firebase config:
- Go to Project Settings > General
- Scroll to "Your apps" > Web app
- Copy the configuration
Create .env.local in the project root:
# Copy from .env.local.example
cp .env.local.example .env.localEdit .env.local with your Firebase config:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
# Feature Flags
NEXT_PUBLIC_LEADERBOARD_ENABLED=true# Install Firebase CLI
npm install -g firebase-tools
# Login to Firebase
firebase login
# Initialize Firebase (select Firestore, Functions, Hosting)
firebase init
# Deploy Firestore rules, indexes, and Storage rules
firebase deploy --only firestore:rules,firestore:indexes,storageCloud Functions are included in functions/ and handle:
- Quiz round scoring and badge awarding
- Forum CRUD, voting, reports, and moderation
- Consultant applications and requests
- Paystack webhooks, invoice emails, chat notifications
- Scheduled funds release for consultant wallets
Deploy functions:
firebase deploy --only functionsFunctions require the following secrets (set via Firebase Functions secrets):
PAYSTACK_SECRET_KEYEMAIL_USEREMAIL_PASSWORDEMAIL_FROM
Create a document at configs/payeRules in Firestore with this structure:
{
"currency": "NGN",
"year": 2025,
"reliefs": {
"pensionIsDeductible": true,
"nhfIsDeductible": true
},
"brackets": [
{ "upTo": 300000, "rate": 0.07 },
{ "upTo": 600000, "rate": 0.11 },
{ "upTo": 1100000, "rate": 0.15 },
{ "upTo": 1600000, "rate": 0.19 },
{ "upTo": 3200000, "rate": 0.21 },
{ "upTo": Infinity, "rate": 0.24 }
],
"personalAllowance": {
"type": "hybrid",
"value": 200000
},
"notes": "Educational purposes only. Not legal or tax advice. Based on Nigeria PAYE 2025 estimates."
}Note: Infinity should be stored as 9999999999 in Firestore
Add sample questions to the questions collection. Example:
{
"level": 1,
"type": "single",
"prompt": "What does PAYE stand for?",
"options": [
"Pay As You Earn",
"Pay After You Earn",
"Pay All Your Earnings",
"Pay Annual Year End"
],
"correct": [0],
"explanation": "PAYE stands for Pay As You Earn, a system where tax is deducted from your salary before you receive it.",
"tags": ["basics"]
}npm run devOpen http://localhost:3000 in your browser.
npm run build
npm startijoba606/
├── app/ # Next.js App Router pages
│ ├── play/ # Quiz level selection
│ ├── round/ # Active quiz round
│ ├── results/ # Round results
│ ├── leaderboard/ # Leaderboard (weekly/all-time)
│ ├── profile/ # User profile & badges
│ ├── calculator/ # Tax calculator
│ │ └── result/ # Calculator results
│ ├── forum/ # Forum pages
│ ├── admin/ # Admin pages (users, moderation, consultants, transactions)
│ ├── consultants/ # Consultant marketplace
│ ├── dashboard/ # User dashboard (invoices, services)
│ ├── legal/ # Legal pages
│ └── layout.tsx # Root layout
├── components/
│ ├── layout/ # Header, Footer
│ ├── providers/ # Auth provider
│ ├── ui/ # Toast, shared components
│ ├── quiz/ # Quiz components
│ ├── calculator/ # Calculator components
│ └── forum/ # Forum components (to be implemented)
├── lib/
│ ├── firebase/ # Firebase config, auth, functions
│ ├── store/ # Zustand stores
│ ├── types/ # TypeScript types
│ ├── utils/ # Utilities (badges, scoring, streak, calculator, etc.)
│ └── validation/ # Zod schemas
├── firestore.rules # Firestore security rules
├── storage.rules # Firebase Storage rules
├── vitest.config.ts # Test configuration
└── package.json
# Run tests
npm test
# Run tests with UI
npm run test:ui
# Run tests with coverage
npm run test:coverage- Push your code to GitHub
- Import project on Netlify
- Set environment variables from
.env.local - Build command:
npm run build, publish dir:.next
- Push your code to GitHub
- Import project on Vercel
- Add environment variables from
.env.local - Deploy!
npm run build
firebase deploy --only hostingTo make a user an admin:
- Go to Firestore console
- Navigate to
users/{uid} - Update
rolefield to"admin" - User can now access
/adminand management pages
- Social sharing with custom OG images
- Expanded test coverage
- Additional legal/compliance content
- Fork the repository
- Create a feature branch
- Make your changes
- Write tests
- Submit a pull request
MIT License - See LICENSE file for details
For issues, questions, or contributions, please open an issue on GitHub.
Made with 💜 for Nigeria 🇳🇬