Skip to content

aditya-2129/lms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LMS

A comprehensive Learning Management System built with modern web technologies to deliver a seamless online education experience.

last-commit repo-top-language repo-language-count

Developed with the software and tools below.

JavaScript TypeScript React Next.js Tailwind CSS Prisma Clerk Stripe MongoDB MySQL Axios ESLint PostCSS


๐Ÿ”— Quick Links


๐Ÿ“ Overview

The LMS (Learning Management System) is an advanced platform designed for both students and educators to facilitate online learning. Developed with modern technologies like JavaScript, Node.js, Express, MongoDB, and React, this system aims to deliver a seamless educational experience. The LMS is equipped with features that support course creation, management, and delivery, making it a comprehensive solution for online education.


๐Ÿ“ฆ Features

  • Browse & Filter Courses: Users can explore and find courses that match their interests and needs.
  • Purchase Courses using Stripe: Secure and reliable payment processing integrated with Stripe.
  • Progress Tracking: Students can mark chapters as completed or uncompleted and track their progress.
  • Student Dashboard: A personalized dashboard for students to manage their courses and track progress.
  • Teacher Mode: Tools and features specifically designed for educators to create and manage their courses.
  • Course Creation: Instructors can create new courses and chapters, upload thumbnails, attachments, and videos.
  • Drag and Drop Chapter Reordering: Easily reorder chapters within a course.
  • Video Processing and HLS Player: Videos are processed and played using Mux for a smooth viewing experience.
  • Rich Text Editor: A powerful editor for creating detailed chapter descriptions.
  • Authentication with Clerk: Secure user authentication and management.
  • ORM with Prisma: Efficient database interactions using Prisma.
  • MySQL Database: Reliable data storage with Render.
  • Course Grid & Card UI: Intuitive and visually appealing UI for course display.
  • Stripe Integration: Seamless payment processing for purchasing courses.
  • Teacher Analytics Dashboard: Detailed analytics for teachers to monitor student engagement and performance.
  • Admin Protection (Optional): Additional security features for admin users.
  • Deployment: Easy deployment process for making the LMS available online.

๐Ÿ“ธ Screenshots

Homepage Overview ๐Ÿ 
Homepage Screenshot
Course Listing ๐Ÿ“š
Course Listing Screenshot
Course Details ๐Ÿ“–
Course Details Screenshot
Student Dashboard ๐Ÿ‘จโ€๐ŸŽ“
Student Dashboard Screenshot
Teacher Dashboard ๐Ÿ‘ฉโ€๐Ÿซ
Teacher Dashboard Screenshot
Settings and Profile โš™๏ธ
Settings Screenshot

๐Ÿ“‚ Repository Structure

