Skip to content

Student attendance tracking - Web + Mobile - Apple Glass design

License

Notifications You must be signed in to change notification settings

bendudebot/attendance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Attendance Tracker Logo

πŸŽ“ Attendance Tracker

Beautiful student attendance tracking system with Apple Glass design

Features β€’ Screenshots β€’ Quick Start β€’ Tech Stack β€’ API β€’ Deployment

Node.js Next.js PostgreSQL Prisma Docker TypeScript


✨ Features

πŸ“Š Dashboard

  • Real-time attendance overview
  • Today's session summary
  • Quick action buttons
  • Attendance alerts for low-performing students

πŸ‘₯ Student Management

  • Full CRUD operations
  • CSV import support
  • Search and filter by class
  • Individual attendance history

πŸ“š Class Management

  • Create and organize classes
  • Assign teachers
  • View class statistics
  • Generate attendance reports

βœ… Attendance Tracking

  • Interactive attendance grid
  • One-click status changes (Present/Absent/Late/Excused)
  • Bulk operations
  • Quick attendance mode

πŸ“ˆ Reports & Analytics

  • Detailed attendance reports
  • Export to CSV/Excel
  • Low attendance alerts
  • Trend analysis

πŸ” Authentication

  • JWT-based authentication
  • Role-based access (Admin/Teacher)
  • Secure password handling

πŸ“Έ Screenshots

Web Dashboard

Dashboard

Attendance Grid

Attendance

Students List

Students

Reports

Reports

Mobile App

Mobile Home Mobile List Mobile History


πŸš€ Quick Start

Option 1: One Command (Docker)

git clone https://github.com/bendudebot/attendance.git
cd attendance
chmod +x scripts/*.sh
./scripts/docker-start.sh

That's it! πŸŽ‰ This will:

  • βœ… Start PostgreSQL database
  • βœ… Run all migrations
  • βœ… Seed test data (2 users, 3 classes, 15 students, ~150 attendance records)
  • βœ… Start the API server at http://localhost:3001

Option 2: Local Development

# Terminal 1: Database + Backend
cd backend
docker-compose up -d db          # Start PostgreSQL
npm install
npx prisma migrate dev           # Run migrations
npx prisma db seed               # Seed test data
npm run dev                      # API at http://localhost:3001
# Terminal 2: Web Frontend
cd web
npm install
npm run dev                      # Web at http://localhost:3000

πŸ” Test Accounts

Role Email Password
Admin admin@attendance.app admin123
Teacher teacher@attendance.app teacher123

πŸ“– Full setup guide: docs/QUICKSTART.md

Test Accounts

Role Email Password
Admin admin@attendance.app admin123
Teacher teacher@attendance.app teacher123

πŸ›  Tech Stack

Backend

  • Runtime: Node.js 18+
  • Framework: Express.js
  • Database: PostgreSQL 15
  • ORM: Prisma 5
  • Authentication: JWT
  • Validation: express-validator

Frontend (Web)

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS
  • Icons: Lucide React
  • Charts: Recharts

Mobile

  • Framework: React Native (Expo)
  • Navigation: Expo Router

Infrastructure

  • Containerization: Docker
  • Database: PostgreSQL (Alpine)

πŸ“– API Documentation

See docs/API.md for full API documentation.

Quick Reference

Method Endpoint Description
POST /api/auth/login User login
POST /api/auth/register User registration
GET /api/classes List all classes
GET /api/students List all students
POST /api/attendance/mark Mark attendance
GET /api/attendance/today Today's summary

πŸ—„ Database Schema

erDiagram
    User ||--o{ Class : teaches
    Class ||--o{ Student : contains
    Class ||--o{ Session : has
    Student ||--o{ Attendance : has
    Session ||--o{ Attendance : records
    
    User {
        string id PK
        string email UK
        string password
        string name
        enum role
    }
    
    Class {
        string id PK
        string name
        string code UK
        string teacherId FK
    }
    
    Student {
        string id PK
        string firstName
        string lastName
        string studentId UK
        string classId FK
    }
    
    Session {
        string id PK
        string classId FK
        datetime date
        string startTime
        string endTime
    }
    
    Attendance {
        string id PK
        string studentId FK
        string sessionId FK
        enum status
        string notes
    }
Loading

βš™οΈ Environment Variables

Backend (.env)

# Database
DATABASE_URL="postgresql://user:password@localhost:5432/attendance"

# Authentication
JWT_SECRET="your-super-secret-jwt-key"

# Server
PORT=3001

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:3001/api

🚒 Deployment

Docker Production

# Build and run
docker-compose -f docker-compose.prod.yml up -d

# Run migrations
docker-compose exec api npx prisma migrate deploy

Manual Deployment

  1. Set up a PostgreSQL database
  2. Configure environment variables
  3. Build and start the backend:
    cd backend
    npm run build
    npm start
  4. Build and deploy the frontend:
    cd web
    npm run build
    npm start

πŸ“ Project Structure

attendance/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.ts          # Express server
β”‚   β”‚   β”œβ”€β”€ routes/           # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/       # Auth middleware
β”‚   β”‚   └── services/         # Business logic
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   β”œβ”€β”€ schema.prisma     # Database schema
β”‚   β”‚   └── seed.ts           # Seed data
β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   └── Dockerfile
β”œβ”€β”€ web/
β”‚   β”œβ”€β”€ app/                  # Next.js pages
β”‚   β”œβ”€β”€ components/           # React components
β”‚   └── lib/                  # Utilities
β”œβ”€β”€ mobile/                   # React Native app
β”œβ”€β”€ docs/                     # Documentation
└── screenshots/              # App screenshots

🀝 Contributing

See docs/CONTRIBUTING.md for contribution guidelines.

  1. Fork the repository
  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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by Benoit Liard

About

Student attendance tracking - Web + Mobile - Apple Glass design

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published