Skip to content

Repository files navigation

🌳 Tally β€” Attendance Manager

A modern, gamified attendance tracking platform for small teams. Staff submit, admin approves, and every present day plants a tree in your team's living forest.

React Vite Firebase Tailwind CSS License: MIT Live

🌐 Try it live β†’ Β· Report Bug Β· Request Feature


✨ Why Tally?

Tracking attendance shouldn't feel like a chore. Tally turns the boring grind into a delightful, motivating experience β€” your team's record is visualized as a living forest where every present day plants a tree, overtime adds a bonus glow, and absences leave withered stumps. The forest changes with the time of day, with a sun that arcs across the sky, twinkling stars at night, a flowing river, and butterflies that appear as your team thrives.

Built for office teams, interns, and small businesses that want a clean, modern, free alternative to enterprise time-tracking tools.


🎯 Features

Core

  • 🏒 Multi-tenant workspaces β€” each admin owns a private workspace with full data isolation
  • πŸ‘₯ Role-based access β€” admins manage, staff submit; tight Firestore security rules enforce boundaries
  • βœ‰οΈ Email-based staff invites β€” admin adds staff by email; they receive a "set your password" link and join in one click
  • πŸ” Google sign-in for admins plus traditional email/password
  • ⏱️ Check-in / check-out flow β€” staff clock in when they arrive, clock out when they leave; entry/exit times stored automatically
  • πŸ“… Full-year attendance calendar with intelligent day classification (on-time, late, early-out, etc.)
  • βœ… Admin approval workflow β€” staff submissions are pending until approved (or set workspace to auto-approve)
  • πŸ—“οΈ Date-range leave requests β€” staff request planned off days 3+ days in advance with reason; admin can mark off periods directly for any staff
  • βš™οΈ Configurable per workspace β€” office hours, working days (Mon–Sat or Mon–Fri etc.), and a holiday calendar
  • πŸ“Έ Photo uploads β€” company logo and staff profile photos via Cloudinary (free tier, no Firebase Storage required)

The Forest 🌳

A unique gamified visualization that lives below every attendance calendar:

  • 🌱 Every present day plants a tree at a stable, seed-deterministic position
  • 🌳 Tree size = hours worked ratio; arrive late or leave early β†’ stunted tree
  • ✨ Overtime grows oversized trees with a soft yellow glow
  • πŸͺ΅ Absent days wither into dead trees; πŸͺ¨ planned off-days become stumps
  • ⏳ Today's tree grows in real-time β€” checked in but not out? The tree gets bigger every 30 seconds with a pulsing emerald halo
  • πŸ¦‹ Wildlife appears as your forest thrives β€” butterflies, rabbits, deer
  • 🐦 Birds fly across the sky β€” count grows with healthier forests
  • πŸŒ… Live day/night cycle β€” sun arcs from east to west, moon rises after dusk, stars twinkle at night, all driven by the actual system clock
  • 🌊 Animated flowing river with shimmers and floating leaves drifting downstream
  • 🌷 Naturalistic ground β€” clustered grass, blooming flowers, and the occasional mushroom

UX polish

  • 🎨 Clean, modern design inspired by Linear/Vercel
  • πŸŒ“ Smooth animations and live transitions
  • πŸ“± Fully responsive
  • πŸ”” Inline toast notifications (no ugly browser alerts)
  • ⚑ Real-time Firestore subscriptions β€” no manual refresh needed

πŸ›  Tech Stack

Layer Technology
Frontend React 19, Vite 8, React Router 7
Styling Tailwind CSS 4, custom design tokens
Auth Firebase Authentication (email/password + Google OAuth)
Database Cloud Firestore with security rules
Image hosting Cloudinary (unsigned upload preset)
Icons Lucide React
Date handling date-fns
Hosting Vercel

πŸ“Έ Screenshots

Add screenshots here after deployment

Login Dashboard Calendar Forest
TBD TBD TBD TBD

πŸš€ Quick Start

Prerequisites

1. Clone & install

git clone https://github.com/rajendra7169/attendance-system.git
cd attendance-system
npm install

2. Set up Firebase

Create a project

  1. Go to the Firebase Console β†’ Add project
  2. Skip Google Analytics (optional)

Enable Authentication

  • Build β†’ Authentication β†’ Get started
  • Sign-in method tab β†’ Enable Email/Password
  • Enable the "Email link (passwordless sign-in)" toggle inside Email/Password (optional but recommended)
  • Also enable Google provider β†’ set support email β†’ Save