โ””โ”€โ”€ lms/
    โ”œโ”€โ”€ README.md
    โ”œโ”€โ”€ actions
    โ”‚   โ”œโ”€โ”€ get-analytics.ts
    โ”‚   โ”œโ”€โ”€ get-chapter.ts
    โ”‚   โ”œโ”€โ”€ get-courses.ts
    โ”‚   โ”œโ”€โ”€ get-dashboard-courses.ts
    โ”‚   โ””โ”€โ”€ get-progress.tsx
    โ”œโ”€โ”€ app
    โ”‚   โ”œโ”€โ”€ (auth)
    โ”‚   โ”‚   โ”œโ”€โ”€ (routes)
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ sign-in
    โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ [[...sign-in]]
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sign-up
    โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ [[...sign-up]]
    โ”‚   โ”‚   โ””โ”€โ”€ layout.tsx
    โ”‚   โ”œโ”€โ”€ (course)
    โ”‚   โ”‚   โ””โ”€โ”€ courses
    โ”‚   โ”‚       โ””โ”€โ”€ [courseId]
    โ”‚   โ”‚           โ”œโ”€โ”€ _components
    โ”‚   โ”‚           โ”œโ”€โ”€ chapters
    โ”‚   โ”‚           โ”œโ”€โ”€ layout.tsx
    โ”‚   โ”‚           โ””โ”€โ”€ page.tsx
    โ”‚   โ”œโ”€โ”€ (dashboard)
    โ”‚   โ”‚   โ”œโ”€โ”€ (routes)
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ (root)
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _components
    โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ search
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ _components
    โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ page.tsx
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ teacher
    โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ analytics
    โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ courses
    โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ create
    โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ layout.tsx
    โ”‚   โ”‚   โ”œโ”€โ”€ _components
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Logo.tsx
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mobile-Sidebar.tsx
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ navbar.tsx
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ sidebar-item.tsx
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ sidebar-routes.tsx
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ sidebar.tsx
    โ”‚   โ”‚   โ””โ”€โ”€ layout.tsx
    โ”‚   โ”œโ”€โ”€ api
    โ”‚   โ”‚   โ”œโ”€โ”€ courses
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ [courseId]
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ attachments
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ chapters
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ checkout
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ publish
    โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ route.ts
    โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ unpublish
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ route.ts
    โ”‚   โ”‚   โ”œโ”€โ”€ uploadthing
    โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ core.ts
    โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ route.ts
    โ”‚   โ”‚   โ””โ”€โ”€ webhook
    โ”‚   โ”‚       โ””โ”€โ”€ route.ts
    โ”‚   โ”œโ”€โ”€ favicon.ico
    โ”‚   โ”œโ”€โ”€ globals.css
    โ”‚   โ””โ”€โ”€ layout.tsx
    โ”œโ”€โ”€ components
    โ”‚   โ”œโ”€โ”€ banner.tsx
    โ”‚   โ”œโ”€โ”€ course-card.tsx
    โ”‚   โ”œโ”€โ”€ course-progress.tsx
    โ”‚   โ”œโ”€โ”€ courses-list.tsx
    โ”‚   โ”œโ”€โ”€ editor.tsx
    โ”‚   โ”œโ”€โ”€ file-upload.tsx
    โ”‚   โ”œโ”€โ”€ icon-badge.tsx
    โ”‚   โ”œโ”€โ”€ modals
    โ”‚   โ”‚   โ””โ”€โ”€ confirm-modal.tsx
    โ”‚   โ”œโ”€โ”€ navbar-routes.tsx
    โ”‚   โ”œโ”€โ”€ preview.tsx
    โ”‚   โ”œโ”€โ”€ providers
    โ”‚   โ”‚   โ”œโ”€โ”€ confetii-provider.tsx
    โ”‚   โ”‚   โ””โ”€โ”€ toaster-provider.tsx
    โ”‚   โ”œโ”€โ”€ search-input.tsx
    โ”‚   โ””โ”€โ”€ ui
    โ”‚       โ”œโ”€โ”€ alert-dialog.tsx
    โ”‚       โ”œโ”€โ”€ badge.tsx
    โ”‚       โ”œโ”€โ”€ button.tsx
    โ”‚       โ”œโ”€โ”€ card.tsx
    โ”‚       โ”œโ”€โ”€ checkbox.tsx
    โ”‚       โ”œโ”€โ”€ combobox.tsx
    โ”‚       โ”œโ”€โ”€ command.tsx
    โ”‚       โ”œโ”€โ”€ dialog.tsx
    โ”‚       โ”œโ”€โ”€ dropdown-menu.tsx
    โ”‚       โ”œโ”€โ”€ form.tsx
    โ”‚       โ”œโ”€โ”€ input.tsx
    โ”‚       โ”œโ”€โ”€ label.tsx
    โ”‚       โ”œโ”€โ”€ popover.tsx
    โ”‚       โ”œโ”€โ”€ progress.tsx
    โ”‚       โ”œโ”€โ”€ separator.tsx
    โ”‚       โ”œโ”€โ”€ sheet.tsx
    โ”‚       โ”œโ”€โ”€ table.tsx
    โ”‚       โ””โ”€โ”€ textarea.tsx
    โ”œโ”€โ”€ components.json
    โ”œโ”€โ”€ hooks
    โ”‚   โ”œโ”€โ”€ use-confetti-store.ts
    โ”‚   โ””โ”€โ”€ use-debounce.ts
    โ”œโ”€โ”€ lib
    โ”‚   โ”œโ”€โ”€ db.ts
    โ”‚   โ”œโ”€โ”€ format.ts
    โ”‚   โ”œโ”€โ”€ stripe.ts
    โ”‚   โ”œโ”€โ”€ teacher.ts
    โ”‚   โ”œโ”€โ”€ uploadthing.ts
    โ”‚   โ””โ”€โ”€ utils.ts
    โ”œโ”€โ”€ middleware.ts
    โ”œโ”€โ”€ next.config.mjs
    โ”œโ”€โ”€ package-lock.json
    โ”œโ”€โ”€ package.json
    โ”œโ”€โ”€ postcss.config.mjs
    โ”œโ”€โ”€ prisma
    โ”‚   โ””โ”€โ”€ schema.prisma
    โ”œโ”€โ”€ public
    โ”‚   โ”œโ”€โ”€ logo.svg
    โ”‚   โ”œโ”€โ”€ next.svg
    โ”‚   โ””โ”€โ”€ vercel.svg
    โ”œโ”€โ”€ scripts
    โ”‚   โ””โ”€โ”€ seed.ts
    โ”œโ”€โ”€ tailwind.config.ts
    โ””โ”€โ”€ tsconfig.json

