A comprehensive full-stack classroom management system built with modern TypeScript technologies, featuring complete CRUD operations for all educational entities.
This classroom management system provides a complete solution for educational institutions to manage teachers, students, classes, assignments, announcements, submissions, enrollments, attendance, and grades. Built as a type-safe monorepo with shared types between client and server.
- π¨βπ« Teachers: Manage teacher profiles, departments, and contact information
- π¨βπ Students: Handle student registration, profiles, and academic records
- ποΈ Classes: Create and manage class schedules, subjects, and room assignments
- π Assignments: Create assignments with due dates, point values, and detailed descriptions
- π’ Announcements: Broadcast important information to classes with expiration dates
- π€ Submissions: Track student assignment submissions with status monitoring
- π Enrollments: Manage student enrollments in classes with status tracking
- π Attendance: Record and track student attendance with multiple status options
- π― Grades: Comprehensive grading system with feedback and automatic calculations
- Full-Stack TypeScript: End-to-end type safety between client and server
- Shared Types: Common type definitions ensure consistency across the entire application
- JWT Authentication: Secure authentication with refresh token rotation
- Role-Based Access Control: Admin, Teacher, and Student roles
- Monorepo Structure: Organized workspaces for easy development and deployment
- Modern Stack: Built with the latest technologies for performance and developer experience
- RESTful API: Well-structured API endpoints for all CRUD operations
- Responsive UI: Modern React interface that works on all devices
- Real-time Updates: Optimistic updates and automatic data refresh
- Bun - Fast JavaScript runtime and package manager
- Hono - Lightweight and fast web framework
- SQLite - Embedded database for data persistence
- Zod - TypeScript-first schema validation
- React 19 - Modern React with latest features
- Vite - Fast build tool and development server
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Zustand - Lightweight state management
- React Router - Client-side routing
- Radix UI - Accessible component primitives
- Bun installed on your system
- Node.js (for the client development)
- Basic knowledge of TypeScript and React
-
Clone the repository:
git clone https://github.com/yourusername/classroom-management.git cd classroom-management -
Install dependencies for all workspaces:
bun install
-
Start the development servers:
In separate terminals:
# Terminal 1 - Start the server cd server && bun run dev # Terminal 2 - Start the client cd client && npm run dev
-
Open your browser:
- Client: http://localhost:5173
- Server API: http://localhost:3000
-
Default Admin Credentials:
- The system will create an admin user on first run
- Check the server console for the generated password
- Email:
admin@classroom.com
.
βββ client/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components for each entity
β β βββ stores/ # Zustand state management
β β βββ lib/ # Utility functions
β βββ public/ # Static assets
β βββ package.json # Client dependencies
βββ server/ # Hono backend API
β βββ src/
β β βββ routes/ # API route handlers
β β βββ db/ # Database setup and operations
β β βββ middleware/ # Express-style middleware
β βββ package.json # Server dependencies
βββ shared/ # Shared TypeScript definitions
β βββ src/types/ # Type definitions for all entities
βββ package.json # Root workspace configuration
The server provides complete REST API coverage for all entities:
GET /api/{entity}- List all entitiesGET /api/{entity}/:id- Get entity by ID
POST /api/{entity}- Create new entityPUT /api/{entity}/:id- Update entityDELETE /api/{entity}/:id- Delete entity
POST /auth/teacher/login- Teacher loginPOST /auth/teacher/register- Teacher registrationPOST /auth/refresh- Refresh access tokenPOST /auth/logout- LogoutGET /auth/me- Get current user
The system uses SQLite with the following main entities:
- Teachers: Profile information, department, contact details, role (teacher/admin)
- Students: Personal information, enrollment status, contact details
- Classes: Course information, schedule, teacher assignment
- Assignments: Title, description, due dates, point values
- Announcements: Class communications with expiration
- Submissions: Student work submissions with status tracking
- Enrollments: Student-class relationships with status
- Attendance: Daily attendance records with status options
- Grades: Assignment grades with feedback and scoring
- Setup Admin: The system creates an admin user automatically on first run
- Add Teachers: Login as admin and add teacher profiles to the system
- Create Classes: Set up classes and assign teachers
- Add Students: Register students in the system
- Manage Enrollments: Enroll students in appropriate classes
- Create Assignments: Teachers set up assignments with due dates and point values
- Make Announcements: Teachers communicate important information to students
- Track Submissions: Monitor student assignment submissions
- Record Attendance: Teachers track daily student attendance
- Grade Work: Evaluate submissions and provide feedback
Create a .env file in the server directory:
JWT_ACCESS_SECRET=your-access-secret
JWT_REFRESH_SECRET=your-refresh-secret
ADMIN_EMAIL=admin@classroom.com
ADMIN_PASSWORD=your-admin-password
NODE_ENV=developmentCreate a .env file in the client directory:
VITE_SERVER_URL=http://localhost:3000# Build all workspaces
bun run build
# Or build individually
cd server && bun run build
cd client && npm run build- Types: Add new types in
shared/src/types/ - Server: Create routes in
server/src/routes/ - Client: Add stores in
client/src/stores/and pages inclient/src/pages/ - UI: Update navigation and add new pages to the router
- Modify
server/src/db/schema.sqlfor schema changes - Update
server/src/db/database.tsfor new operations - The system handles migrations automatically on startup
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow the existing code structure and naming conventions
- Ensure type safety across all new features
- Add proper error handling for all operations
- Update documentation for any new functionality
- Test both client and server integration
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with β€οΈ using the modern TypeScript ecosystem
- Inspired by the needs of educational institutions
- Thanks to all the open-source projects that made this possible
- Browser storage APIs (localStorage, sessionStorage) are not supported in Claude.ai artifacts
- Refresh token rotation requires secure HTTP-only cookies
- Create an issue for bug reports or feature requests
- Check existing issues before creating new ones
- Provide detailed information for bug reports
Built with the modern full-stack TypeScript development stack.
