Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

105 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HYTech Learning Management System (LMS)

A comprehensive, production-ready Learning Management System built with React and Firebase for HYT Global Institute. The platform supports multi-role authentication (Admin, Trainer, Student, Supervisor) with full course management, assessment handling, real-time notifications, and collaborative communication features.

πŸ“‹ Table of Contents


✨ Features

πŸ” Multi-Role Access Control

  • Admin: Full system management, user administration, sector creation, system monitoring
  • Trainer: Class management, content creation, assignment/assessment posting, student management
  • Student: Course enrollment, assignment submission, quiz participation, progress tracking
  • Supervisor: Course oversight, report generation, student performance monitoring

πŸ“š Course & Content Management

  • Course creation and enrollment
  • Module organization with sequential progression
  • Interactive lesson topics with descriptions
  • Learning materials library with file uploads
  • Real-time content updates and synchronization
  • Material versioning and archival

✏️ Assignments & Assessments

  • Form builder for creating custom assessments
  • Multiple question types support
  • Point-based grading system
  • Automatic score calculation
  • Quiz attempt history tracking
  • Pass/fail status determination
  • Submission deadline management
  • Retry capabilities with score tracking

πŸ“’ Communication & Collaboration

  • Real-time announcements system
  • Comment threads on announcements
  • Inline editing of announcements
  • File attachments with download support
  • User mentions and notifications
  • Inline comment deletion (author only)
  • Timestamp tracking (absolute and relative)

πŸ“Š Analytics & Reporting

  • Student performance dashboards
  • Quiz completion rates
  • Average score calculations
  • Best score tracking
  • Activity feed with real-time updates
  • Progress visualization
  • Detailed attempt history

🎨 User Experience

  • Responsive design (mobile, tablet, desktop)
  • Intuitive navigation with tabbed interfaces
  • Real-time loading states and spinners
  • Toast notifications for user feedback
  • Dark/Light mode support (foundation)
  • Accessibility-first design
  • Smooth animations and transitions

πŸ”” Notifications

  • Real-time assignment/assessment notifications
  • Announcement updates
  • Comment notifications
  • System alerts
  • User preference controls

πŸ›  Technology Stack

Frontend

  • React 18+ - UI framework
  • React Router v6 - Client-side routing
  • Tailwind CSS - Utility-first styling
  • Lucide React - Icon library
  • Vite - Build tool and dev server

Backend & Database

  • Firebase/Firestore - Real-time database
  • Firebase Auth - Authentication & authorization
  • Firebase Storage - File storage
  • Firebase Rules - Security rules

Development Tools

  • PostCSS - CSS processing
  • ESLint - Code linting
  • Git - Version control

πŸ“ Project Structure