๐Ÿงฉ Modules

.
File Summary
middleware.ts Contains custom middleware functions used for processing requests and managing authentication, logging, and error handling.
postcss.config.mjs Configuration file for PostCSS, which is used to process CSS files and apply plugins for optimizing and transforming styles.
tailwind.config.ts Configuration file for Tailwind CSS, defining custom themes, colors, and breakpoints to style the application.
components.json JSON file listing all reusable UI components used throughout the application, including their properties and configuration.
tsconfig.json TypeScript configuration file specifying compiler options, type checking rules, and project settings for the TypeScript compiler.
package.json Defines the project's dependencies, scripts, and metadata, including project name, version, and description.
next.config.mjs Configuration file for Next.js, used to customize the Next.js build and runtime behavior, such as webpack configurations and environment variables.
package-lock.json Automatically generated file that locks the versions of dependencies used in the project to ensure consistent installations across environments.
actions
File Summary
get-dashboard-courses.ts Handles fetching the list of courses available on the user's dashboard, including course details and progress.
get-progress.tsx Retrieves and displays the progress of a specific course or chapter for a user, used in progress tracking.
get-courses.ts Fetches the list of all courses available on the platform, including filtering and search functionality.
get-chapter.ts Retrieves information for a specific chapter of a course, including chapter content and metadata.
get-analytics.ts Provides analytical data related to courses and user interactions, such as engagement metrics and performance statistics.

components
File Summary
navbar-routes.tsx Defines the navigation routes and links in the applicationโ€™s navigation bar for seamless user experience.
preview.tsx Renders previews of course content or materials, allowing users to view content before enrolling or purchasing.
icon-badge.tsx Displays badge icons for various course or user statuses, such as completion or achievements.
search-input.tsx Provides a search input field for filtering and finding courses or content within the platform.
editor.tsx Implements a rich text editor for creating and editing course chapters and descriptions.
course-card.tsx Displays individual course cards with key details and actions like enrollment or preview.
file-upload.tsx Handles file uploads for course materials, including videos, attachments, and thumbnails.
course-progress.tsx Shows progress for each course, including completed chapters and overall course completion status.
courses-list.tsx Lists all available courses with options for browsing, filtering, and sorting.
banner.tsx Displays promotional banners or notifications to users, such as special offers or important updates.

components.modals
File Summary
confirm-modal.tsx Displays a confirmation modal for user actions requiring confirmation, such as deletions or critical changes.

