Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 145 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,145 @@
# lms
Community-Driven LMS built on T3 Stack
# LMS Project

An open-source, modern Learning Management System (LMS) designed to be self-hosted or deployed to cloud services with no modifications.

## Key Features

- **User Management with RBAC**
- Administrator, Teacher, Parent, and Student roles
- Granular access control
- Special access flags

- **Comprehensive Learning Pathways**
- Create structured learning journeys with multiple courses
- Track pathway progress for students
- Manage pathways with an intuitive UI

- **Course & Module Management**
- Create and manage courses with attached modules
- Weighted grading system
- Support for various content types (assessments, assignments, videos)
- Interactive AI-powered lessons

- **Assessment & Grading**
- Create tests, quizzes, and assignments
- Automatic and manual grading options
- Performance insights and analytics
- Exportable grade reports

- **AI-Powered Learning Assistant**
- School-controlled AI chat bot for tutoring
- Logged interactions for oversight
- Support for both remote and local AI models

- **Reporting & Analytics**
- Insights into student performance and engagement
- Course completion/failure rates
- Customizable dashboards

## Tech Stack

- **Frontend**: [NextJS (App Router)](https://nextjs.org/docs), [ShadCN](https://ui.shadcn.com/docs/), [TailwindCSS](https://tailwindcss.com/)
- **Backend**: [tRPC](https://trpc.io/), [Prisma](https://www.prisma.io/), [NextAuth.JS](http://NextAuth.JS)
- **Database**: [PostgreSQL (CockroachDB)](https://www.cockroachlabs.com/)
- **Infrastructure**: [Docker](https://www.docker.com/), [Ansible](https://docs.ansible.com/), [LXC](https://linuxcontainers.org/)
- **Testing**: [Cypress](https://www.cypress.io/)
- **Type Safety**: [TypeScript](https://www.typescriptlang.org/), [Zod](https://zod.dev/)

# Prerequisites
To make use of this repository, we recommend you have the following pre-installed on your **Windows WSL 2 or Linux based development Environment**.

Guides are listed below on official documentation to guide you through the most up-to-date installation:

- [WSL 2 & Ubuntu (Official Ubuntu Documentation)](https://documentation.ubuntu.com/wsl/stable/howto/install-ubuntu-wsl2/)
- [Docker Desktop (Enable the WSL 2 Engine in settings post-install)](https://www.docker.com/products/docker-desktop/)
- [NodeJS (22.16.0 LTS, installed on WSL)](https://nodejs.org/en/download)

# Development Environment Setup

```bash
# Clone the repository
git clone git@github.com:self-taught-software-developers/lms.git

# Checkout to the web app and install
cd web-application
npm install

# Create a .env file with CockroachDB connection details
cat > .env << EOL
# Environment variables for Prisma
DATABASE_URL="postgresql://root@localhost:26257/lms?sslmode=disable"

# Next Auth
NEXTAUTH_SECRET="your-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"
EOL

# Start CockroachDB and Keycloak
docker-compose up -d
# Apply the database schema
npx prisma db push

# Run the development server
npm run dev
```

## Default Logins for Development

### CockroachDB
- Username: root
- Password: (none)
- Admin UI: http://localhost:8080
- Connection string: postgresql://root@localhost:26257/lms?sslmode=disable

### Keycloak
- Username: admin
- Password: admin
- Admin UI: http://localhost:8081

# Project Scope

All details related to project scope can be found in the [Google Docs](https://docs.google.com/document/d/1Gw8n6seCFe3vWQk9iShwyRD_7ShJcKR0nKDFUWrWgpk/edit?usp=sharing).

# Contribution Guidelines

## Reporting Issues

Please use the GitHub issue tracker to report bugs or suggest features. When reporting issues:

1. Use the provided issue template
2. Describe the issue in detail, including steps to reproduce
3. Include relevant error messages and logs
4. Specify your environment (browser, OS, Node.js version)

## Code Contribution

1. Fork the repository and create a new branch for your feature
2. Follow the existing code style and conventions
3. Write meaningful commit messages
4. Add tests for new features
5. Update documentation as needed
6. Submit a pull request with a clear description of your changes

## Pull Request Process

1. Ensure your PR addresses an existing issue or clearly describes the problem
2. Include screenshots or examples for UI changes
3. Make sure all tests pass
4. Request review from at least one maintainer
5. Be open to feedback and be prepared to make requested changes

## Community Guidelines

As a community of self-taught developers:

- Be respectful and inclusive in all communications
- Help each other learn and grow through constructive feedback
- Document your code and contributions to help others understand
- Share knowledge freely and celebrate each other's successes
- Remember that everyone is at different stages in their learning journey

We value contributions from developers of all skill levels. Don't hesitate to ask questions if you're unsure about anything!

# Licensing

[MIT License](https://www.tldrlegal.com/license/mit-license)
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
cockroachdb:
image: cockroachdb/cockroach-unstable:v24.1.0-rc.2-fips
container_name: cockroachdb-lms
hostname: cockroachdb
ports:
- 26257:26257
- 8080:8080
volumes:
- cockroachdb-data:/cockroach/cockroach-data
command: start-single-node --insecure --http-addr=0.0.0.0:8080

keycloak:
image: quay.io/keycloak/keycloak:26.2.5
container_name: keycloak-lms
ports:
- 8081:8080
environment:
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
command: start-dev

volumes:
cockroachdb-data:
24 changes: 24 additions & 0 deletions web-application/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.

# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.

# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Next Auth
# You can generate a new secret on the command line with:
# npx auth secret
# https://next-auth.js.org/configuration/options#secret
AUTH_SECRET=""

# Next Auth Discord Provider
AUTH_DISCORD_ID=""
AUTH_DISCORD_SECRET=""

# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL=""
38 changes: 38 additions & 0 deletions web-application/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a bug report to help us resolve the bugs
title: '🐛[BUG]'
labels: 'bug'
assignees: 'logan,jay'

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions web-application/.github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an interesting feature idea for this project
title: '💡[FEATURE]'
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions web-application/.github/ISSUE_TEMPLATE/other_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Other
about: Issues that are not categorized yet
title: "⚡[Other]"
labels: 'Other'
assignees: ''

---

Give a description of the problem/anything that you need to inform us.
46 changes: 46 additions & 0 deletions web-application/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal
db.sqlite

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo

# idea files
.idea
29 changes: 29 additions & 0 deletions web-application/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Create T3 App

This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.

## What's next? How do I make an app with this?

We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.

If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help.

- [Next.js](https://nextjs.org)
- [NextAuth.js](https://next-auth.js.org)
- [Prisma](https://prisma.io)
- [Drizzle](https://orm.drizzle.team)
- [Tailwind CSS](https://tailwindcss.com)
- [tRPC](https://trpc.io)

## Learn More

To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:

- [Documentation](https://create.t3.gg/)
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials

You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!

## How do I deploy this?

Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel), [Netlify](https://create.t3.gg/en/deployment/netlify) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.
21 changes: 21 additions & 0 deletions web-application/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/styles/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "~/components",
"utils": "~/lib/utils",
"ui": "~/components/ui",
"lib": "~/lib",
"hooks": "~/hooks"
},
"iconLibrary": "lucide"
}
Loading