ClassRep is a comprehensive education platform designed to streamline classroom management, communication, and resource allocation for students and class representatives (CRs) in educational institutions.
- Email/Password Authentication with secure password hashing
- Google OAuth Integration for seamless sign-in
- Email Verification system with automatic link generation
- Password Reset functionality with secure token-based recovery
- Automatic CR Label Assignment - Students matching CR database entries are automatically assigned CR roles
- Role-Based Access Control (Student/CR/Admin permissions)
- Course-Based Channels - Dedicated communication channels for each course
- Join Request Management - Students can request to join channels, CRs approve/reject
- Real-Time Announcements - CRs can post announcements to their channels
- File Attachments - Support for sharing files with announcements (coming soon)
- Channel Administration - CRs can manage their course channels
- Multi-Section Support - Channels organized by section and department
- Empty Room Finder - Real-time detection of available classrooms/labs
- Gender-Specific Schedules - Automatic schedule detection based on user section
- Building Selection - Filter rooms by building (Main, Annex, etc.)
- Room Booking System (CR Only) - CRs can book empty rooms for their sections
- My Bookings (CR Only) - View and manage booked classrooms
- Time Slot Management - Period-based room availability checking
- Class Routine Viewer - Display weekly class schedules
- Teacher Information - Access teacher contact details and office hours
- Section-Based Content - Personalized content based on user's section and department
- Course Management - Organized by course codes and departments
- Dark/Light Theme Toggle - Seamless theme switching with persistence
- Responsive Design - Mobile-first approach, works on all devices
- Modern UI Components - Built with Radix UI primitives
- Smooth Animations - Framer Motion & GSAP for delightful interactions
- Sidebar Navigation - Collapsible sidebar with dynamic menu items
- Breadcrumb Navigation - Clear navigation hierarchy
- Framework: Next.js 16 with App Router
- UI Library: React 19
- Styling: Tailwind CSS 4.1
- UI Components: Radix UI (comprehensive primitive library)
- Icons: Lucide React
- Animations:
- Framer Motion
- GSAP React
- Lenis for smooth scrolling
- Form Handling: React Hook Form with Zod validation
- Charts: Recharts
- BaaS: Appwrite (Client & Server SDKs)
- Authentication (Email/Password, OAuth)
- Database (TablesDB)
- Storage
- Functions
- Real-time subscriptions
- Language: TypeScript 5
- Package Manager: npm
- Linting: ESLint
- Build Tool: Next.js built-in compiler
- Node.js 18+ and npm
- An Appwrite instance (Cloud or Self-hosted)
- Appwrite project with configured database and tables
git clone https://github.com/yourusername/classrep.git
cd classrepnpm installCreate a .env.local file in the root directory:
# Appwrite Configuration (Public)
NEXT_PUBLIC_ENDPOINT=https://fra.cloud.appwrite.io/v1
NEXT_PUBLIC_PROJECTID=your_project_id
NEXT_PUBLIC_DATABASE_ID=your_database_id
NEXT_PUBLIC_STUDENTS=students
NEXT_PUBLIC_CLASS_ROOMS=class_rooms
NEXT_PUBLIC_LAB_ROOMS=lab_rooms
NEXT_PUBLIC_MALE_TEACHERS=male_teachers
NEXT_PUBLIC_FEMALE_TEACHERS=female_teachers
NEXT_PUBLIC_MALE_CR=male_cr
NEXT_PUBLIC_FEMALE_CR=female_cr
NEXT_PUBLIC_ROUTINE_TABLE=routine
# Appwrite Server-Side API Key (Secret - NEVER commit)
# Required for API routes: assign-cr-label and leave-channel
# Get this from Appwrite Console: Settings > API Keys
# Ensure the key has Users.read, Users.write, and Databases permissions
APPWRITE_API_KEY=your_appwrite_api_key_hereCreate the following tables in your Appwrite database:
-
students - User profile data
name(string)section(string) - Format:5FM(Semester + Section + Gender)dept(string)studentID(string)
-
class_rooms - Classroom data
-
lab_rooms - Laboratory data
-
male_teachers & female_teachers - Teacher information
-
male_cr & female_cr - CR registry for auto-labeling
-
routine - Class schedule data
-
channels - Announcement channels
-
join_request - Channel join requests
-
joined_channels - User-channel memberships
-
announcements - Channel announcements
Configure the following labels in Appwrite Users:
MCR- Male Class RepresentativeFCR- Female Class RepresentativeMACR- Male Assistant Class RepresentativeFACR- Female Assistant Class Representative
npm run devVisit http://localhost:3000
npm run build
npm startClassRep/
βββ app/ # Next.js App Router
β βββ dashboard/ # Main dashboard page
β βββ login/ # Login page
β βββ sign-up/ # Registration page
β βββ forgot-password/ # Password reset request
β βββ reset-password/ # Password reset confirmation
β βββ verify-email/ # Email verification
β βββ oauth/callback/ # OAuth callback handler
β βββ api/ # API Routes
β β βββ assign-cr-label/ # CR label assignment API
β β βββ leave-channel/ # Leave channel API
β βββ layout.jsx # Root layout with providers
β βββ page.jsx # Landing page
β βββ globals.css # Global styles
β
βββ components/
β βββ Announcement/ # Announcement system
β β βββ ChannelChat.jsx # Channel messaging interface
β β βββ ChannelsList.jsx # Available channels list
β β βββ JoinRequestManager.jsx # CR join request management
β βββ Classroom/ # Classroom features
β β βββ EmptyRoomFinder.jsx # Find empty rooms
β β βββ MyBookings.jsx # CR booking management
β β βββ routine.jsx # Class schedule viewer
β β βββ TeacherInfo.jsx # Teacher directory
β β βββ AddClassForm.jsx # Add class utility
β βββ Dashboard/ # Dashboard components
β β βββ app-sidebar.jsx # Main navigation sidebar
β β βββ nav-main.jsx # Primary navigation
β β βββ nav-secondary.jsx # Secondary navigation
β β βββ nav-user.jsx # User profile menu
β βββ auth/ # Authentication forms
β β βββ login.jsx # Login form component
β β βββ sign-up.jsx # Registration form
β βββ landingPage/ # Marketing site components
β β βββ hero.jsx # Hero section
β β βββ features.jsx # Features showcase
β β βββ cta.jsx # Call-to-action
β β βββ testimonials.jsx # User testimonials
β βββ ui/ # Reusable UI components (Radix UI)
β βββ AnimatedComponents/ # Animation components
β βββ background/ # Background effects
β βββ AuthWrapper.jsx # Auth state wrapper
β βββ theme-provider.tsx # Theme context provider
β
βββ appwrite/
β βββ appwrite.js # Appwrite client & functions
β βββ appwriteContext.js # Global auth context
β
βββ lib/
β βββ crLabelUtils.js # CR label assignment logic
β βββ utils.ts # Utility functions
β βββ fonts.ts # Font configurations
β
βββ hooks/ # Custom React hooks
βββ public/ # Static assets
βββ styles/ # Additional styles
βββ .env.local.example # Environment template
βββ components.json # Shadcn UI config
βββ next.config.mjs # Next.js configuration
βββ tailwind.config.js # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies & scripts
When a user signs up or authenticates via OAuth, the system automatically:
- Checks if their email matches an entry in the CR database tables
- Assigns appropriate CR label (
MCR,FCR,MACR,FACR) via Appwrite API - Updates user session to reflect new permissions
- Grants access to CR-only features (room booking, join request management)
Implementation: lib/crLabelUtils.js + app/api/assign-cr-label/route.js
- Students: Browse available channels, request to join, view announcements
- CRs: Create channels, approve/reject join requests, post announcements, manage members
- Features: Course-based organization, section-specific content, admin controls
CRs can:
- Search for empty rooms by building, time slot, and room type
- View real-time availability based on routine data
- Book rooms for their section
- View and manage their bookings
- Gender-specific schedule handling (Male/Female timings)
User Sign Up
β
Email Verification Sent
β
User Clicks Verification Link
β
Email Verified β Check CR Status
β
Auto-Assign CR Label (if eligible)
β
Redirect to Dashboard
- β Secure Password Storage - Handled by Appwrite
- β Email Verification - Required before dashboard access
- β Token-Based Password Reset - Secure recovery flow
- β OAuth 2.0 - Google authentication
- β API Key Protection - Server-side only API keys
- β Role-Based Permissions - Appwrite permissions & labels
- β Session Management - Secure HTTP-only cookies
- β CSRF Protection - Built into Next.js
All UI components are built using:
- Radix UI Primitives - Accessible, unstyled components
- Tailwind CSS - Utility-first styling
- CVA (Class Variance Authority) - Type-safe component variants
- Custom Animations - Framer Motion & GSAP
Component Library includes:
- Forms, Inputs, Selects, Textareas
- Buttons, Button Groups
- Cards, Dialogs, Sheets, Drawers
- Tables, Tabs, Accordions
- Toast Notifications, Alerts
- Dropdowns, Popovers, Tooltips
- Navigation Menus, Breadcrumbs
- Progress Bars, Spinners, Skeletons
- And 40+ more components!
# Development
npm run dev # Start development server
# Production
npm run build # Build for production
npm start # Start production server
# Code Quality
npm run lint # Run ESLint- Push your code to GitHub
- Import project to Appwrite
- Add environment variables in Appwrite dashboard
- Deploy automatically on every push
- Netlify: Configure build command as
npm run build - Railway: Add environment variables and deploy
- Docker: Create Dockerfile with Node.js 18+ base image
Important: Ensure all environment variables are set in your deployment platform!
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
- File attachment support in announcements (planned)
- Mobile app version (future consideration)
- Email notifications for announcements (planned)
- π± Push notifications
- π File sharing in announcements
- π Analytics dashboard for CRs
- π Real-time notification system
- π Calendar integration
- π Attendance tracking
This project is licensed under the MIT License - see the LICENSE file for details.
ClassRep Team
- Appwrite - Backend as a Service and Hosting
- Radix UI - UI Primitives
- Shadcn UI - Component inspiration
- All open-source contributors
For support and questions:
- π§ Email: support@classrep.edu
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- Live Demo: https://classrep.appwrite.network
- Documentation: Wiki
- Appwrite Console: https://cloud.appwrite.io
Made with β€οΈ by the Core3 Devs
β Star this repo if you find it helpful!