components.ui
File Summary
popover.tsx Implements a popover component for displaying additional information or controls in a floating overlay.
combobox.tsx Provides a combobox component for selecting an item from a dropdown list with an optional search feature.
separator.tsx Renders a visual separator line to distinguish sections or groups of content.
label.tsx Displays labels for form fields or other UI elements to provide context and guidance to users.
textarea.tsx Provides a multiline input field for user text input, typically used in forms and content editors.
sheet.tsx Implements a sheet component for displaying side panels or sliding overlays with additional content.
checkbox.tsx Renders a checkbox input for binary selection, allowing users to choose between two options.
dropdown-menu.tsx Provides a dropdown menu component for displaying a list of actions or options in a collapsible menu.
badge.tsx Displays a badge component to show counts, statuses, or notifications in a small, visible label.
progress.tsx Implements a progress bar or indicator to show the completion status of a task or process.
card.tsx Renders a card component for grouping related information or actions into a visually distinct container.
alert-dialog.tsx Implements an alert dialog component for displaying important messages or alerts to users.
dialog.tsx Provides a dialog component for creating modal windows or interactive pop-ups.
command.tsx Implements a command input component for executing actions or commands through user input.
input.tsx Renders a standard input field for single-line text entry in forms or user interfaces.
table.tsx Provides a table component for displaying data in a structured grid with rows and columns.
button.tsx Renders a button component for triggering actions or navigating within the application.
form.tsx Implements a form component for handling user input and submitting data with validation.

components.providers
File Summary
toaster-provider.tsx Provides the context and functionality for displaying toast notifications throughout the application.
confetii-provider.tsx Implements the confetti effect provider for adding celebratory animations or visual effects.

scripts
File Summary
seed.ts Contains the script for seeding the database with initial data, such as default courses or users.

lib
File Summary
utils.ts Contains utility functions used across the application for common tasks and operations.
uploadthing.ts Provides functions and configurations for handling file uploads through the UploadThing service.
db.ts Manages database connections and interactions, including setup and configuration.
format.ts Includes functions for formatting data, such as dates and numbers, for consistent presentation.
stripe.ts Contains integration logic for Stripe payment processing, including API interactions and setup.
teacher.ts Provides functions and data management related to teacher-specific features and operations.

hooks
File Summary
use-confetti-store.ts Implements a custom hook for managing and triggering confetti effects in the application.
use-debounce.ts Provides a custom hook for debouncing values, which helps in reducing the frequency of updates or API calls.

prisma
File Summary
schema.prisma Defines the Prisma schema, including models, relationships, and database configurations for the application.

app
File Summary
globals.css Contains global CSS styles for the application, providing a consistent look and feel across all pages.
layout.tsx Defines the layout component for the application, including the structure and placement of common UI elements.

app.(dashboard)
File Summary
layout.tsx Defines the layout specific to the dashboard section of the application, including dashboard-specific UI elements and structure.

app.(dashboard).(routes).teacher
File Summary
layout.tsx Defines the layout specific to the teacher routes within the dashboard, including teacher-specific UI elements and structure.

app.(dashboard).(routes).teacher.create
File Summary
page.tsx Contains the page component for creating new teacher-related content or resources, including forms and UI elements for the creation process.

app.(dashboard).(routes).teacher.analytics
File Summary
page.tsx Contains the page component for displaying teacher analytics, including data visualizations and performance metrics relevant to teachers.

app.(dashboard).(routes).teacher.analytics._components
File Summary
chart.tsx Contains the component for rendering charts and visualizations, used to display analytical data.
data-card.tsx Defines the component for displaying individual data cards, showcasing metrics and key performance indicators.

app.(dashboard).(routes).teacher.courses
File Summary
page.tsx Contains the page component for managing and displaying teacher courses, including course lists and details.

app.(dashboard).(routes).teacher.courses.[courseId]
File Summary
page.tsx Contains the page component for displaying and managing a specific course identified by its ID, including details such as course content, progress, and management options.

