Skip to content

Commit dfb6875

Browse files
committed
initial readme changes
1 parent d2c26fc commit dfb6875

File tree

3 files changed

+154
-39
lines changed

3 files changed

+154
-39
lines changed

.github/assets/collab-full.png

500 KB
Loading

.github/assets/main-banner.png

450 KB
Loading

README.md

Lines changed: 154 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,73 @@
11
# ClassroomLM
22

3-
An open-source platform that enables students and teachers to interact with classroom materials through Retrieval-Augmented Generation (RAG). Upload documents, chat with course content, and streamline academic Q&A using powerful language models—all in one collaborative interface.
3+
![ClassroomLM Banner](.github/assets/main-banner.png)
4+
ClassroomLM provides each of the many classrooms within an organization a specialized LLM assistant that is specific and accurate to the subject matter and resources of that particular classroom.
45

5-
## Tech Stack
6+
> ???? Makes sense for classrooms in primary education or universities, and even for other adjacent organizations like clubs and student associations that want easy access to giving an AI assistant to their members specific to their documents.
7+
8+
The core feature and main value that ClassroomLM provides is the application's framework of having siloed knowledge bases per classroom to conduct Retrieval Augmented Generation (RAG) on, with the additional features like collaborative chat layered on top of this.
9+
10+
[video walktrhough of everything]
11+
12+
## Features
13+
14+
### **Classroom-Style Structure**
15+
16+
Teachers can create classrooms, upload documents (PDFs, slides, handwritten notes), and invite students.
17+
18+
Diagram of docs to classes (maybe add it sidebyside to main classroom page screenshot?)
19+
20+
### **Classroom-Specific AI Assistants**
21+
22+
Each classroom has access to an LLM assistant that is enabled by RAG, allowing it to be more specific and accurate, while also being better and smarter at retrieving information from the class' resources.
23+
24+
#### **Advantages over current user-facing AI assistant systems with use case examples**
25+
26+
- **More accurate and specific**: can operate in specific or even specially created context just for classrooms.
27+
> **Use case example**: An NYU Professor has a variation of assembly created specifically for the classroom, called e20. Putting the e20 manual into the shared classroom dataset gave all students within this classroom access to an assistant that is now specialized, knowledgeable, and with full context of this niche, not-seen-before language personally created by a professor. \
28+
> Comparing it to existing systems, they gave vague, non-specific, and non-accurate answers relevant to other assembly variants.
29+
- **Logistical and practical benefits**: knowledge bases shared across entire classroom
30+
- Rather than an entire classroom's worth of students across all of their individual classes having to upload their documents individually, keep it up to date with new resources, and separate it from other classes, having a shared (but siloed) knowledge base for an entire classroom reduces the overhead, friction, and allows for superior use of resources.
31+
- \*\*Diverse ability and
32+
33+
- Humanities, etc.
34+
35+
<!-- Building conversation context | Continues and LLM triggered with /ask | LLM responds
36+
:-------------------------:|:-------------------------: |:-------------------------:
37+
border: black 2px solid;
38+
![]() | ![]() -->
39+
<!-- <p float="center" align="middle" style="
40+
padding-top: 5px; border-radius: 10px;">
41+
<img src=".github/assets/collab-1.png" style="border-radius: 10px;" width="300" />
42+
<img src=".github/assets/collab-2.png"
43+
style="border-radius: 10px;"
44+
width="335" /> <br>
45+
<img src=".github/assets/collab-3.png" style="border-radius: 10px;" width="700" />
46+
</p> -->
47+
48+
### **Collaborative AI Chats**
49+
50+
Group chat support with other students the AI can participate with full chat context.
51+
52+
- Students can create multiple chatrooms per classroom and choose who to invite within each chatroom.
53+
- Within the chatroom, students can pull the LLM into the conversation in the manner of a group chat with the **`/ask [message]`** command.
54+
- The assistant in this case retains all the benefits described above for the personal chat, as it is also RAG enabled.
55+
56+
> To be clear, this isn’t the common implementation of a "group chat with an assistant" very often found in company Slacks, etc. where the LLM is just responding to the message that triggered it. In that case, it's only more useful than just doing asking the LLM personally since the answer is visible to everyone. Instead here, when triggered with the `/ask` command the LLM will have knowledge of all the previous conversation and respond accordingly, as if it’s just part of the conversation.
57+
58+
![Collaboration Chat Example](.github/assets/collab-full.png)
59+
60+
## Technical Overview
61+
62+
Diagram showing where evrything is stored
63+
RagFlow has knowkedge bases, stores actual docs
64+
Stores personal chat history
65+
66+
Supabase stores user information, classroom/chatroom metadata, collaborative chat history as realtime database
67+
68+
Node JS Shadcn ui
69+
70+
Then on the side we have dev stack
671

