FastPay is a single-page web app that lets Bangladeshi households discover, track, and pay recurring utility bills from one dashboard. Customers can browse promoted services, filter bills by category, inspect bill details, and manage personal payments with exportable PDFs. The project is powered by modern React tooling and hooks that integrate Firebase authentication with a REST API backend.
🔗 Live: https://fastpay-bd.web.app/
- Features
- Tech Stack
- Architecture
- Getting Started
- Environment Variables
- Available Scripts
- Deployment Notes
- Useful Resources
- Hero marketing + category awareness — Rich hero slider, animated category cards, and CTA components introduce top services and payment perks.
- Bill catalog + filtering —
AllBillspulls live data from/billswith category filters, error states, loading skeletons, and responsive grid cards. - Bill detail & checkout —
BillDetaildisplays contextual icons, billing metadata, and a modal-based payment flow that persists transactions and sets bill status topaid. - Personal dashboard —
MyBillsfetches authenticated user payments, supports edit/delete actions with optimistic loading, SweetAlert confirmations, and aggregated totals. - PDF reporting — Users can export their payment history as a branded multi-column PDF via
jspdf+jspdf-autotable. - Authentication + route protection — Firebase email/password auth is wrapped by
AuthProvider,useAuth, andProtectedRouteto guard profile routes. - Performance-oriented UX — React Helmet for metadata, reusable loading component, DaisyUI/Tailwind theming, Lucide icons, Swiper sliders, and toast notifications.
| Layer | Packages / Services |
|---|---|
| Framework & Build | react 19, react-router 7, vite 7, @vitejs/plugin-react |
| Styling & UI | tailwindcss 4, @tailwindcss/vite, daisyui, @emotion/react, lucide-react, react-icons, swiper, react-awesome-reveal |
| State, Hooks & Utilities | react-hot-toast, date-fns, custom hooks (useAuth, useAxiosPublic, useTheme, useHelmet) |
| Data & Networking | axios, REST API hosted at VITE_BASE_URL |
| Auth & Platform | firebase (Authentication + Hosting) |
| Productivity | jspdf, jspdf-autotable, sweetalert2, react-simple-typewriter |
| Tooling & Quality | eslint, @eslint/js, eslint-plugin-react-hooks, eslint-plugin-react-refresh, globals |
fastpay-client/
├── public/ # Static assets injected at build time
├── src/
│ ├── components/ # Reusable UI atoms & organisms (HeroSlider, BillCard, Navbar, Footer, etc.)
│ ├── pages/ # Route-level screens (Home, AllBills, MyBills, BillDetail, Auth pages)
│ ├── hooks/ # Custom hooks (Axios wrapper, Auth, Helmet, Theme)
│ ├── auth/ # Context provider + protected route wrapper
│ ├── layouts/ # Root layout with Navbar/Footer composition
│ ├── routes/ # React Router configuration
│ ├── config/ # Firebase initialization
│ ├── assets/ # Images & icons (Hero backgrounds, category art)
│ └── main.jsx # App bootstrap with providers
├── index.html # Vite entry template
├── vite.config.js # Build configuration (React SWC, Tailwind plugin)
└── package.json # Scripts + dependencies
Key implementation notes:
- Data fetching centralizes Axios defaults via
useAxiosPublic, so switching environments only requires updatingVITE_BASE_URL. - Helmet integration lives in
useHelmet, providing unique titles/meta descriptions per page for better SEO even inside Firebase hosting. - Protected flows rely on context to expose
userandloadingflags, enabling guards forMyBillsand payment modals. - UI theming uses Tailwind utility classes with DaisyUI components for form controls, modals, and cards, ensuring consistent theming without custom CSS overhead.
- Clone
git clone <repo-url> cd fastpay-client
- Install
npm install
- Configure environment variables (see the next section) and start a local dev server:
npm run dev
- Visit
http://localhost:5173to explore the app with Vite HMR.
Create a .env file in the project root (Vite automatically exposes keys prefixed with VITE_):
VITE_apiKey=<your_firebase_api_key>
VITE_authDomain=<your_project.firebaseapp.com>
VITE_projectId=<your_project_id>
VITE_storageBucket=<your_project.appspot.com>
VITE_messagingSenderId=<firebase_sender_id>
VITE_appId=<firebase_app_id>
VITE_BASE_URL=<https://your-fastpay-api.com>Tips:
- The Firebase values come from Project Settings → General in the Firebase console.
VITE_BASE_URLshould point to the deployed FastPay REST API (the production build targetshttps://fastpay-server-bay.vercel.app/).- Do not commit
.envto git; create.env.exampleif you need to share templates with collaborators.
| Command | Description |
|---|---|
npm run dev |
Start Vite dev server with Fast Refresh. |
npm run build |
Create a production build in dist/. |
npm run preview |
Preview the production build locally. |
npm run lint |
Run ESLint across the project (JS + JSX). |
- Production builds are created via
npm run buildand can be hosted on Firebase Hosting, Vercel, Netlify, or any static host that serves thedist/folder. - This repository is currently deployed to Firebase Hosting (
fastpay-bd.web.app). Usefirebase.jsonfor rewrites if you introduce additional SPA routes. - Ensure the backend (
fastpay-server) supports HTTPS and includes CORS rules for your hosting domains. - For CI/CD, run
npm ci && npm run build && firebase deploy(or the equivalent workflow for your hosting provider).
- Live App
- Firebase Console — auth credentials & hosting
- Tailwind CSS & DaisyUI — styling references
- React Router Docs — nested routes, loaders, and navigation patterns
- Axios — HTTP client used by
useAxiosPublic - jsPDF & AutoTable — PDF export utilities
Have suggestions or find a bug? Please open an issue or create a pull request — contributions are welcome!