app.(dashboard).(routes).teacher.courses.[courseId]._components
File Summary
chapters-form.tsx Provides a form component for managing course chapters, including adding, editing, and deleting chapters.
attachment-form.tsx Contains a form component for managing course attachments, such as documents or additional resources.
description-form.tsx Includes a form for editing the course description, allowing updates to course content and details.
price-form.tsx Manages the form for setting or updating the price of the course, including pricing details and options.
category-form.tsx Provides a form component for setting or updating course categories, enabling better organization and filtering.
actions.tsx Contains action buttons and components for performing course-related actions, such as saving or deleting course data.
chapters-list.tsx Displays a list of course chapters, including options to manage or reorder chapters within the course.
image-form.tsx Manages the form for uploading and setting course images or thumbnails, enhancing the visual presentation of the course.
title-form.tsx Provides a form for editing or setting the course title, ensuring that the title accurately reflects the course content.

app.(dashboard).(routes).teacher.courses.[courseId].chapters.[chapterId]
File Summary
page.tsx Displays the details and content of a specific chapter within a course, allowing for viewing and potentially editing chapter information.

app.(dashboard).(routes).teacher.courses.[courseId].chapters.[chapterId]._components
File Summary
chapter-title-form.tsx Provides a form to edit or update the title of a chapter within a course.
chapter-description-form.tsx Allows editing or updating the description of a chapter within a course.
chapter-access-form.tsx Manages access settings or permissions for a chapter, determining who can view or edit it.
chapter-video-form.tsx Facilitates the upload or editing of video content associated with a chapter.
chapter-actions.tsx Provides actions for managing a chapter, such as save, delete, or reorder options.

app.(dashboard).(routes).teacher.courses._components
File Summary
data-table.tsx Displays a table view of course data, allowing for sorting, filtering, and pagination of course information.
columns.tsx Defines the structure and content of columns used in tables for displaying course data.

app.(dashboard).(routes).search
File Summary
page.tsx Implements the search functionality, providing users with the ability to search through courses or content using various filters and search criteria.

app.(dashboard).(routes).search._components
File Summary
categories.tsx Renders a list of categories for search filtering, allowing users to narrow down search results by category.
category-item.tsx Represents individual category items in the search filter, providing clickable options for users.

app.(dashboard).(routes).(root)
File Summary
page.tsx Serves as the main page layout or entry point for the root route in the dashboard. It may include overall navigation and high-level dashboard features.

app.(dashboard).(routes).(root)._components
File Summary
info-card.tsx Displays informational cards on the main dashboard page, providing quick insights or statistics.

app.(dashboard)._components
File Summary
Logo.tsx Renders the logo component, typically used in the header or sidebar for branding and navigation.
mobile-Sidebar.tsx Implements a mobile-friendly sidebar, providing navigation options and potentially collapsing or hiding features on smaller screens.
sidebar.tsx Displays the main sidebar with navigation links, often including features like course lists, user settings, and other dashboard sections.
sidebar-item.tsx Represents an individual item within the sidebar, used for navigation between different sections or pages.
sidebar-routes.tsx Defines and manages the routing and links within the sidebar, ensuring navigation flows correctly between different parts of the application.
navbar.tsx Implements the top navigation bar, including features like logo, search, user profile options, and other navigation elements.

app.api.uploadthing
File Summary
route.ts Defines API routes for handling upload-related operations, such as file uploads and related requests.
core.ts Implements core functionality for the upload service, including file processing, validation, and management.

app.api.courses
File Summary
route.ts Defines API routes related to course management, including endpoints for creating, updating, and retrieving course data.

app.api.courses.[courseId]
File Summary
route.ts Manages API routes for operations on a specific course identified by courseId, including endpoints for retrieving, updating, or deleting course details.

app.api.courses.[courseId].unpublish
File Summary
route.ts Manages the API route for unpublishing a specific course identified by courseId. This endpoint is used to change the status of the course, making it unavailable to students.