772
- **Framework**: Next.js 15 with App Router
873
- **Language**: TypeScript
@@ -11,53 +76,104 @@ An open-source platform that enables students and teachers to interact with clas
1176
- **Database**: Supabase
1277
- **Deployment**: Docker and Kubernetes support
1378

14-
## Features
79+
## Usage
1580

16-
- **Classroom-Style Structure**
17-
Teachers can create classrooms, upload documents (PDFs, slides, handwritten notes), and invite students.
81+
For both development and deployment, the **instructions below need to be followed** to ensure you have a RagFlow and Supabase instance running. The only difference is that development could mean you can just have local versions of those two things.
1882

19-
- **Classroom-Specific AI Assistants**
20-
Each classroom has its own RAG-based LLM assistant trained on uploaded materials.
83+
### 1. Set up [RagFlow](https://github.com/infiniflow/ragflow)
2184

22-
- **Collaborative AI Chats**
23-
Group chat support where the AI can participate with full chat context.
85+
Follow [the instructions on the Ragflow docs](https://ragflow.io/docs/dev/) to **deploy and configure** it. This includes choosing the LLM to use, with many supported options to choose from.\
86+
Note the deployment method they detail in the docs are with Docker Compose.Alternatively, they also have a [helm chart](https://github.com/infiniflow/ragflow/tree/main/helm) to deploy RagFlow onto a Kubernetes cluster.
2487

88+
> Note: since we're deploying our web app onto port 8080 as per our [Dockerfile](https://github.com/TechAtNYU/dev-team-spring-25/blob/main/Dockerfile), depending on whether or not your RagFlow engine is deployed on the same machine/network as the ClassroomLM application, you should consider changing the port for RagFlow's interface.
89+
> Follow the instructions [here to update the HTTP and HTTPS port](<https://ragflow.io/docs/dev/configurations#:~:text=To%20update%20the%20default%20HTTP%20serving%20port%20(80)%2C>) away from 80 and 443 if you would not like RagFlow's web interface to use them up.
2590
26-
## Prerequisites
91+
#### Create a RagFlow API Key
2792

28-
- Node.js (LTS version)
29-
- pnpm (recommended package manager)
30-
- Docker (for containerized development)
31-
- Kubernetes (for deployment)
93+
Follow the [instructions on the RagFlow docs](https://ragflow.io/docs/dev/acquire_ragflow_api_key) to create an API key.
3294

33-
## Getting Started
95+
### 2. Set up Supabase
3496

35-
1. Clone the repository:
36-
```bash
37-
git clone https://github.com/TechAtNYU/dev-team-spring-25.git
38-
cd dev-team-spring-25
39-
```
97+
[Supabase](https://supabase.com/) can be self-hosted. Most likely, this is the better option since you'll need to host RagFlow somewhere anyway. Follow the [instructions here](https://supabase.com/docs/guides/self-hosting) to see how to self host a Supabase instance using Docker Compose, Kuberenetes, etc.
98+
99+
Otherwise, you can choose to use Supabase's hosted service, which also [has a free tier](https://supabase.com/pricing).
100+
101+
If you're only developing locally, you can take a look at [this section on the Supabase docs.](https://supabase.com/docs/guides/local-development/cli/getting-started?queryGroups=platform&platform=npm#running-supabase-locally)
102+
103+
#### Provision Supabase instance
104+
105+
First, [install the Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started). If you already have the `npm` dependencies installed from the development setup, then you should already have it.
106+
107+
Run the commanmd !!!!! to provision it
108+
109+
### 3. Clone repository and config info
110+
111+
```bash
112+
git clone https://github.com/TechAtNYU/dev-team-spring-25.git
113+
cd dev-team-spring-25
114+
```
115+
116+
Create a `.env` file in the root of the repository based on [`.env.example`](https://github.com/TechAtNYU/dev-team-spring-25/blob/main/.env.example).
117+
118+
Explanation of each variable:
119+
120+
| Env Variable | Description |
121+
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
122+
| NEXT_PUBLIC_SUPABASE_URL | Use either the given URL from the hosted version or a custom URL from your self-hosted solution |
123+
| NEXT_PUBLIC_SUPABASE_ANON_KEY | Should be available somewhere in Supabase's settings |
124+
| NEXT_PUBLIC_SITE_URL | The root URL for the site, to be used for callbacks after authentication |
125+
| NEXT_PUBLIC_ALLOWED_EMAIL_DOMAINS | When users login with Google, these are the only email domains allowed to sign up.&#10;**Note that this is also needs to be configured within Supabase** |
126+
| NEXT_PUBLIC_ORGANIZATION_NAME | The name of the organization |
127+
| SUPABASE_SERVICE_ROLE_KEY | Should be available somewhere in Supabase's settings |
128+
| RAGFLOW_API_KEY | Go back section 2 to make this key |
129+
| RAGFLOW_API_URL | Publicly available hostname to access RagFlow's API |
130+
131+
### Deployment
132+
133+
#### Add configuration info to kubernetes files
134+
135+
Put that same information from `.env` into the `k8s/config.yaml` and `k8s/secret.yaml` (the info is split among those two files.)\
136+
Note: the same info is duplicated because NextJS requires the environment variables at build time too.
137+
138+
#### Build Docker image
139+
140+
Next, we build the image with the following command, with your registry information filled in (or omitted). What's important is that it matches the deployment file later.
141+
142+
```bash
143+
docker build -f Dockerfile -t [registry host]:[registry port]/classroom-lm/classroom-lm-app:latest .
144+
```
145+
146+
#### Change `k8s/deployment.yaml` and deploy
147+
148+
Change the **container image** within `k8s/deployment.yaml` to match the image tag in the previous step.
149+
150+
Then deploy:
151+
152+
```bash
153+
kubectl apply -f k8s
154+
```
155+
156+
### Development
157+
158+
1. Install dependencies:\
159+
Assuming NPM is installed, we [recommend installing `pnpm`](https://pnpm.io/installation).\
160+
Then, run the following in the root directory:
40161

41-
2. Install dependencies:
42162
```bash
43163
pnpm install
44164
```
45165

46-
3. Set up environment variables:
47-
Create a `.env.local` file in the root directory with the necessary environment variables.
48-
```bash
49-
cp .env.example .env
50-
```
51-
and update the appropriate variables
52-
4. Start the development server:
166+
2. Start the development server:
167+
53168
```bash
54169
pnpm dev
55170
```
171+
56172
The application will be available at [http://localhost:8080](http://localhost:8080)
57173

58-
## Available Scripts
174+
#### Available Scripts
59175

60-
- `pnpm dev` - Start development server with Turbopack
176+
- `pnpm dev` - Start development server
61177
- `pnpm build` - Build the application for production
62178
- `pnpm start` - Start the production server
63179
- `pnpm test` - Run tests in watch mode
@@ -77,20 +193,19 @@ An open-source platform that enables students and teachers to interact with clas
77193
- Git hooks (via Husky) ensure code quality before commits
78194
- Prettier and ESLint maintain consistent code style
79195

80-
## Testing
81-
82-
The project uses Vitest for testing with React Testing Library. Tests can be run in watch mode or as a single run. Coverage reports can be generated to ensure comprehensive testing.
83-
84196
## Deployment
85197

86198
The application can be deployed using Docker and Kubernetes. The project includes:
199+
87200
- Dockerfile for containerization
88201
- Kubernetes manifests in the `k8s` directory
89202
- Tekton pipelines for CI/CD
90203

91-
## Contributing
204+
## Credits
205+
206+
ClassroomLM was initially created by the first cohort of [Tech@NYU's](https://techatnyu.org) Dev Team Program in the Spring 2025 semester.
92207

93-
1. Create a new branch for your feature
94-
2. Make your changes
95-
3. Run tests and ensure they pass
96-
4. Submit a pull request
208+
**Tech Lead**: Safi Patel\
209+
**Program manager**: Sanjay Chunduru\
210+
**Developers**: Yixiang Chen, Joseph Cheng, Pranit Singh Gandhi, Xiaomin Liu, Shubham Parab, Emily Silkina, Kavya Srikumar, Austin Tan, Benjamin Tian, Chenxin Yan\
211+
**Product design**: Jennifer Huang, Haley Ngai

0 commit comments

Comments
 (0)