-
Notifications
You must be signed in to change notification settings - Fork 0
How Plexi Works
LazyHuman10 edited this page Apr 14, 2026
·
1 revision
This page explains the project in simple terms. You do not need this page to use Plexi, but it helps contributors understand the system.
Plexi has:
- A student web app.
- A material library.
- An AI search system.
- A gateway that connects the web app, materials, backend, and AI providers.
| Folder / repository | Purpose |
|---|---|
plexi-remake/plexi-web |
React web app used by students. |
plexi-remake/plexi-worker |
Cloudflare Worker API gateway. |
plexi-remake/plexi-api |
FastAPI backend for material retrieval. |
plexi-materials |
Study material catalog and AI index. |
plexi.wiki |
GitHub Wiki guide. |
When a student opens Materials:
- The web app asks for the material list.
- The Worker fetches or returns a cached manifest.
- The web app shows semesters, subjects, material types, and files.
- When a file is opened, the Worker proxies the file so it can be previewed.
When a student asks Chat:
- The web app sends the question, semester, and subject to the Worker.
- The Worker checks rate limits and cache.
- The Worker asks the FastAPI backend for relevant material chunks.
- The backend searches the LlamaIndex vector index.
- The web app builds a prompt using the retrieved chunks.
- The Worker sends the prompt to the selected AI provider using the student's API key.
- The answer streams back to the web app.
plexi-materials contains:
-
manifest.json: the material list used by the app. -
indexed_files.json: a record of files processed into the AI index. -
index/: the vector index used for retrieval.
RAG means Retrieval-Augmented Generation.
In Plexi, that means:
- Retrieve useful text from uploaded materials.
- Give that text to the AI.
- Ask the AI to answer using that text.
This helps reduce generic answers because the AI sees the course material before responding.
The Cloudflare Worker acts as a middle layer.
It helps with:
- Caching material lists.
- Caching repeated retrieval and answer requests.
- Rate limiting.
- Proxying files for preview.
- Calling different AI providers through a common chat-completions style request.
Direct material commits can break the manifest or AI index.
The issue workflow keeps uploads safer:
- Student submits file through an issue.
- Maintainer reviews it.
- Maintainer adds
approved. - Automation updates the material list and AI index together.
This keeps Plexi's library and AI search in sync.