app.api.courses.[courseId].publish
File Summary
route.ts Manages the API route for publishing a specific course identified by courseId. This endpoint is used to make the course available to students.

app.api.courses.[courseId].checkout
File Summary
route.ts Handles the API route for initiating a checkout process for a specific course identified by courseId. This endpoint typically involves payment processing and order creation.

app.api.courses.[courseId].attachments
File Summary
route.ts Manages the API routes for handling course attachments. This includes operations such as uploading, retrieving, and managing files associated with a specific course identified by courseId.

app.api.courses.[courseId].attachments.[attachmentId]
File Summary
route.ts Manages the API routes for handling operations on a specific attachment within a course. This includes actions like retrieving, updating, or deleting an attachment identified by attachmentId for a given courseId.

app.api.courses.[courseId].chapters
File Summary
route.ts Defines API routes for managing course chapters, including operations like creating, updating, and retrieving chapters for a specific course identified by courseId.

app.api.courses.[courseId].chapters.[chapterId]
File Summary
route.ts Defines API routes for managing a specific chapter within a course, identified by courseId and chapterId. This includes operations such as updating, deleting, and retrieving information for that chapter.

app.api.courses.[courseId].chapters.[chapterId].progress
File Summary
route.ts Defines API routes for managing the progress of a specific chapter within a course, identified by courseId and chapterId. This includes tracking and updating progress status for users.

app.api.courses.[courseId].chapters.[chapterId].unpublish
File Summary
route.ts Manages API routes for unpublishing a specific chapter within a course, identified by courseId and chapterId. This typically involves changing the chapter's visibility or status to not available to students.

app.api.courses.[courseId].chapters.[chapterId].publish
File Summary
route.ts Handles API routes for publishing a specific chapter within a course, identified by courseId and chapterId. This usually involves updating the chapter's status to make it visible and accessible to students.

app.api.courses.[courseId].chapters.reorder
File Summary
route.ts Handles API routes for reordering chapters within a specific course, identified by courseId. This involves updating the order of chapters as specified by the user.

app.api.webhook
File Summary
route.ts Manages API routes for handling webhook events. This could include processing incoming data from external services or systems as specified in the webhook configuration.

app.(course).courses.[courseId]
File Summary
page.tsx Renders the main course page for a specific course identified by courseId. This file handles the display of course details, including course content, instructor information, and student interactions.
layout.tsx Defines the layout structure for the course pages, ensuring consistent presentation and navigation elements for courses identified by courseId. It may include headers, sidebars, and other layout components.

app.(course).courses.[courseId]._components
File Summary
course-sidebar.tsx Implements the sidebar for course pages, providing navigation links and additional course-related options. It organizes and presents links to various sections of the course.
course-navbar.tsx Contains the navigation bar for course pages, including elements like course title, user profile, and primary navigation actions.
course-sidebar-item.tsx Defines individual items or links within the course sidebar, allowing users to navigate to specific sections or features of the course.
course-mobile-sidebar.tsx Provides a mobile-friendly version of the course sidebar, optimizing navigation and layout for smaller screens.

app.(course).courses.[courseId].chapters.[chapterId]
File Summary
page.tsx Displays the details and contents of a specific chapter within a course, including chapter title, description, and associated resources. It likely manages the layout and presentation of the chapterโ€™s content.

app.(course).courses.[courseId].chapters.[chapterId]._components
File Summary
course-enroll-button.tsx Renders a button for enrolling in a course. This button likely initiates the enrollment process or redirects users to a sign-up page.
course-progress-button.tsx Displays a button for tracking or updating course progress. It may show current progress and allow users to mark lessons as complete.
video-player.tsx Provides a video player interface for watching course videos. It includes playback controls and may handle video loading and streaming.

app.(auth)
File Summary
layout.tsx Manages the layout and structure for authentication-related pages. This file likely sets up common elements such as headers, footers, and sidebars for pages related to user authentication. It might also handle routing or conditional rendering based on user authentication status.

