/E-Learn

Learning Management System

Primary LanguageTypeScript

Here's the updated README to reflect the use of PostgreSQL and Prisma:


Learning Management System

This is a Learning Management System built with Next.js, providing separate portals for students and teachers. Teachers can add courses and upload materials related to the chapters they teach. Students can access courses and related materials.

Table of Contents

Features

  • Teacher Portal:

    • Add and manage courses.
    • Upload materials for each chapter.
    • Track student progress and performance.
  • Student Portal:

    • Browse available courses.
    • Access course materials.
    • Submit assignments and track progress.

Tech Stack

  • Frontend: Next.js, React
  • Backend: Next.js API Routes
  • Database: PostgreSQL
  • ORM: Prisma
  • Authentication: NextAuth.js (or any preferred authentication library)
  • Styling: CSS Modules, Tailwind CSS (or any preferred styling framework)

Getting Started

To get a local copy of the project up and running, follow these steps.

Prerequisites

  • Node.js (v14 or later)
  • npm or yarn
  • PostgreSQL

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/lms-nextjs.git
    cd lms-nextjs
  2. Install dependencies:

    Using npm:

    npm install

    Using yarn:

    yarn install
  3. Setup PostgreSQL Database:

    Create a new PostgreSQL database and note the connection details.

  4. Environment Variables:

    Create a .env.local file in the root directory and add the following variables:

    DATABASE_URL=postgresql://username:password@localhost:5432/your_database
    NEXTAUTH_SECRET=your_secret_key
    
  5. Prisma Setup:

    Run Prisma commands to generate client and apply migrations:

    npx prisma generate
    npx prisma migrate dev --name init
  6. Run the application:

    Using npm:

    npm run dev

    Using yarn:

    yarn dev

    Open http://localhost:3000 in your browser to see the application.

Project Structure

/lms-nextjs
├── /components    # Reusable React components
├── /pages         # Next.js pages
│   ├── /api       # API routes
│   ├── /students  # Student portal pages
│   └── /teachers  # Teacher portal pages
├── /prisma        # Prisma schema and migrations
├── /public        # Public assets
├── /styles        # Styling files
└── /utils         # Utility functions and helpers

Usage

  • Teacher Portal:

    • Log in to access the teacher dashboard.
    • Create and manage courses and materials.
  • Student Portal:

    • Log in to view available courses.
    • Access course materials and submit assignments.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any feature or bug fix.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/NewFeature)
  3. Commit your Changes (git commit -m 'Add some NewFeature')
  4. Push to the Branch (git push origin feature/NewFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License. See the LICENSE file for details.


Feel free to customize this further according to your project's specifics!