{"id":23083992,"url":"https://github.com/manavalan2517/ai-lms","last_synced_at":"2026-04-07T21:31:40.435Z","repository":{"id":267114148,"uuid":"893977236","full_name":"Manavalan2517/ai-lms","owner":"Manavalan2517","description":"This project is an AI-powered Learning Management System (AI LMS) built using Next.js, Clerk for authentication, Inngest for function orchestration, Drizzle ORM for database interaction, and Google Gemini for AI-powered content generation. It allows users to create personalized study materials for various learning goals,","archived":false,"fork":false,"pushed_at":"2024-12-08T12:26:47.000Z","size":87858,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T00:25:36.880Z","etag":null,"topics":["ai","clerk","drizzle-orm","full-stack","full-stack-development","google-gemini","inngest","interactive-learning","learning-management-system","nextjs","nodejs","noen","open-source","personalised-learning","postgresql","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Manavalan2517.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-25T14:36:58.000Z","updated_at":"2025-10-26T16:01:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2fc969b-273e-401e-8534-80c467cfaa76","html_url":"https://github.com/Manavalan2517/ai-lms","commit_stats":null,"previous_names":["manavalan2517/ai-lms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Manavalan2517/ai-lms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manavalan2517%2Fai-lms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manavalan2517%2Fai-lms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manavalan2517%2Fai-lms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manavalan2517%2Fai-lms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Manavalan2517","download_url":"https://codeload.github.com/Manavalan2517/ai-lms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manavalan2517%2Fai-lms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31530641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","clerk","drizzle-orm","full-stack","full-stack-development","google-gemini","inngest","interactive-learning","learning-management-system","nextjs","nodejs","noen","open-source","personalised-learning","postgresql","tailwindcss"],"created_at":"2024-12-16T15:22:56.545Z","updated_at":"2026-04-07T21:31:40.419Z","avatar_url":"https://github.com/Manavalan2517.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# AI-Powered Learning Management System (AI LMS)\n\nThis project is an AI-powered Learning Management System (AI LMS) built using Next.js, Clerk for authentication, Inngest for function orchestration, Drizzle ORM for database interaction, and Google Gemini for AI-powered content generation. It allows users to create personalized study materials for various learning goals, such as exam preparation, job interviews, or general practice.\n\n## Demo\n- [Demo Video](https://drive.google.com/file/d/1CuD56rPsAf80mXNPXnVTLV0EYdY53B3z/view?t=2)\n\n\n## Features\n\n* **AI-Driven Course Outline Generation:** Users input a topic, course type (e.g., Exam, Job Interview, Practice, Code Prep, Other), and difficulty level.  The AI generates a course outline containing a summary, chapters, chapter summaries, topic lists for each chapter, and relevant emojis, all formatted in JSON.\n* **Dynamic Study Material Generation:**  Based on the course outline, the system dynamically generates various types of study materials:\n    * **Chapter Notes:** Detailed notes for each chapter, broken down by topics, in markdown format for easy rendering.\n    * **Flashcards:** Interactive flashcards for memorization, with front and back content.\n    * **Quizzes:** Gamified quizzes with multiple-choice questions, timers, and scoring to test knowledge.\n    * **Question \u0026 Answer (Q\u0026A):**  Comprehensive question-and-answer pairs for deeper learning.\n* **Personalized Learning Paths:** Users can select the specific study material types they want to generate and use.  An \"ALL\" option generates all available study types.\n* **User Authentication:** Clerk manages user registration, login, and secure sessions.\n* **Database Integration:** Drizzle ORM facilitates interactions with a Neon Serverless PostgreSQL database, storing course data, user information, and generated study materials.\n* **Background Task Orchestration:**  Inngest orchestrates the complex interactions between the AI model, database operations, and asynchronous content generation, providing a seamless user experience.\n* **Progress Tracking (Generating/Ready Status):** UI elements indicate the status of material generation, providing feedback to the user while content is being created in the background.\n* **Interactive Flashcard UI:** Flashcards are presented in a user-friendly swipeable interface with flip card animations.\n* **Gamified Quiz Experience:** Quizzes include timers, scoring, and feedback on correct/incorrect answers, enhancing user engagement.\n* **Markdown Rendering for Notes and Q\u0026A:**  Notes and Q\u0026A content are rendered using `react-markdown` and `remark-gfm` for a clean and formatted display.\n\n\n## Tech Stack\n\n* **Frontend:** Next.js (App Router), React, Tailwind CSS, Ripple UI, Lucide React, Swiper.js, React Card Flip, Styled Components\n* **Backend/Serverless:**  Node.js, Inngest, Clerk\n* **Database:** Neon Serverless PostgreSQL, Drizzle ORM\n* **AI:** Google Gemini\n\n\n## Installation and Setup\n\n1. **Clone the Repository:**\n\n```bash\ngit clone https://github.com/your-username/ai-lms.git\n```\n\n2. **Install Dependencies:**\n\n```bash\ncd ai-lms\nnpm install\n```\n\n3. **Environment Variables:**\n\nCreate a `.env.local` file in the project root and add the following:\n\n```\nNEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=YOUR_CLERK_PUBLISHABLE_KEY\nCLERK_SECRET_KEY=YOUR_CLERK_SECRET_KEY\nNEXT_PUBLIC_DATABASE_CONNECTION_STRING=YOUR_NEON_DATABASE_CONNECTION_STRING\nNEXT_PUBLIC_GEMINI_API_KEY=YOUR_GOOGLE_GEMINI_API_KEY\n```\n\n* **`NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`**: Your Clerk publishable key.\n* **`CLERK_SECRET_KEY`**: Your Clerk secret key.\n* **`NEXT_PUBLIC_DATABASE_CONNECTION_STRING`**: Your Neon database connection string.\n* **`NEXT_PUBLIC_GEMINI_API_KEY`**: Your Google Gemini API key.\n\n4. **Run the Development Server:**\n\n```bash\nnpm run dev\n```\n\n\n## Project Structure\n\n* **`app`**:  Next.js App Router directory containing all application code:\n    * **`api`**:  API routes for backend logic.\n    * **`components`**: Reusable UI components.\n    * **`course/[courseId]`**:  Course details pages (dynamic routing).\n    * **`create`**:  Course creation page.\n    * **`dashboard`**:  User dashboard.\n    * **`layout.js`**: Main application layout.\n    * **`page.js`**: Main landing page (optional).\n    * **`provider.js`**:  Clerk user provider and setup.\n* **`configs`**: Configuration files:\n    * **`AiModel.js`**: Configuration for Google Gemini AI models and prompts.\n    * **`db.js`**: Database connection setup with Drizzle ORM.\n    * **`schema.js`**: Database schema definition using Drizzle ORM.\n* **`inngest`**: Inngest functions for background tasks:\n    * **`client.js`**: Inngest client setup.\n    * **`functions.js`**: Definitions for all Inngest functions.\n* **`public`**: Static assets (images, icons, etc.).\n* **`styles`**: Global stylesheets.\n\n\n## API Routes\n\n* **`/api/courses`**:  Handles fetching courses (`GET`) based on `courseId` (for individual course retrieval) or `createdBy` (for user's course list).  Also handles new course creation (`POST`) initiated by the create course page.\n* **`/api/create-user`**:  An API endpoint called by the `CreateNewUser` Inngest function to create a new user record in the database upon initial login with Clerk.\n* **`/api/generate-course-outline`**: Handles the creation of new courses and triggers AI course outline generation.  Receives course details (topic, type, difficulty) via `POST` request.\n* **`/api/study-type`**:  Retrieves study materials for a specific course and study type (`POST`).  Handles \"ALL\" type to fetch all material types at once.\n* **`/api/study-type-content`**:  Triggers the generation of specific study material content (Flashcards, Quiz, Q\u0026A) through Inngest functions, using `chapter` and `type` data sent via `POST`.\n\n\n## Inngest Functions\n\n* **`helloWorld`**: Example/test function (can be removed).\n* **`CreateNewUser`**: Called on user creation event; creates a new user record in the database if one doesn't exist, syncing with Clerk.\n* **`GenerateNotes`**:  Triggered by `/api/generate-course-outline`; generates detailed chapter notes using the AI and updates the course status in the database.\n* **`GenerateStudyTypeContent`**:  Triggered by `/api/study-type-content`; generates content for specific study material types (flashcards, quizzes, Q\u0026A) using the configured AI models.  Updates the status of the generated content in the database.\n\n\n## Contributing\n\nContributions are welcome!  Please follow these guidelines:\n\n* Fork the repository.\n* Create a new branch for your feature/fix.\n* Commit your changes.\n* Push your branch to your fork.\n* Open a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanavalan2517%2Fai-lms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanavalan2517%2Fai-lms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanavalan2517%2Fai-lms/lists"}