A beautiful, feature-rich Next.js application for automated attendance tracking with modern UI and multiple customizable themes.
- β¨ Key Features
- πΈ Screenshots
- π‘ Project Idea
- π What's New in v1.0
- π οΈ Tech Stack
- π₯ Installation
- π Usage
- π File Structure
- π’ Customization for Different Institutions
- π€ Contributing
- π Automated Login & Data Scraping: Automatically logs into the website and fetches daily attendance data without manual intervention
- π Auto-Refresh on Startup: Automatically refreshes data when the computer starts up, eliminating the need for daily manual updates
- π Interactive Calendar Visualization: Beautiful calendar interface showing daily status β Present, Absent, Leave, Error, or Holiday with color-coded indicators
- π Monthly Statistics Dashboard: Clear overview of total absent, present, and leave counts for each month, excluding holidays and errors
- βοΈ Customizable Settings: Set custom holidays and configure website credentials from the Settings page, making it usable by anyone
- π Desktop Notifications: System notifications for important updates and status changes
- ποΈ Local Data Storage: All data is stored locally for maximum security and privacy
- π¨ Comprehensive Error Handling: Detailed error tracking and reporting when scraping fails (network issues, invalid credentials, etc.)
- ποΈ Holiday Management: Add and remove custom named holidays that are excluded from attendance calculations
- π¨ 8 Beautiful Themes: Light, Dark, Dracula, Nord, Monokai, DarkCode, Ocean, and Forest themes with modern sleek design
Dark Theme - Main Dashboard with Monthly Statistics and Interactive Calendar
Light Theme - Clean and Modern Interface
Custom Theme - One of 8 Available Themes
Settings Page - Credential Management, Holiday Setup, and Theme Selection
Our college has a policy: if a student is absent for more than two days in a month, their student ID gets automatically deactivated. However, there's a major limitation - the college website only shows total counts of present, absent, and leave days for the entire academic year, without revealing which specific days were marked as absent.
This lack of visibility became problematic. I often forgot to punch my ID card or questioned whether it was recorded properly.
The solution? Build a personal attendance tracker that automatically monitors daily attendance and visualizes it in a calendar format. What started as a 30-minute concept drafted with AI assistance evolved into a full-featured application within hours.
After months of usage and continuous improvements, it has become a comprehensive attendance management system that helps students stay on top of their attendance records with beautiful visualizations and smart automation.
- Shadcn/ui: Migrated to shadcn/ui component library
- Themes: Added modern design system with backdrop blur effects and 8 more themes
- Date Range Selection: Add multiple consecutive days as holidays in one action
- Visual Calendar Picker: Intuitive date selection with calendar interface
- Desktop Notifications: System notifications for attendance updates
- User Control: Easy customization in settings
- Data Validation: Enhanced input validation throughout the application
- Performance Optimization: Faster rendering and smoother interactions
- Bug Fixes: Resolved date calculation issues in holiday range selection
- Framework: Next.js - React-based full-stack framework
- UI Library: React - Modern component-based UI
- Styling: Tailwind CSS v4 - Utility-first CSS framework with custom properties
- Component Library: shadcn/ui - Modern, accessible React components
- Web Scraping: Puppeteer - Headless Chrome automation
- Icons: Lucide React - Beautiful, customizable icons
- Language: JavaScript/Node.js - Full-stack JavaScript development
Make sure you have Node.js installed on your system:
- Visit https://nodejs.org/
- Download the LTS version and install it
- Verify installation:
node --versionandnpm --version
1. Download the Project:
- Go to the GitHub repository
- Click the green "Code" button on the top right
- Select "Download ZIP"
- Extract the ZIP file to your desired location (e.g.,
C:\attendance-tracker)
2. One-Click Setup:
# Double-click on setup.bat
setup.bat- Installs dependencies in order to run this application
- Initializes data files
- Builds project with an optimized production version
3. Start the Application:
# Double-click start.bat
start.bat- Opens the app at
http://localhost:4040 - Keeps running until you close the window
4. Configure Settings:
- Go to
http://localhost:4040in your browser - Click "Settings" β Enter your college credentials
- Add holidays if needed
- Choose your favorite theme!
For automatic background operation:
# Double-click auto.bat (one-time setup)
auto.bat- Starts automatically on Windows boot
- Runs silently in background
- Auto-scrapes data every 3 hours
- Access anytime at
http://localhost:4040
Click to expand manual installation steps
- Download & Extract: Download ZIP file and extract
- Install Dependencies:
npm install - Create Data Files:
mkdir data echo {} > data/config.json echo [] > data/attendance.json echo [] > data/holidays.json echo {} > data/scrape-status.json
- Build:
npm run build - Start:
npm run start - Access: Open
http://localhost:3000
- Download & Setup: Download ZIP β Run
setup.batβ Runstart.bat - Configure: Open
http://localhost:4040β Go to Settings - Enter Credentials: Add your college login details
- Customize: Choose theme, add holidays, set preferences
- Manual: Double-click
start.batwhen needed - Auto: Run
auto.batonce for hands-free operation - Access: Always available at
http://localhost:4040
attendance-tracker/
βββ π§ Setup Files
β βββ setup.bat # Windows setup script (run once)
β βββ start.bat # Start application manually
β βββ auto.bat # Configure automatic startup (optional)
β βββ next.config.js # Next.js configuration
β
βββ π¨ UI Components
β βββ components/
β β βββ Calendar.js # Interactive calendar component
β β βββ MonthlyStats.js # Monthly statistics display
β β βββ HolidayManager.js # Holiday management interface
β β βββ Footer.js # Shared footer component
β β βββ ui/ # shadcn/ui components
β β βββ button.jsx # Custom button component
β β βββ calendar.jsx # Calendar picker component
β β βββ card.jsx # Card container component
β β βββ input.jsx # Input field component
β β βββ theme-toggle.jsx # Theme selection component
β β βββ ... (more UI components)
β β
βββ π Pages & API
β βββ pages/
β β βββ index.js # Main home page with calendar
β β βββ settings.js # Settings and configuration page
β β βββ _app.js # App wrapper with theme provider
β β βββ _document.js # Document with theme initialization
β β βββ api/ # Backend API routes
β β βββ attendance.js # Attendance data endpoints
β β βββ config.js # Configuration management endpoints
β β βββ holidays.js # Holiday management endpoints
β β βββ scrape.js # Scraping trigger endpoints
β β βββ scrape-status.js # Scraping progress tracking endpoints
β β
βββ π Styling & Themes
β βββ styles/
β β βββ globals.css # Global styles with 8 theme definitions
β βββ lib/
β β βββ theme-context.js # Theme management context
β β βββ utils.js # Utility functions
β β βββ scraper.js # Web scraping logic (MAIN SCRAPER FILE)
β β
βββ π Data Storage
β βββ data/ # Local JSON data files
β β βββ attendance.json # Daily attendance records
β β βββ config.json # User credentials & preferences
β β βββ holidays.json # Custom holidays with date ranges
β β βββ scrape-status.json # Real-time scraping progress
β β
βββ π€ Automation
β βββ scripts/
β β βββ run-scraper.js # Automated scraping script
β β
βββ πΈ Documentation
βββ docs/ # Screenshots and documentation
βββ 1.png # Dark theme dashboard
βββ 2.png # Light theme interface
βββ 3.png # Alternative theme example
βββ 4.png # Settings page
Want to use this for your office/institution/college?
You just need to update the pages/api/scrape.js file and adjust the scraping logic to work with your institution's website. The scraper uses Puppeteer to automate login and data extraction - simply modify the selectors and navigation logic to match your portal's structure.
All other features (calendar visualization, holiday management, themes, notifications) will work seamlessly with your customized scraper!
This project welcomes contributions! Whether it's bug fixes, feature additions, or theme improvements, feel free to:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request