Skip to content

Commit 6b7a80e

Browse files
committed
- prettier ignored k8s yaml files that have template spots for config
- removed unused svg from public - added assets, sql set up script + more readme changes
1 parent dfb6875 commit 6b7a80e

File tree

7 files changed

+900
-84
lines changed

7 files changed

+900
-84
lines changed

.github/assets/collab-full.png

-4.74 KB
Loading

.github/assets/example2-full.png

1.17 MB
Loading

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ next-env.d.ts
4343

4444
dist
4545
pnpm-lock.yaml
46+
47+
48+
# ignore k8 files that are templated for keys/configs
49+
k8s/secret.yaml
50+
k8s/config.yaml
51+
k8s/deployment.yaml

README.md

Lines changed: 79 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# ClassroomLM
22

33
![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.
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.
55

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.
6+
???? add more to above about generating material, etc
77

88
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.
99

10+
> ???? 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.
11+
1012
[video walktrhough of everything]
1113

1214
## Features
@@ -19,31 +21,40 @@ Diagram of docs to classes (maybe add it sidebyside to main classroom page scree
1921

2022
### **Classroom-Specific AI Assistants**
2123

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.
24+
Each classroom has access to an LLM assistant that is RAG-enabled, allowing it to be more specific and accurate, while also being more grounded and smarter at retrieving information from the class' resources unlocking greater potential for engaging learning, peer interaction, and more.
2325

2426
#### **Advantages over current user-facing AI assistant systems with use case examples**
2527

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+
**More accurate, specific, and grounded**: The assistant can now operate in niche and specific or even specially created context just for classrooms.
29+
> **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. \
2830
> 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
3231
33-
- Humanities, etc.
32+
**Logistical and practical benefits**: Created knowledge bases are shared across the entire classroom.
33+
34+
> 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.\
35+
\
36+
Implementing this core mechanism now provides a foundation for all the features that could benefit from having shared knowledge bases for subgroups.
37+
38+
**Diverse abilities and potential contexts**: Your imagination is the only limit on what is possible with your RAG-enabled LLM assistant
39+
40+
> We use the existing power of LLMs and bring out their full potential for educators and students.
41+
The assistant can be used to generate exam questions, review material, interrogate the classroom documents, have a discussion about the content, judge and correct your understanding, etc. with many other abilities tested, and many more possible. And again, all of these will be more accurate and specific because of the grounding that comes from the classroom's resource dataset.\
42+
In terms of contexts, ClassroomLM was tested to be useful for subjects ranging from physics, different math topics, computer science, and also the humanities. For something like philosophy or other classes with many readings, ClassroomLM can shine because it's able to synthesize across the many readings, and without each student having to reupload all documents.
43+
44+
3445

3546
<!-- Building conversation context | Continues and LLM triggered with /ask | LLM responds
3647
:-------------------------:|:-------------------------: |:-------------------------:
3748
border: black 2px solid;
38-
![]() | ![]() -->
49+
![]() | ![]()
3950
<!-- <p float="center" align="middle" style="
40-
padding-top: 5px; border-radius: 10px;">
51+
<!-- padding-top: 5px; border-radius: 10px;">
4152
<img src=".github/assets/collab-1.png" style="border-radius: 10px;" width="300" />
4253
<img src=".github/assets/collab-2.png"
4354
style="border-radius: 10px;"
4455
width="335" /> <br>
4556
<img src=".github/assets/collab-3.png" style="border-radius: 10px;" width="700" />
46-
</p> -->
57+
</p> --> -->
4758

4859
### **Collaborative AI Chats**
4960

@@ -55,7 +66,12 @@ Group chat support with other students the AI can participate with full chat con
5566

5667
> 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.
5768
58-
![Collaboration Chat Example](.github/assets/collab-full.png)
69+
![Collaborative Chat Example](.github/assets/collab-full.png)
70+
??? add commentts to this
71+
72+
![Collaborative chat with interactivity](.github/assets/example2-full.png)
73+
??? add commentts to this
74+
5975

6076
## Technical Overview
6177

@@ -76,6 +92,13 @@ Then on the side we have dev stack
7692
- **Database**: Supabase
7793
- **Deployment**: Docker and Kubernetes support
7894

95+
### Repository contents
96+
97+
- `app`: Under the NextJS app router paradigm, everything within this directory matches the structure of the actual routes for the application.
98+
- `shared/components`: Components used multiple times within the app directory, including those from [ShadCN](https://ui.shadcn.com/)
99+
- `shared/lib`: Shared code for Supabase, an abstraction layer for RagFlow, and a React ContextProvider to give user and classroom information to pages
100+
- `shared/utils/supabase`: Used for the creation of different types of clients, typing Supabase calls, and handling middleware. Most code here is sourced from [Supabase's Server-Side Auth for NextJS reference](https://supabase.com/docs/guides/auth/server-side/nextjs?queryGroups=router&router=app).
101+
79102
## Usage
80103

81104
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.
@@ -100,19 +123,45 @@ Otherwise, you can choose to use Supabase's hosted service, which also [has a fr
100123

101124
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)
102125

126+
#### Clone the repository
127+
128+
```bash
129+
git clone https://github.com/TechAtNYU/dev-team-spring-25.git
130+
cd dev-team-spring-25
131+
```
132+
133+
103134
#### Provision Supabase instance
104135

105136
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.
106137

107-
Run the commanmd !!!!! to provision it
108-
109-
### 3. Clone repository and config info
138+
Next, get the *`CONNECTION_STRING`*. You can either use the dashboard and press **Connect** on the top left. Or see the `Accessing Postgres` [section of the self-hosted Supabase docs.](https://supabase.com/docs/guides/self-hosting/docker#accessing-postgres)
110139

140+
If you don't already have it, [get the Postgres CLI.](https://www.postgresql.org/download/)
141+
And finally, run the following command to automatically set up the tables, functions, trigger, realtime functionality, etc. Replace `[CONNECTION_STRING]` with what you determined above.
111142
```bash
112-
git clone https://github.com/TechAtNYU/dev-team-spring-25.git
113-
cd dev-team-spring-25
143+
psql --single-transaction -variable ON_ERROR_STOP=1 --file supabase-setup.sql --dbname [CONNECTION_STRING]
114144
```
115145

146+
#### Set up Supabase Auth with Google OAuth
147+
148+
Follow the [instructions on the Supabase docs to set up Google OAuth](https://supabase.com/docs/guides/auth/social-login/auth-google?queryGroups=platform&platform=web#configuration) since it's required to add users.\
149+
Even if you self-hosted, you can access the Supabase dashboard (exposed at port 8000 by default).
150+
151+
#### Add allowed domains to database
152+
153+
Either by connecting to the database through the `psql` CLI or through the Supabase dashboard (recommended), add.\
154+
Add a domain (or multiple) in the following manner:
155+
156+
| id | domain |
157+
| ----- | ------- |
158+
| 1 | nyu.edu |
159+
160+
**Note**: in the section below, you'll see that you need to add the allowed domains to the `.env` file as well.
161+
162+
163+
### 3. Add config info
164+
116165
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).
117166

118167
Explanation of each variable:
@@ -130,6 +179,8 @@ Explanation of each variable:
130179

131180
### Deployment
132181

182+
This section is for deploying ClassroomLM, scroll down below to see the setup for [Development](#development). Currently, only Kubernetes is supported as a deployment option.
183+
133184
#### Add configuration info to kubernetes files
134185

135186
Put that same information from `.env` into the `k8s/config.yaml` and `k8s/secret.yaml` (the info is split among those two files.)\
@@ -140,7 +191,7 @@ Note: the same info is duplicated because NextJS requires the environment variab
140191
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.
141192

142193
```bash
143-
docker build -f Dockerfile -t [registry host]:[registry port]/classroom-lm/classroom-lm-app:latest .
194+
docker build -f Dockerfile -t [registry host]:[registry port]/classroom-lm/classroom-lm-app:latest .
144195
```
145196

146197
#### Change `k8s/deployment.yaml` and deploy
@@ -149,25 +200,25 @@ Change the **container image** within `k8s/deployment.yaml` to match the image t
149200

150201
Then deploy:
151202

152-
```bash
153-
kubectl apply -f k8s
154-
```
203+
```bash
204+
kubectl apply -f k8s
205+
```
155206

156207
### Development
157208

158209
1. Install dependencies:\
159210
Assuming NPM is installed, we [recommend installing `pnpm`](https://pnpm.io/installation).\
160211
Then, run the following in the root directory:
161212

162-
```bash
163-
pnpm install
164-
```
213+
```bash
214+
pnpm install
215+
```
165216

166217
2. Start the development server:
167218

168-
```bash
169-
pnpm dev
170-
```
219+
```bash
220+
pnpm dev
221+
```
171222

172223
The application will be available at [http://localhost:8080](http://localhost:8080)
173224

@@ -193,14 +244,6 @@ kubectl apply -f k8s
193244
- Git hooks (via Husky) ensure code quality before commits
194245
- Prettier and ESLint maintain consistent code style
195246

196-
## Deployment
197-
198-
The application can be deployed using Docker and Kubernetes. The project includes:
199-
200-
- Dockerfile for containerization
201-
- Kubernetes manifests in the `k8s` directory
202-
- Tekton pipelines for CI/CD
203-
204247
## Credits
205248

206249
ClassroomLM was initially created by the first cohort of [Tech@NYU's](https://techatnyu.org) Dev Team Program in the Spring 2025 semester.

public/cloud.svg

Lines changed: 0 additions & 24 deletions
This file was deleted.

public/cloud2-08.svg

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)