A production-ready volunteer time tracking platform built with Next.js, Firebase, and Tailwind CSS. The application supports multi-organization membership, robust admin tooling, and auditable time adjustments.
- Email/password authentication with email verification and password reset flows
- Role-based access control with MEMBER, ORG_ADMIN, and SUPER_ADMIN roles
- Multi-organization membership with an active organization switcher
- Real-time clock-in/clock-out with overlap prevention and geolocation capture hooks
- Member dashboard with daily/weekly/monthly totals and export to Excel
- Admin console for managing members, auditing changes, and maintaining compliance logs
- Secure invite workflow with expiring tokens
- Firebase Cloud Functions enforcing server-side validation and audit trails
- Firestore security rules to protect data integrity
- Next.js 14 (App Router) + TypeScript
- Tailwind CSS for utility-first styling
- Firebase Auth, Firestore, and Cloud Functions
- Zod for shared validation
- TanStack Table for accessible data grids
- date-fns for time manipulation
- SheetJS for Excel export
- Node.js 18+
- Yarn or npm
- A Firebase project with Authentication and Firestore enabled
- A Firebase service account JSON file for server-side operations
Copy the template and populate with your project values.
cp .env.local.example .env.local| Variable | Description |
|---|---|
NEXT_PUBLIC_FIREBASE_API_KEY |
Firebase web API key |
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN |
Firebase auth domain |
NEXT_PUBLIC_FIREBASE_PROJECT_ID |
Firebase project ID |
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET |
Storage bucket |
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID |
Messaging sender ID |
NEXT_PUBLIC_FIREBASE_APP_ID |
Firebase app ID |
FIREBASE_SERVICE_ACCOUNT_KEY_PATH |
Path to service account JSON |
NEXTAUTH_SECRET |
Random string for session encryption |
npm installnpm run devNavigate to http://localhost:3000 to access the dashboard.
Deploy Firestore rules and Cloud Functions:
firebase deploy --only firestore:rules,functionsEnsure your
firebase.jsonreferencesfirebase/firestore.rulesandfirebase/functions.
Provide the service account path in .env.local, then run:
npm run seedThis script creates two organizations, three users, and example time entries covering a week.
npm testnpm run build
npm startThe project follows the schema provided in the project brief. Each document includes createdAt and updatedAt timestamps to enable auditing and compliance tracking.
| Function | Description |
|---|---|
clockIn / clockOut |
Manage real-time sessions with overlap prevention |
getMyEntries |
Paginated member entries |
adminListEntries |
Admin-visible entries with filtering |
adminAddEntry, adminEditEntry, adminDeleteEntry |
Audited admin management tools |
exportEntriesXlsx |
Returns entry data for client-side export |
inviteUser, acceptInvite |
Invitation workflow |
- Firestore rules restrict read/write access by organization membership and role.
- Cloud Functions validate inputs with Zod and enforce audit logging.
- Admin adjustments require a reason and generate immutable audit log entries.
Add screenshots after running locally to showcase the dashboard and admin views.
MIT