Welcome to the Socratic Learn application! This repository contains the main source code for an automated teaching system powered by large language models (LLM). Socratic Learn utilizes curated lessons to foster high-quality interactions between students and instructors.
Before you begin, ensure you have Node.js installed on your machine.
Lesson data is loaded from the data folder. You can clone the lesson data repository using:
git clone git@github.com:Socratic-Learn/data.gitFeel free to create lessons from scratch! To understand the syntax and formatting of lessons, study the structure of the data repository.
Lessons are essentially markdown files with a YAML header, similar to Quarto and other markdown-based tools. To include images, place them in the assets/images directory relative to index.md.
The lesson title is derived from the folder name containing index.md. You can also add prefixes like 00_, 01_, etc., to configure the order in which lessons are displayed within a given folder.
Install all the dependencies using
npm installTo start the development server, run:
npm run devThen, open http://localhost:3006 in your browser to see the application in action.
To utilize the chat functionality of this project, you need to specify several API keys for accessing remote LLM providers. All of these providers offer free access.
You will need to set the following environment variables:
| Environment Variable | Provider |
|---|---|
GEMINI_API_KEY |
Google AI Studio |
CEREBRAS_API_KEY |
Cerebras |
GROQ_API_KEY |
Grok |
The multiple keys are necessary as I am currently evaluating different LLM models and providers. In the future, I plan to add support for local LLMs (e.g., using Ollama). Contributions to implement this feature are welcome!
To create a production build, run:
npm run buildAfter building, start the server in production mode with:
npm run startThis project is built using Next.js. If you have any questions, feel free to reach out via email.
By submitting pull requests to this repository, you assign copyright of your contributions to Danil Platonov. While you retain copyright to your own work, this arrangement facilitates easier adjustments to the project's licensing terms.
Copyright (C) 2025 Danil Platonov
Email: platonov.danil.ivanovich@gmail.com
This work is distributed under the AGPL-3.0 license. Please refer to the LICENSE file for more details.