HYTech/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ 404.html
β”‚   └── index.html
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ auth/                 # Authentication routes
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthenticatedRoute.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PublicOnlyRoute.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RoleProtectedRoute.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SignIn.jsx
β”‚   β”‚   β”‚   └── SignUp.jsx
β”‚   β”‚   β”œβ”€β”€ dashboard/            # Dashboard components
β”‚   β”‚   β”‚   └── Dashboard.jsx
β”‚   β”‚   β”œβ”€β”€ layout/               # Layout components
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminDashboardLayout.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardLayout.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorDashboardLayout.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminNavbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorNavbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminSidebar.jsx
β”‚   β”‚   β”‚   └── SupervisorSidebar.jsx
β”‚   β”‚   β”œβ”€β”€ student/              # Student-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentHome.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentCourse.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentDashboardLayout.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentNavbar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentSidebar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentCalendar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentTasks.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentCertificates.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StudentSettings.jsx
β”‚   β”‚   β”‚   └── StudentArchivedCourses.jsx
β”‚   β”‚   β”œβ”€β”€ trainer/              # Trainer-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ TrainerHome.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ClassDetail.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ TrainerSectors.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SectorDetail.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Course.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ArchivedCourses.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Tasks.jsx
β”‚   β”‚   β”‚   └── TrainerSettings.jsx
β”‚   β”‚   β”œβ”€β”€ supervisor/           # Supervisor-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorHome.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorStudents.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorTrainers.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorCourses.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SupervisorReports.jsx
β”‚   β”‚   β”‚   └── SupervisorSettings.jsx
β”‚   β”‚   β”œβ”€β”€ users/                # User management
β”‚   β”‚   β”‚   └── UserManagement.jsx
β”‚   β”‚   β”œβ”€β”€ logs/                 # System logs
β”‚   β”‚   β”‚   └── SystemLogs.jsx
β”‚   β”‚   β”œβ”€β”€ sectors/              # Sector management
β”‚   β”‚   β”‚   └── Sectors.jsx
β”‚   β”‚   β”œβ”€β”€ settings/             # Settings
β”‚   β”‚   β”‚   └── Settings.jsx
β”‚   β”‚   β”œβ”€β”€ shared/               # Shared components
β”‚   β”‚   β”‚   β”œβ”€β”€ FlappyBirdGame.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ NotificationDropdown.jsx
β”‚   β”‚   β”‚   └── NotificationsPage.jsx
β”‚   β”‚   β”œβ”€β”€ landing/              # Landing page
β”‚   β”‚   β”‚   └── LandingPage.jsx
β”‚   β”‚   └── hytbot/               # AI Assistant
β”‚   β”‚       └── HytBot.jsx
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ AuthContext.jsx       # Authentication state
β”‚   β”‚   β”œβ”€β”€ ToastContext.jsx      # Toast notifications
β”‚   β”‚   β”œβ”€β”€ useProfileAvatar.js   # Avatar management hook
β”‚   β”‚   β”œβ”€β”€ useRoleNotifications.js # Notifications hook
β”‚   β”‚   └── useUserSettings.js    # User settings hook
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ authRole.js           # Role-based access utilities
β”‚   β”‚   β”œβ”€β”€ avatarStorage.js      # Avatar handling
β”‚   β”‚   └── firestoreService.js   # Firebase/Firestore operations
β”‚   β”œβ”€β”€ App.jsx                   # Main app component
β”‚   β”œβ”€β”€ firebase.js               # Firebase config
β”‚   β”œβ”€β”€ index.js                  # App entry point
β”‚   β”œβ”€β”€ main.jsx                  # Vite entry point
β”‚   └── index.css                 # Global styles
β”œβ”€β”€ build/                        # Production build output
β”œβ”€β”€ firebase.json                 # Firebase config
β”œβ”€β”€ firestore.rules               # Firestore security rules
β”œβ”€β”€ firestore.indexes.json        # Firestore indexes
β”œβ”€β”€ package.json
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ postcss.config.js
β”œβ”€β”€ vite.config.js
└── README.md

πŸš€ Installation & Setup

Prerequisites

  • Node.js 16+ and npm/yarn
  • Firebase project setup
  • Git for version control

Step 1: Clone & Install Dependencies

# Clone the repository
git clone <repository-url>
cd HYTech

# Install dependencies
npm install

Step 2: Configure Firebase

  1. Create a Firebase project at firebase.google.com
  2. Create a .env.local file in the project root:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
VITE_FIREBASE_APP_ID=your_app_id
  1. Update src/firebase.js with your Firebase configuration

Step 3: Initialize Firestore

# Deploy Firestore rules and indexes
firebase deploy --only firestore:rules,firestore:indexes

Step 4: Start Development Server

npm run dev

The application will be available at http://localhost:5174


⚑ Quick Start

Test Credentials

Use these credentials to test different roles:

Role Email Password
Admin admin@hyt.com admin123
Trainer trainer@hyt.com trainer123
Student student@hyt.com student123
Supervisor supervisor@hyt.com supervisor123

First Steps

  1. Sign In: Use test credentials above
  2. Navigate Dashboard: Based on your role
  3. Create Content: (Trainer/Admin) Create courses, assignments, assessments
  4. Enroll Students: (Admin/Trainer) Add students to courses
  5. Submit Assignments: (Student) Complete and submit assignments
  6. View Analytics: Track progress and scores

πŸ” Authentication

Authentication Flow

  1. Sign Up: New users register with email/password
  2. Email Verification: Optional verification step
  3. Profile Setup: Complete user profile
  4. Role Assignment: Assign user role by admin
  5. Dashboard Access: Role-based dashboard routing

