Skip to content

Repository files navigation

IEEE Volunteer Tracking

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.

Features

  • 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

Tech Stack

Getting Started

1. Prerequisites

  • Node.js 18+
  • Yarn or npm
  • A Firebase project with Authentication and Firestore enabled
  • A Firebase service account JSON file for server-side operations

2. Environment Variables

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

3. Install Dependencies

npm install

4. Run the App

npm run dev

Navigate to http://localhost:3000 to access the dashboard.

5. Firebase Setup

Deploy Firestore rules and Cloud Functions:

firebase deploy --only firestore:rules,functions

Ensure your firebase.json references firebase/firestore.rules and firebase/functions.

6. Seed Sample Data

Provide the service account path in .env.local, then run:

npm run seed

This script creates two organizations, three users, and example time entries covering a week.

7. Testing

npm test

8. Production Build

npm run build
npm start

Firestore Data Model

The project follows the schema provided in the project brief. Each document includes createdAt and updatedAt timestamps to enable auditing and compliance tracking.

Cloud Functions API

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

Security

  • 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.

Screenshots

Add screenshots after running locally to showcase the dashboard and admin views.

License

MIT

About

Test 1

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages