Hajj Performers' Qurbani Tracker

This is a comprehensive admin dashboard for managing Hajj performers. It provides a secure, efficient, and user-friendly interface for administrators to handle all aspects of performer data, from registration to tracking their status during the pilgrimage.

Tech Stack :
Hajj Performers' Qurbani Tracker

Hajj Admin Panel

This is a comprehensive admin dashboard for managing Hajj performers. It provides a secure, efficient, and user-friendly interface for administrators to handle all aspects of performer data, from registration to tracking their status during the pilgrimage.
The application is a full-stack solution built with Next.js, Firebase, and Tailwind CSS, featuring robust authentication, real-time data management, and automated notifications.
Hajj Admin Panel

Technology Stack

The application leverages a curated set of modern technologies to deliver a seamless and powerful experience.
Next.js React TypeScript Firebase Tailwind CSS ShadCN UI Twilio TanStack Table Zod

📸 Screenshots

Dashboard Overview

Dashboard Real-time Hajj pilgrims summary

All Performers

All Performers Record of all Hajj Performers

Pending Qurbani Page

Pending Qurbani Page Record of performers whose qurbani is pending

Completed Qurbani Page

Completed Qurbani Page Record of performers whose qurbani is completed

Add Performer Page

Add Performer Page Page to add a new performer

Both Arabic and English Support

Quotation Admin panel supports both Arabic and English language

Core Features

1. Secure, Role-Based Authentication

The system ensures that only authorized administrators can access the dashboard, employing a multi-layered security model.
  • Client-Side Auth: Utilizes Firebase Authentication (Email/Password) for initial user verification against a trusted identity provider.
  • Backend Protection: All API endpoints and Server Actions are protected. A custom, short-lived JSON Web Token (JWT) is issued upon successful Firebase login. This token is sent with every subsequent request and verified by a Next.js Middleware, ensuring that no unauthorized requests reach the server logic. This prevents direct, unauthenticated access to sensitive operations.
Screenshot: Login Page ![Login Screen]([Link to Your Login Screenshot Here])

2. Real-Time Pilgrim Data Management

The core of the application is a dynamic and responsive data table for complete pilgrim (performer) management, built with TanStack Table.
  • Full CRUD Operations:
    • Create: Add new pilgrims via a validated, user-friendly form.
    • Read: View all pilgrims in a paginated, sortable table.
    • Update: Edit pilgrim details seamlessly in a modal dialog.
    • Delete: Safely remove records with a confirmation step to prevent accidental data loss.
  • Real-Time Synchronization: The dashboard is powered by a Cloud Firestore real-time listener (
    ). Any change in the database—whether made by the current admin, another admin, or a backend process—is instantly reflected across all active client dashboards without needing a page refresh.
  • Advanced Table Features:
    • Global Search: Quickly filter the entire dataset by name or passport number.
    • Column-based Filtering: Filter pilgrims by specific criteria, such as Qurbani status.
    • Pagination: Efficiently handle thousands of records with client-side pagination.
Screenshot: Main Dashboard Table ![Dashboard Screenshot]([Link to Your Dashboard Screenshot Here])

3. Automated Qurbani Status & SMS Notifications

This feature solves a critical communication gap by providing timely updates to pilgrims.
  • Status Toggling: Admins can update the Qurbani (sacrifice) status for a pilgrim from 'Pending' to 'Done' with a single click on a switch within the data table.
  • Automated Workflow: Updating the status to 'Done' triggers a Next.js Server Action.
  • SMS Notification: The Server Action securely calls the Twilio API using server-side credentials to dispatch an SMS notification to the pilgrim's registered phone number. The message is sent in Urdu, confirming the completion of their Qurbani. This automation eliminates manual communication and provides instant peace of mind.
Flow Diagram: Qurbani Notification
Screenshot: Qurbani Status Switch ![Qurbani Switch Screenshot]([Link to Your Qurbani Switch Screenshot Here])

4. Full Internationalization (i18n)

The application is built to be fully bilingual, supporting both English and Arabic.
  • Language Toggling: Users can switch between languages with a single click. The chosen language is persisted in
    .
  • Dynamic Content: All UI text, labels, and messages are sourced from JSON dictionary files (
    ,
    ).
  • RTL Layout Support: When Arabic is selected, the entire application layout flips to a Right-to-Left (RTL) orientation. This is handled gracefully with Tailwind CSS's RTL variants (
    ,
    ) and dynamic adjustments in component styling.
Screenshot: Arabic RTL Layout ![RTL Layout Screenshot]([Link to Your RTL Screenshot Here])

Architectural Qualities

  • Security: Sensitive operations are gated behind authenticated Server Actions and API routes. Environment variables containing secrets are stored server-side and are not exposed to the client.
  • Scalability: By leveraging serverless technologies like Next.js and Firebase, the application can handle significant load without manual intervention. Firestore provides scalable, real-time data access.
  • Maintainability: The codebase is organized by feature, using reusable React components (ShadCN UI) and a clear separation of concerns between UI, state management, and server-side logic. Using TypeScript ensures type safety and improves developer experience.
  • User Experience (UX): The interface is designed to be intuitive and efficient. Real-time updates, optimistic UI patterns (where applicable), and clear feedback (toasts, loading states) provide a smooth and responsive experience for the administrator.
  • Data Integrity: Zod is used for schema validation on all forms, ensuring that data sent to the backend is in the correct format before it ever reaches the database. This prevents data corruption and provides clear, immediate feedback to the user on input errors.