A modern student tracking application built for schools and classrooms. Track student attendance, activities, and add notes with a beautiful, easy-to-use interface.
π Recently Updated! This codebase has been completely refactored with comprehensive documentation, full test coverage, and production-ready deployment guides. See REFACTORING_COMPLETE.md for details.
- π Attendance Tracking: Mark students as Present, Absent, in Washroom, doing Activities, or Bunking
- β° Smart Timer: Automatic 12-minute washroom timer that alerts you when time is up
- π Student Notes: Add private notes about each student that only teachers can see
- π Quick Search: Find any student instantly by typing their name or admission number
- π Attendance Reports: Generate detailed attendance reports with CSV export
- π Daily Analytics: View daily summaries and attendance statistics
- π Python Management: Easy-to-use Python script for bulk student management
- π± Works Everywhere: Use on computers, tablets, or phones
- βοΈ Cloud Sync: All data is automatically saved to the cloud (Firebase)
- π¨ Beautiful Design: Dark theme that's easy on the eyes
- π Real-time Updates: See changes instantly across all devices
- π₯ Data Export: Export attendance logs with dates for record-keeping
For comprehensive guides and references, see the docs/ folder:
- π Complete Setup Guide - Detailed installation and configuration
- οΏ½ Beginner's Guide - Learn how the code works (perfect for noobs!)
- οΏ½π API Reference - Complete API documentation with examples
- π§© Components Guide - Component architecture and usage
- π§ͺ Testing Guide - Testing strategy and best practices
- π Deployment Guide - Production deployment instructions
If you're new to React, TypeScript, or want to understand how Stutra works, start with our Beginner's Guide! It explains every file and function in simple terms, perfect for learning.
Before starting, make sure you have:
- A computer with internet connection
- A Google account (Gmail account)
- About 30 minutes of time
-
Download this project:
- Click the green "Code" button at the top of this page
- Select "Download ZIP"
- Extract the ZIP file to your computer (e.g., Desktop/stutra)
-
Install Node.js:
- Go to nodejs.org
- Download and install the "LTS" version (the recommended one)
- Restart your computer after installation
Firebase will store all your student data safely in the cloud.
-
Create a Firebase Project:
- Go to console.firebase.google.com
- Click "Create a project"
- Name it something like "MySchool-StudentTracker"
- Disable Google Analytics (not needed for this)
- Click "Create project"
-
Set Up Realtime Database:
- In your Firebase project, click "Realtime Database" from the left menu
- Click "Create Database"
- Choose "Start in test mode" for now
- Select your region (closest to your location)
-
Get Your Firebase Configuration:
- Click the gear icon (βοΈ) next to "Project Overview"
- Select "Project settings"
- Scroll down to "Your apps" section
- Click the web icon (
</>) to add a web app - Name your app (e.g., "Stutra")
- Check "Also set up Firebase Hosting" (optional)
- Click "Register app"
- IMPORTANT: Copy the configuration code that appears. It looks like this:
const firebaseConfig = { apiKey: "your-api-key-here", authDomain: "your-project.firebaseapp.com", databaseURL: "https://your-project-default-rtdb.firebaseio.com/", projectId: "your-project-id", storageBucket: "your-project.appspot.com", messagingSenderId: "123456789", appId: "your-app-id" };
-
Open Command Prompt/Terminal:
- Windows: Press
Windows Key + R, typecmd, press Enter - Mac: Press
Cmd + Space, typeterminal, press Enter
- Windows: Press
-
Navigate to your project folder:
cd Desktop/stutra # (or wherever you extracted the files)
-
Install the app:
npm install
(This will take a few minutes to download everything needed)
-
Create your environment file:
- In the stutra folder, create a new file called
.env.local - Copy and paste this template, replacing the values with your Firebase config:
VITE_FIREBASE_API_KEY=your-api-key-here VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com VITE_FIREBASE_DATABASE_URL=https://your-project-default-rtdb.firebaseio.com/ VITE_FIREBASE_PROJECT_ID=your-project-id VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=123456789 VITE_FIREBASE_APP_ID=your-app-id - In the stutra folder, create a new file called
-
Start the application:
npm run dev
-
Open in your browser:
- The app will automatically open at
http://localhost:5173 - If it doesn't open automatically, copy and paste that URL into your browser
- The app will automatically open at
-
First time setup:
- The app comes with 12 sample students
- You can edit their names by modifying the mock data in the code
- Or start fresh and add your own students
-
Marking Attendance:
- Each student has a card with their photo and name
- Click the colored buttons at the bottom of each card:
- π’ Green circle = Present
- π΄ Red X = Absent
- π΅ Blue icon = Washroom (starts 12-min timer)
- π Orange clipboard = Activity
- π΄ Red running icon = Bunking
-
Adding Notes:
- Click the π note icon on any student card
- Type your note and click "Add Note"
- Notes are private and only visible to teachers
- You can add multiple notes per student
-
Activities:
- Click the activity button (clipboard icon)
- Choose from: Library, Nurse/Medical, Counselor, ATL, or type a custom activity
- Student status will show the specific activity
-
Search:
- Use the search bar at the top to quickly find students
- Type name or admission number
-
Reset All:
- Click "All Present" button to mark everyone as present
- Useful at the start of each class period
- All changes are automatically saved to Firebase
- Data persists between sessions
- Access from any device with the same login
- Attendance Logging: Every status change is logged with timestamps for reporting
- CSV Export: Export detailed attendance reports for analysis and record-keeping
- Click the "Reports" button in the top navigation
- Select date range for the report period
- Choose section or select "All" for school-wide reports
- View daily summary with status breakdowns
- Export to CSV for detailed analysis
- Date and time of each status change
- Student information (name, admission number, section)
- Status changes (present, absent, washroom, activity, bunking)
- Activity details and duration tracking
- Notes and who made the changes
- Perfect for school records and parent meetings
For bulk student management, use the included Python script:
cd scripts
pip install -r requirements.txt
python add_students.py- Bulk Import: Add students from CSV or Excel files
- Student Management: Edit, update, or delete student records
- Data Export: Export current student data
- Section Management: Organize students by class sections
- Validation: Ensures data integrity and proper formatting
See scripts/README.md for detailed setup instructions.
Edit the file src/services/googleSheets.ts and replace the mock students:
private getMockStudents(): Student[] {
return [
{ id: 1, name: "Student Name", admission_number: "2024001", photo_url: "", status: "present", activity: "", timer_end: null, notes: [] },
// Add more students here...
];
}The app uses an Apple-inspired dark theme. To customize colors, edit the appleTheme section in src/App.tsx.
-
"Command not found" error:
- Make sure Node.js is installed correctly
- Restart your computer after installing Node.js
-
Firebase connection errors:
- Double-check your
.env.localfile has the correct Firebase configuration - Make sure your Firebase Realtime Database is set up and in "test mode"
- Double-check your
-
App won't start:
- Make sure you're in the correct folder (
cd Desktop/stutra) - Try running
npm installagain - Check that port 5173 isn't being used by another app
- Make sure you're in the correct folder (
-
Students not saving:
- Check your internet connection
- Verify Firebase configuration is correct
- Look at the browser console (F12) for error messages
- Check the browser console (press F12) for error messages
- Make sure your internet connection is stable
- Verify all Firebase setup steps were completed
To make the app available to other teachers:
-
Build the app:
npm run build
-
Deploy to Firebase Hosting:
npm install -g firebase-tools firebase login firebase init hosting firebase deploy
-
Share the URL:
- Firebase will give you a URL like
https://your-project.web.app - Share this with other teachers
- Firebase will give you a URL like
This project is free to use for educational purposes. Feel free to modify and adapt it for your school's needs.
If you need help setting this up for your school, please:
- Check the troubleshooting section above
- Look at the error messages in the browser console (F12)
- Create an issue on this repository with details about your problem
Made with β€οΈ for educators and students
A modern, Apple-inspired student tracking application built with React, TypeScript, and Material-UI. Track student attendance, activities, and add notes with a sleek, dark-themed interface.
- Student Management: Track attendance status (Present, Absent, Washroom, Activity, Bunking)
- Timer System: Automatic 12-minute washroom timer
- Activity Tracking: Assign students to activities like Library, Nurse, Counselor, ATL
- Notes System: Add and manage notes for each student
- Search: Fuzzy search by student name or admission number
- Google Sheets Integration: Sync all data with Google Sheets
- Apple-inspired Design: Beautiful dark theme with smooth animations
- Node.js (v16 or higher)
- npm or yarn
- Google Cloud Console account (for Google Sheets integration)
- Clone the repository:
git clone <repository-url>
cd stutra- Install dependencies:
npm install-
Set up Google Sheets integration:
- Create a Google Cloud Console project
- Enable the Google Sheets API
- Create a service account and download the JSON key file
- Create a Google Sheets spreadsheet with the following columns:
- A: Name
- B: Admission Number
- C: Photo URL
- D: Status
- E: Activity
- F: Timer End
- G: Notes (JSON array)
-
Configure environment variables:
cp .env.example .env.localEdit .env.local and add your Google Sheets ID and service account key path.
- Start the development server:
npm run devsrc/
βββ components/
β βββ NotesDialog.tsx # Notes management dialog
β βββ ...
βββ services/
β βββ googleSheets.ts # Google Sheets API integration
βββ App.tsx # Main application component
βββ main.tsx # Application entry point
- Apple-inspired Theme: Dark mode with iOS-style colors and typography
- Smooth Animations: Hover effects and transitions
- Responsive Design: Works on desktop and mobile devices
- Card-based Layout: Clean, organized student cards
- Visual Status Indicators: Color-coded status chips and icons
- Frontend: React 19, TypeScript, Material-UI
- Build Tool: Vite
- Styling: Emotion (via MUI)
- Search: Fuse.js for fuzzy search
- Backend: Google Sheets API
- Authentication: Google Service Account
- Change Status: Click on the status icons at the bottom of each student card
- Add Activity: Click the activity icon and select or type a custom activity
- Add Notes: Click the note icon to open the notes dialog
- Search: Use the search bar to find students by name or admission number
- Mark All Present: Use the "All Present" button to reset all students to present status
The app automatically syncs with Google Sheets:
- Student data is loaded on app startup
- Changes are saved to Google Sheets in real-time
- Notes are stored as JSON arrays in the spreadsheet
- Build the project:
npm run build- Deploy the
distfolder to your hosting service - Make sure to configure environment variables on your hosting platform
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License.
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default tseslint.config([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])