Protected Routes

  • /admin/* - Admin only
  • /trainer/* - Trainer only
  • /student/* - Student only
  • /supervisor/* - Supervisor only
  • /auth/* - Public routes (Sign In, Sign Up)

Session Management

  • Firebase Auth handles sessions automatically
  • Session persists across browser restarts
  • Logout clears session and redirects to login

πŸ“– Key Features Guide

For Students

1. Course Dashboard

  • View enrolled courses
  • Track progress per course
  • Access course materials
  • See assignments and deadlines

2. Assessments Tab

- Total Assessments: Count of all available quizzes
- Completed: Number of finished assessments
- Pending: Assessments not yet started
- Average Score: Mean score across all assessments
- Take Quiz: Start or retake assessments
- View Scores: See attempt history

3. Materials Tab

  • Download course materials
  • Access learning resources
  • File type filtering
  • Upload date tracking

4. Activity Feed

  • Real-time announcements
  • Assignment updates
  • Assessment releases
  • Comment notifications

For Trainers

1. Class Dashboard

  • Overview of all classes
  • Student enrollment status
  • Recent activity
  • Performance metrics

2. Content Creation

  • Create modules and topics
  • Upload learning materials
  • Post announcements
  • Create assignments and assessments

3. Assessment Form Builder

  • Add multiple question types
  • Set point values
  • Define correct answers
  • Configure time limits
  • Set passing criteria

4. Student Management

  • View enrolled students
  • Remove students
  • Monitor progress
  • Track attempt history

For Admins

1. User Management

  • Create/edit/delete users
  • Assign roles
  • Reset passwords
  • Manage user profiles

2. Sector Management

  • Create educational sectors
  • Organize courses by sector
  • Manage sector-level settings

3. System Monitoring

  • View system logs
  • Track user activity
  • Monitor performance
  • Generate reports

πŸ— Component Architecture

State Management

Context API

  • AuthContext: User authentication and role data
  • ToastContext: Global notifications
  • Custom hooks for avatar, settings, notifications

Data Flow

Firebase Firestore
    ↓
Firestore Service (utils)
    ↓
React Components (Context + State)
    ↓
UI Components (Tailwind + Lucide)

Key Components

StudentCourse.jsx (Large Component)

- Tabs: Overview, Materials, Modules, Assessments, Activity
- Features:
  * Real-time announcements with comments
  * Quiz attempt tracking
  * Material downloads
  * Progress analytics
  * Activity feed

ClassDetail.jsx (Large Component - Trainer)

- Tabs: Overview, Modules, Assessments, Responses, Students
- Features:
  * Content management
  * Assessment form builder
  * Student response review
  * Google Meet integration
  * Real-time updates

πŸ—„ Database Schema

Collections

users

{
  uid: string,
  email: string,
  displayName: string,
  role: 'admin' | 'trainer' | 'student' | 'supervisor',
  avatar: string (base64),
  enrolledCourses: string[],
  createdAt: timestamp,
  updatedAt: timestamp
}

courses

{
  id: string,
  name: string,
  description: string,
  sector: string,
  trainer: string,
  students: string[],
  materials: Reference[],
  assignments: Reference[],
  assessments: Reference[],
  createdAt: timestamp,
  status: 'active' | 'archived'
}

assessments

{
  id: string,
  title: string,
  description: string,
  courseId: string,
  questions: Question[],
  totalPoints: number,
  duration: number,
  passingScore: number,
  createdAt: timestamp,
  attempts: AttemptRecord[]
}

announcements

{
  id: string,
  courseId: string,
  author: string,
  authorId: string,
  message: string,
  attachments: File[],
  comments: Comment[],
  createdAt: timestamp,
  updatedAt: timestamp
}

πŸ”Œ API Integration

Firestore Operations

Assessment Management

// Get assessments
const assessments = await getAssessments(courseId);

// Subscribe to real-time updates
subscribeToAssessments(courseId, (data) => {
  setAssessments(data);
});

// Submit quiz attempt
await submitQuizAttempt(courseId, quizId, {
  userId: user.uid,
  answers: answers,
  score: calculatedScore,
  passed: isPassed
});

// Check if student attempted quiz
const hasAttempted = await hasStudentAttempted(courseId, quizId, userId);

Comment Management

// Add comment
await addCommentToAnnouncement(courseId, announcementId, {
  author: userName,
  authorId: userId,
  message: text
});

// Get comments
const comments = await getAnnouncementComments(courseId, announcementId);

// Subscribe to comments
subscribeToComments(courseId, announcementId, (comments) => {
  setComments(comments);
});

File Operations

// Store announcement attachment
const fileUrl = await storeAnnouncementAttachment(
  courseId,
  announcementId,
  file
);

// Compress and store file
const compressedFile = await compressAndStoreFile(file, maxSize);

🎨 Styling & Design

Tailwind CSS

Key Classes Used

  • Layout: flex, grid, gap-*, p-*, m-*
  • Colors: bg-blue-*, text-gray-*, border-*
  • Typography: text-sm, font-semibold, line-clamp-*
  • Responsive: md:, lg:, xl: prefixes
  • States: hover:, focus:, disabled:, group-*:

Custom Styling

  • Global styles in src/index.css
  • Tailwind configuration in tailwind.config.js
  • PostCSS processing in postcss.config.js

Icon Library

  • Lucide React for consistent icons
  • Over 300+ icons available
  • Size variants: w-3 h-3, w-4 h-4, w-5 h-5, etc.

⚑ Performance Optimizations

Code Splitting

  • Route-based code splitting with React Router
  • Lazy loading components where appropriate
  • Dynamic imports for large components

Real-Time Sync

  • Firestore subscriptions for live updates
  • Efficient query filtering
  • Indexed fields for faster queries

State Management

  • Context API for global state
  • Local state for component-specific data
  • Memoization of expensive computations

Bundle Optimization

  • Tree-shaking of unused code
  • Minification in production builds
  • Asset compression and lazy loading

πŸ› Troubleshooting

Common Issues

1. Firebase Connection Error

Error: Firebase is not initialized

Solution:
- Check VITE_FIREBASE_* environment variables
- Verify Firebase project exists
- Confirm .env.local file in root directory

2. Authorization Denied

Error: Missing or insufficient permissions

Solution:
- Check Firestore security rules
- Verify user role in database
- Ensure user is authenticated
- Deploy updated firestore.rules

3. Quiz Scores Not Saving

Error: Score submission fails

Solution:
- Verify submitQuizAttempt function
- Check Firestore assessments collection
- Ensure user has write permissions
- Check network connectivity

4. Comments Not Loading

Error: Comments section empty

Solution:
- Verify subscribeToComments subscription
- Check announcement exists in database
- Verify collection structure
- Check user permissions

5. Vite Build Errors

Error: Module not found

Solution:
npm install
npm run build
# Check for TypeScript errors
npm run lint

πŸ‘₯ Contributing

Code Standards

  1. File Naming: PascalCase for components, camelCase for utilities
  2. Component Structure: Hooks β†’ State β†’ Effects β†’ Render
  3. Imports: Group imports (React, Libraries, Local)
  4. Comments: Add comments for complex logic
  5. Error Handling: Try-catch blocks for async operations

Git Workflow

# Create feature branch
git checkout -b feature/feature-name

# Make changes and commit
git add .
git commit -m "feat: add feature description"

# Push and create PR
git push origin feature/feature-name

Testing Checklist

  • Test with all user roles
  • Verify responsive design
  • Check error handling
  • Test real-time updates
  • Validate form inputs
  • Test file uploads
  • Check performance metrics

πŸš€ Deployment

Build for Production

npm run build

Firebase Hosting Deployment

# Install Firebase CLI
npm install -g firebase-tools

# Login to Firebase
firebase login

# Deploy
firebase deploy

Environment Setup for Production

VITE_FIREBASE_API_KEY=prod_api_key
VITE_FIREBASE_AUTH_DOMAIN=prod_auth_domain
VITE_FIREBASE_PROJECT_ID=prod_project_id
# ... other production credentials

πŸ“ž Support & Contact

For issues or questions:

  1. Check this README and troubleshooting section
  2. Review Firebase documentation
  3. Check component JSDoc comments
  4. Contact development team

πŸ“ Version History

v1.0.0 (Current)

  • Multi-role authentication system
  • Course and content management
  • Assessment form builder
  • Real-time announcements with comments
  • Student progress tracking
  • Activity feeds
  • File uploads and downloads
  • Responsive design
  • Real-time synchronization

πŸ“„ License

This project is proprietary to HYT Global Institute. Unauthorized copying or distribution is prohibited.


πŸŽ“ About HYTech LMS

The HYTech Learning Management System is built with modern technologies to provide an intuitive, scalable, and feature-rich platform for educational institutions. It emphasizes user experience, real-time collaboration, and comprehensive learning analytics.

Key Principles:

  • User-centric design
  • Real-time data synchronization
  • Security and privacy
  • Scalability and performance
  • Accessibility compliance

Last Updated: April 22, 2026 Version: 1.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages