Here's the updated README to reflect the use of PostgreSQL and Prisma:
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.
-
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.
- 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)
To get a local copy of the project up and running, follow these steps.
- Node.js (v14 or later)
- npm or yarn
- PostgreSQL
-
Clone the repository:
git clone https://github.com/yourusername/lms-nextjs.git cd lms-nextjs
-
Install dependencies:
Using npm:
npm install
Using yarn:
yarn install
-
Setup PostgreSQL Database:
Create a new PostgreSQL database and note the connection details.
-
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
-
Prisma Setup:
Run Prisma commands to generate client and apply migrations:
npx prisma generate npx prisma migrate dev --name init
-
Run the application:
Using npm:
npm run dev
Using yarn:
yarn dev
Open http://localhost:3000 in your browser to see the application.
/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
-
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.
Contributions are welcome! Please fork the repository and submit a pull request for any feature or bug fix.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/NewFeature
) - Commit your Changes (
git commit -m 'Add some NewFeature'
) - Push to the Branch (
git push origin feature/NewFeature
) - Open a Pull Request
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!