Create Firestore Database

  • Build β†’ Firestore Database β†’ Create database
  • Choose a region close to your users (e.g. asia-south1)
  • Start in production mode (we'll apply our security rules next)

Apply security rules

Paste the contents of firestore.rules into the Firestore β†’ Rules tab and publish.

Get your config

  • Project Settings (gear icon) β†’ Your apps β†’ Web app β†’ Register app
  • Copy the firebaseConfig values for the next step

3. Set up Cloudinary

  1. Sign up at cloudinary.com
  2. On the dashboard, copy your Cloud Name
  3. Settings β†’ Upload β†’ Upload presets β†’ Add upload preset
    • Signing Mode: Unsigned (important β€” required for browser uploads)
    • Folder: attendance-system (optional)
    • Save and copy the preset name

4. Environment variables

Copy the example and fill in your values:

cp .env.example .env.local

Edit .env.local:

# Firebase
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
VITE_FIREBASE_APP_ID=1:123456789:web:abcdef

# Cloudinary
VITE_CLOUDINARY_CLOUD_NAME=your_cloud_name
VITE_CLOUDINARY_UPLOAD_PRESET=your_preset_name

5. Run

npm run dev

Open http://localhost:5173. Click "Create one" to set up your first workspace.


πŸ“‚ Project Structure

attendance-system/
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Calendar.jsx     # Year calendar + attendance modal
β”‚   β”‚   β”œβ”€β”€ Forest.jsx       # The living forest visualization
β”‚   β”‚   β”œβ”€β”€ Header.jsx       # Top navigation with pending badge
β”‚   β”‚   └── MemberCard.jsx   # Staff card with attendance stats
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   └── AuthContext.jsx  # User + workspace state with live subscriptions
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   └── useAuth.js
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ Login.jsx        # Unified email/password + Google sign-in
β”‚   β”‚   β”œβ”€β”€ Signup.jsx       # Workspace creation
β”‚   β”‚   β”œβ”€β”€ Onboard.jsx      # Post-Google sign-up workspace setup
β”‚   β”‚   β”œβ”€β”€ ResetPassword.jsx
β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx    # Admin + Staff dashboards
β”‚   β”‚   β”œβ”€β”€ MemberDetail.jsx # Staff profile + calendar + forest
β”‚   β”‚   └── Admin.jsx        # Company settings, staff, approvals
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ firebase.js
β”‚   β”‚   β”œβ”€β”€ calendarUtils.js # Day classification, time math
β”‚   β”‚   β”œβ”€β”€ staffUtils.js    # Invite, create, resend
β”‚   β”‚   └── uploadImage.js   # Cloudinary upload helper
β”‚   β”œβ”€β”€ App.jsx              # Routes
β”‚   └── main.jsx             # Entry point
β”œβ”€β”€ firestore.rules          # Production-ready security rules
β”œβ”€β”€ vercel.json              # Vercel SPA routing config
β”œβ”€β”€ .env.example             # Template for local env vars
└── package.json

πŸ“œ Available Scripts

Command What it does
npm run dev Start the Vite dev server at localhost:5173
npm run dev -- --host 0.0.0.0 Expose dev server to your LAN (test on other devices)
npm run build Production build to dist/
npm run preview Serve the production build locally
npm run lint Run ESLint

☁️ Deploy to Vercel

The fastest path to production:

1. Push to GitHub (see Pushing this code below)

2. Import to Vercel

  1. Go to vercel.com/new β†’ Import Git Repository
  2. Pick your attendance-system repo
  3. Vercel auto-detects Vite β€” no configuration needed
  4. Add environment variables (copy each VITE_* from your .env.local)
  5. Click Deploy

3. Update Firebase for production

In the Firebase Console β†’ Authentication β†’ Settings β†’ Authorized domains β†’ Add domain β†’ enter your Vercel URL (e.g. your-app.vercel.app) or custom domain.

For Google sign-in to work, also add your domain to the OAuth Web client in Google Cloud Console β†’ Credentials:

  • Authorized JavaScript origins β†’ https://your-domain
  • Authorized redirect URIs β†’ https://your-domain/__/auth/handler

That's it. Subsequent pushes to main auto-deploy in ~30 seconds.

Password-reset URL: No need to set this in the Firebase Console β€” Tally passes the current site's origin as the action URL on every reset call, so it works automatically across localhost, Vercel previews, and production.

Custom domain (optional)

In Vercel β†’ your project β†’ Settings β†’ Domains β†’ add tally.yourdomain.com (or any subdomain). Vercel auto-provisions SSL. Then re-add the custom domain to Firebase Authorized Domains and the Google Cloud OAuth client.

Alternative: Netlify

Drag-and-drop the dist/ folder after npm run build, or connect the GitHub repo. Add the same env vars in Site settings.


πŸ—Ί Roadmap

  • Bulk CSV staff import
  • Monthly attendance report export (PDF/CSV)
  • Email notifications on approval / rejection
  • Mobile native apps (React Native)
  • Geofencing for office-based check-in
  • Customizable forest themes (snowy winter, autumn, etc.)
  • Achievement badges (perfect month, 100-day streak, etc.)
  • Slack / WhatsApp integration

🀝 Contributing

Contributions are very welcome. Whether it's a bug fix, a new feature, or improved docs:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

For larger changes, please open an issue first to discuss the approach.


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

You're free to use it in personal or commercial projects.


πŸ™ Acknowledgments


πŸ‘€ Author

Rajendra Pandey


⭐ If you found this project useful, please consider giving it a star! ⭐

Made with ❀️ in Nepal

About

🌳 Tally β€” a modern, gamified attendance manager with a living forest visualization. Multi-tenant SaaS for small teams. Live: https://tally.rajendrapandey.info.np

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages