This project is a Learning Management System (LMS) built using the following technologies:
- Next.js 14: A React framework for building server-side rendered (SSR) and static web applications.
- Gemini API: Used for generating educational content such as multiple-choice questions (MCQs).
- Prisma ORM: An Object-Relational Mapper for managing the database schema and queries.
- MongoDB: A NoSQL database used to store application data.
- Tailwind CSS: A utility-first CSS framework for styling.
- ShadCN UI: A React component library.
- User authentication and authorization.
- Course management (create, read, update, delete).
- Attachment management for course materials.
- Automatic generation of MCQs using Gemini API.
- Display and interaction with generated MCQs.
- Results display for completed MCQs.
- Node.js and npm installed on your machine.
- A MongoDB instance (local or hosted).
- Gemini API key.
-
Clone the repository:
git clone https://github.com/yourusername/lms.git cd lms
-
Install dependencies:
npm install
-
Configure environment variables:
Create a
.env.local
file in the root directory and add the following variables:DATABASE_URL=mongodb://localhost:27017/lms GEMINI_API_KEY=your-gemini-api-key NEXTAUTH_SECRET=your-secret NEXTAUTH_URL=http://localhost:3000
-
Set up the database schema:
npx prisma generate npx prisma migrate dev --name init
-
Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the application.
- Users can sign up and log in to the system.
- Authentication is handled using Clerk.
- Admin users can create, edit, and delete courses.
- Each course can have attachments (e.g., PDFs, videos) associated with it.
- Attachments can be uploaded and associated with specific courses.
- Attachments are stored and retrieved from a specified storage solution.
- Use the
GenerateMCQButton
component to generate MCQs for a course. - MCQs are generated using the Gemini API based on the content of the attachments.
- The MCQs are displayed to the user.
- Tailwind CSS is used for styling the application.
- ShadCN UI components are used for consistent and reusable UI elements.
lms/
βββ components/ # React components
βββ app/ # Next.js app routing
β βββ api/ # API routes
β βββ auth/ # Authentication pages
β βββ courses/ # Course management pages
β βββ ... # Other pages
βββ prisma/ # Prisma schema and migrations
βββ public/ # Public assets
βββ styles/ # Global styles
βββ utils/ # Utility functions
βββ .env.local # Environment variables
βββ ... # Other configuration files
We welcome contributions to this project! If you have suggestions or find bugs, please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the contributors of Next.js, Prisma, MongoDB, Tailwind CSS, and ShadCN UI.
- Special thanks to the team behind the Gemini API.