app.(auth).(routes).sign-in.[[...sign-in]]
File Summary
page.tsx Handles the sign-in page for authentication. This file likely includes the form for user login, input validation, and error handling. It may also manage user redirection or display messages based on sign-in status.

app.(auth).(routes).sign-up.[[...sign-up]]
File Summary
page.tsx Handles the sign-up page for new user registration. This file likely includes the form for creating a new account, input validation, and error handling. It may also manage user redirection or display messages based on the registration status.


Hereโ€™s the updated "Getting Started" section with the details of the dependencies included:


๐Ÿš€ Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • TypeScript: ^5
  • Node.js: Ensure compatibility with the project's requirements
  • Prisma: ^5.16.1

Project Dependencies

  • Core Packages:

    • Next.js: ^14.2.4
    • React: ^18
    • Prisma Client: ^5.16.2
  • UI & Components:

    • Radix UI: For UI primitives (e.g., @radix-ui/react-alert-dialog, @radix-ui/react-checkbox, etc.)
    • Lucide Icons: ^0.400.0
    • Tailwind CSS: ^3.4.1
    • Tailwind CSS Animate: ^1.0.7
    • Class Variance Authority: ^0.7.0
  • Utilities:

    • Axios: ^1.7.2
    • Zod: ^3.23.8
    • React Hook Form: ^7.44.3
    • React Dropzone: ^14.2.3
    • React Hot Toast: ^2.4.1
    • React Quill: ^2.0.0
    • Stripe: ^16.2.0
    • Recharts: ^2.12.7
    • Query String: ^9.0.0
    • Uploadthing: ^6.13.2
  • Development Tools:

    • ESLint: ^8
    • ESLint Config Next: 14.2.4
    • PostCSS: ^8
    • Prisma CLI: ^5.16.1
    • TypeScript: ^5

โš™๏ธ Installation

  1. Clone the lms Repository:

    git clone https://github.com/leonardoo210399/lms
  2. Change to the Project Directory:

    cd lms
  3. Install the Dependencies:

    npm install

๐Ÿค– Running Locally

  1. Development Server:

    Start the development server with:

    npm run dev
  2. Build for Production:

    Build the application for production with:

    npm run build
  3. Start Production Server:

    Start the production server with:

    npm run start

๐Ÿงช Testing

To execute tests, run:

npm test

๐Ÿ”ง Linting

Run the linter with:

npm run lint

๐Ÿ› ๏ธ Post-Install

Generate the Prisma client after installing dependencies with:

npm run postinstall

๐ŸŒ Environment Variables

To run this project, you will need to add the following environment variables to your .env file:

# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_key
CLERK_SECRET_KEY=your_key

# Clerk Sign-In/Sign-Up URLs
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/

# Prisma Configuration
# This was inserted by `prisma init`:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema

# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="your_database_url"

# UploadThing Configuration
UPLOADTHING_SECRET=your_key
UPLOADTHING_APP_ID=your_key

# Mux Configuration
MUX_TOKEN_ID=your_key
MUX_TOKEN_SECRET=your_key

# Stripe Configuration
STRIPE_API_KEY=your_key
NEXT_PUBLIC_APP_URL=http://localhost:3000
STRIPE_WEBHOOK_SECRET=your_key

# Additional Configurations
NEXT_PUBLIC_TEACHER_ID=your_key

๐Ÿš€ Optimizations

๐Ÿ› ๏ธ Code Refactoring

  1. Modularization: Split large components and functions into smaller, reusable modules to improve readability and maintainability.
  2. Code Cleanup: Removed redundant code, comments, and unused variables to reduce clutter.
  3. Consistent Naming: Adopted a consistent naming convention for variables, functions, and components to improve code clarity.
  4. TypeScript Conversion: Converted JavaScript code to TypeScript for better type safety and error checking.

