AjarinAja is a comprehensive, modern Learning Management System (LMS) designed for educational institutions, schools, and independent educators. It provides a complete platform for managing courses, assignments, exams, student progress tracking, and analyticsβall in one place.
AjarinAja is a full-stack web application that streamlines educational workflows and enhances the learning experience for both teachers and students. The platform features:
- Role-based access for Teachers, Students, Parents, Operators
- Course management with rich multimedia content
- Exam creation with auto-grading capabilities
- Assignment tracking and submission management
- Real-time analytics and performance insights
- Gamification with badges and achievements
- Multi-language support (English & Indonesian)
- Demo mode for exploring platform features
- Framework: React 18.3+ with TypeScript
- Build Tool: Vite 5.4+
- Routing: React Router DOM 6.30+
- UI Library: shadcn/ui (Radix UI components)
- Styling: Tailwind CSS 3.4+ with custom animations
- State Management: TanStack Query (React Query) v5
- Form Handling: React Hook Form 7.61+ with Zod validation
- Internationalization: i18next & react-i18next
- Charts: Recharts 2.15+
- Drag & Drop: @dnd-kit libraries
- PDF Generation: jsPDF with autotable plugin
- Math Rendering: KaTeX & react-katex
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth with email/password
- Real-time: Supabase Realtime subscriptions
- Storage: Supabase Storage for file uploads
- Row-Level Security: Comprehensive RLS policies
- Linting: ESLint 9.32+ with TypeScript support
- TypeScript: v5.8+
- Package Manager: npm/bun
- PostCSS: For CSS processing
classroom-companion/
βββ public/ # Static assets
βββ src/
β βββ assets/ # Images and media files
β βββ components/ # Reusable UI components (65+ components)
β β βββ ui/ # shadcn/ui base components (49 components)
β β βββ AvatarUpload.tsx # Profile avatar management
β β βββ CoursePreviewModal.tsx
β β βββ DemoTour.tsx # Interactive demo tour
β β βββ FormulaInput.tsx # Math formula editor
β β βββ MaterialViewer.tsx # PDF/video viewer
β β βββ NotificationBell.tsx
β β βββ ProtectedRoute.tsx # Route authentication
β β βββ ...
β βββ contexts/ # React contexts
β β βββ AuthContext.tsx # Authentication state
β β βββ DemoContext.tsx # Demo mode state
β βββ data/ # Static data and constants
β βββ hooks/ # Custom React hooks (38 hooks)
β β βββ useAcademicPeriods.ts
β β βββ useAnnouncements.ts
β β βββ useAssignments.ts
β β βββ useAtRiskStudents.ts
β β βββ useBadges.ts
β β βββ useCalendarEvents.ts
β β βββ useCourseMaterials.ts
β β βββ useCourses.ts
β β βββ useEnrollments.ts
β β βββ useExams.ts
β β βββ useNotifications.ts
β β βββ useQuestionBank.ts
β β βββ useReportCards.ts
β β βββ ...
β βββ i18n/ # Internationalization config
β βββ integrations/ # Third-party integrations
β β βββ supabase/ # Supabase client and types
β βββ layouts/ # Layout components
β β βββ TeacherLayout.tsx # Teacher dashboard layout
β β βββ StudentLayout.tsx # Student dashboard layout
β β βββ OperatorLayout.tsx # Operator dashboard layout
β β βββ DemoLayout.tsx # Demo mode layout
β βββ lib/ # Utility functions
β βββ pages/ # Page components (69 pages)
β β βββ teacher/ # Teacher-specific pages (19 pages)
β β βββ student/ # Student-specific pages (18 pages)
β β βββ operator/ # Operator-specific pages (9 pages)
β β βββ demo/ # Demo mode pages (30 pages)
β β βββ Index.tsx # Landing page
β β βββ Login.tsx
β β βββ PublicCourses.tsx
β β βββ ...
β βββ types/ # TypeScript type definitions
β βββ App.tsx # Main application component
β βββ index.css # Global styles
β βββ main.tsx # Application entry point
βββ supabase/
β βββ migrations/ # Database migrations (29 files)
β βββ config.toml # Supabase configuration
βββ .env # Environment variables
βββ components.json # shadcn/ui configuration
βββ index.html # HTML entry point
βββ package.json # Dependencies and scripts
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
The application uses Supabase PostgreSQL with 20+ tables organized into functional groups:
- profiles: User profile information (name, avatar, bio, language preference)
- user_roles: Role assignments (teacher/student) with enum type
- courses: Course information (title, description, status, teacher)
- enrollments: Student-course relationships with enrollment dates
- course_materials: Learning materials (PDFs, videos, documents)
- exams: Exam metadata (duration, points, status, passing grade)
- questions: Exam questions (MCQ, multiple-select, essay, fill-in-blank)
- exam_submissions: Student exam submissions and scores
- question_bank: Reusable question library across exams
- assignments: Assignment details, deadlines, and rubrics
- assignment_questions: Assignment question content
- assignment_submissions: Student assignment submissions with file uploads
- notifications: User notifications system with real-time updates
- badges: Achievement badges (First Course, Perfect Score, etc.)
- user_badges: User badge awards with timestamps
- announcements: Course announcements to enrolled students
- calendar_events: Scheduled events and deadlines
- academic_periods: Semester/term management
- report_cards: Student report cards with teacher comments
- report_card_items: Individual grade items per subject
- at_risk_students: Students needing intervention
- at_risk_settings: Risk detection criteria and thresholds
- progress_tracking: Student progress data over time
- academic_periods: Semester and academic year management (Operator-led)
- classes: Rombongan Belajar management (e.g., Grade 10-A)
- class_students: Student-to-class assignments
- class_schedules: Weekly lesson scheduling for all classes
- school_announcements: School-wide broadcast system with target roles
- attendance_sessions: Attendance tracking sessions
- attendance_records: Individual student attendance records
- Row-Level Security (RLS) policies on all tables for database-level authorization
- Helper functions:
has_role(),is_enrolled(),owns_course()for reusable policy logic - Triggers: Auto-update timestamps, user profile creation on signup, notification creation
- Realtime subscriptions enabled for live updates (<100ms latency)
π For detailed schema documentation, see ARCHITECTURE.md - Phase 2: Backend Architecture
- Course Builder: Create courses with videos, PDFs, and rich content
- Smart Exam Creator: MCQ, multiple-select, essay & fill-in-blank questions with question bank
- Auto-Grading: Instant grading for MCQ exams with customizable rubric-based scoring
- Assignment Management: Create, assign, and grade assignments with file uploads
- Performance Analytics: Track class averages, student performance, and trends
- At-Risk Detection: Identify struggling students automatically with configurable thresholds
- Question Bank: Reusable question library with categories and difficulty levels
- Attendance Tracking: PIN-based attendance system with session management and reports
- Schedule Management: Calendar view for deadlines, exams, and events
- Announcement System: Broadcast updates to enrolled students with real-time notifications
- Report Cards: Generate comprehensive semester reports with customizable grading scales
- PDF Export: Export grades, analytics, and attendance reports
- Course Discovery: Browse and enroll in available courses with course previews
- Learning Materials: Access videos and PDFs in-platform with built-in viewers
- Exam Taking: Clean, distraction-free exam interface with timer
- Assignment Submission: Submit assignments with multiple file uploads
- Progress Tracking: Visual analytics of grades, performance trends, and class ranking
- Notifications: Real-time alerts for grades, announcements, and upcoming deadlines
- Badges: Earn achievement badges for milestones (First Course, Perfect Score, etc.)
- Attendance: Check-in via PIN code entry
- Calendar View: Track upcoming exams, assignments, and events
- Report Cards: View semester grades, teacher feedback, and detailed performance breakdown
- Child Dashboard: Monitor each child's academic progress at a glance
- Attendance Tracking: View child's attendance history and status
- Assignment Monitoring: Track assignment submissions and grades
- Exam Results: Review exam scores and performance trends
- Pairing Code Linking: Securely link to your child's account via pairing code
- Notifications: Stay updated on your child's academic activities
- Academic Periods: Manage semesters, terms, and active school years
- Classes Management: Create and organize "Rombongan Belajar" (classes)
- Student Placement: Assign students to specific classes and sections
- Master Scheduling: Build and maintain the school-wide weekly schedule
- Teacher Assignment: Reassign teachers to courses and classes as needed
- School Announcements: Broadcast school-wide updates to teachers, students, and parents
- Academic Auditing: View comprehensive school-wide performance and attendance reports
- User Management: Overview of all platform users and their roles
- Modern Design: Clean, professional interface with dark mode support
- Responsive: Mobile-first design works on all devices
- Animations: Smooth transitions and scroll animations
- Accessibility: ARIA labels and keyboard navigation
- Toast Notifications: Non-intrusive user feedback
- Loading States: Skeleton loaders and progress indicators
- Form Validation: Real-time validation with helpful error messages
- Node.js 18+ and npm (or Bun runtime)
- Supabase account and project
- Clone the repository
git clone <repository-url>
cd classroom-companion- Install dependencies
npm install
# or
bun install- Configure environment variables
Create a .env file in the root directory:
VITE_SUPABASE_PROJECT_ID=your_project_id
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=your_anon_public_key- Run database migrations
Navigate to your Supabase project dashboard and run the migrations from the supabase/migrations folder in chronological order, or use the Supabase CLI:
supabase db push- Start the development server
npm run devThe application will be available at http://localhost:8080
npm run buildThis generates optimized production files in the dist/ directory.
npm run previewFor comprehensive technical documentation:
- ARCHITECTURE.md: Complete technical architecture documentation (3,050+ lines)
- Phase 1: Frontend Architecture - Components, hooks, routing, state management
- Phase 2: Backend Architecture - Database schema, RLS policies, storage, real-time
- Phase 3: Developer Guide - Workflows, troubleshooting, migrations, best practices
- Navigate to the login page
- Sign up with email and password
- Select "Teacher" as your role
- Verify your email (if email verification is enabled)
- Navigate to the login page
- Sign up with email and password
- Select "Student" as your role
- Verify your email (if email verification is enabled)
Try the platform without creating an account:
- Visit the homepage and click "Try Demo"
- Choose Teacher or Student perspective
- Explore all features with sample data
- Supabase Auth handles user authentication
- Email/password authentication with session management
- Sessions persist in
localStorage - Auto-refresh tokens for seamless experience
- Public Routes: Landing page, login, public courses
- Protected Routes: Use
ProtectedRoutecomponent - Teacher Routes: Require
requiredRole="teacher" - Student Routes: Require
requiredRole="student" - Parent Routes: Require
requiredRole="parent" - Operator Routes: Require
requiredRole="operator" - Demo Routes: Accessible without authentication
The platform supports multiple languages using i18next:
- English (default)
- Indonesian (Bahasa Indonesia)
Language switching is available via the LanguageSwitcher component in the navigation.
- Login β Teacher Dashboard
- Create Course β Add materials, set status
- Create Exam/Assignment β Design questions, set deadlines
- Publish β Make available to enrolled students
- Monitor β View submissions and analytics
- Grade β Auto-graded MCQs, manual essay grading
- Reports β Generate report cards and exports
- Login β Student Dashboard
- Browse Courses β Explore and enroll
- Access Materials β Watch videos, read PDFs
- Take Exams β Complete within time limit
- Submit Assignments β Upload files and answers
- View Results β Check grades and feedback
- Track Progress β Monitor performance analytics
- Vercel: Zero-config deployment for Vite apps
- Netlify: Automatic builds from Git
- Cloudflare Pages: Global CDN distribution
- Supabase Hosting: Integrated with Supabase backend
- Push code to GitHub repository
- Import project in Vercel
- Add environment variables (VITE_SUPABASE_*)
- Deploy
Ensure these are set in your deployment platform:
VITE_SUPABASE_PROJECT_ID
VITE_SUPABASE_URL
VITE_SUPABASE_PUBLISHABLE_KEY
npm run dev- Start development servernpm run build- Build for productionnpm run build:dev- Build in development modenpm run lint- Run ESLintnpm run preview- Preview production build
- TypeScript for type safety
- ESLint for code quality
- Prettier configuration (via ESLint)
- Component-based architecture
- Custom hooks for data fetching and state management
For detailed workflow guides, see ARCHITECTURE.md - Developer Guide:
- Adding a Page: Component β Route β Navigation β Hook
- Adding a Table: Migration β RLS policies β Types β Hook
- Adding Notifications: Database trigger β Real-time subscription
- Adding Forms: Zod schema β React Hook Form β Validation
Quick steps:
- Create components in
src/components/ - Add pages in
src/pages/ - Create custom hooks in
src/hooks/ - Update routes in
src/App.tsx - Add database migrations in
supabase/migrations/ - Regenerate TypeScript types
Provides 49+ pre-built, accessible UI components based on Radix UI primitives. Components include:
- Buttons, Inputs, Forms
- Dialogs, Modals, Sheets
- Tables, Cards, Badges
- Charts, Progress bars
- Dropdown menus, Tooltips
- And much more...
Handles server state management:
- Automatic caching and refetching
- Optimistic updates
- Background synchronization
- Built-in loading and error states
Provides backend infrastructure:
- PostgreSQL database
- Real-time subscriptions
- Authentication
- File storage
- Row-Level Security
Contributions are welcome! Please read our Contributing Guide and Code of Conduct before getting started.
This project is licensed under the MIT License.
For full demo or institutional inquiries:
- E-Mail: holilhaqalimhakim@gmail.com
- Website: Visit the landing page for more information
Built with modern web technologies and best practices to deliver a world-class learning management system for educators and institutions.
Made with β€οΈ for Education