โšก Performance Improvements

  1. Lazy Loading: Implemented lazy loading for components and images to reduce initial load time.
  2. Memoization: Used React's useMemo and useCallback hooks to prevent unnecessary re-renders and optimize performance.
  3. Optimized Queries: Improved database queries with indexing and optimized filtering to enhance data retrieval speed.
  4. Static Asset Caching: Configured caching for static assets to reduce server load and improve load times.
  5. Code Splitting: Utilized dynamic imports to split code into smaller bundles, improving load times for large applications.
  6. Debouncing: Implemented debouncing for search inputs and other frequent user actions to reduce unnecessary API calls.

โ™ฟ Accessibility Enhancements

  1. ARIA Roles: Added ARIA roles to improve accessibility for users relying on screen readers.
  2. Keyboard Navigation: Ensured that all interactive elements are accessible via keyboard navigation.
  3. Alt Text: Provided meaningful alt text for images to enhance the experience for visually impaired users.
  4. Color Contrast: Improved color contrast to ensure readability for users with visual impairments.
  5. Semantic HTML: Used semantic HTML elements (e.g., <header>, <main>, <footer>) to provide better structure and meaning to the content.
  6. Focus Management: Managed focus states to improve navigation for keyboard and screen reader users.

๐Ÿ”’ Security Enhancements

  1. Input Validation: Implemented server-side and client-side validation to prevent SQL injection and cross-site scripting (XSS) attacks.
  2. Authentication: Used secure authentication methods and token handling to protect user data.
  3. Environment Variables: Secured sensitive information using environment variables.
  4. HTTPS: Enforced HTTPS for secure data transmission.

๐ŸŽจ UX/UI Improvements

  1. Responsive Design: Ensured the application is fully responsive and works well on various screen sizes and devices.
  2. Loading Indicators: Added loading indicators to provide feedback during data fetching operations.
  3. Error Handling: Implemented comprehensive error handling to gracefully manage and display error messages to users.
  4. User Feedback: Provided feedback for user actions like form submissions, button clicks, etc.
  5. Improved Forms: Enhanced form usability with clear labels, validation messages, and accessibility improvements.

By implementing these optimizations, the application not only performs better but also provides a more accessible, secure, and user-friendly experience.


๐Ÿ›  Project Roadmap

  • โ–บ Initial Setup and Configuration
  • โ–บ Implement Course Management
  • โ–บ Integrate Payment System with Stripe
  • โ–บ Develop Student and Teacher Dashboards
  • โ–บ Add Video Processing and HLS Player
  • โ–บ Implement Authentication with Clerk
  • โ–บ Set Up ORM with Prisma and MySQL
  • โ–บ Enhance UX/UI Design
  • โ–บ Implement Advanced Analytics for Teachers
  • โ–บ Add Admin Protection Features (Optional)
  • โ–บ Optimize Performance and Accessibility
  • โ–บ Final Testing and Debugging
  • โ–บ Deployment and Launch

๐Ÿ‘ Acknowledgments

We extend our heartfelt thanks to the following individuals and resources who contributed to the success of this project:

  • OpenAI: For providing the powerful GPT models that inspired innovative features and solutions.
  • Mux: For offering exceptional video processing and HLS streaming services that enhanced our multimedia capabilities.
  • Stripe: For delivering a seamless and reliable payment processing system.
  • Clerk: For providing robust authentication services that ensure secure user management.
  • UploadThing: For facilitating smooth file uploads and management.
  • Prisma: For offering an intuitive ORM to simplify database interactions.
  • Tailwind CSS: For a versatile utility-first CSS framework that streamlined our styling process.
  • React and Next.js: For powerful tools that enabled the creation of a dynamic and responsive front-end.
  • Render.com: For providing a reliable and scalable database solution.

Special Thanks

  • Our Community: For providing valuable feedback and suggestions that guided the development of this project.
  • Open Source Contributors: For sharing their knowledge and tools, which greatly accelerated our development process.
  • Friends and Family: For their continuous support and encouragement throughout the development of this project.

Return


About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages