This is a generative AI tool for teachers and professors.
Usage Dataset [Most Recent 10,000+ Generations]
The stack is based on the AI Getting Started Stack:
- Auth: Clerk
- App logic: Next.js
- LLM orchestration: Langchain.js
- Text model: OpenAI
- Generation history: Upstash
- Deployment: Fly
The following instructions should get you up and running with a fully functional, local deployment of MyLessonPal, ready to generate resources right out the gate.
Fork the repo to your Github account, then run the following command to clone the repo:
git clone git@github.com:[YOUR_GITHUB_ACCOUNT_NAME]/MyLessonPal.git
cd MyLessonPal
npm install
cp .env.local.example .env.local
Secrets mentioned below will need to be copied to .env.local
a. Clerk Secrets
Go to https://dashboard.clerk.com/ -> "Add Application" -> Fill in Application name/select how your users should sign in -> Create Application
Now you should see both NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY on the screen

If you want to text your AI companion in later steps, you should also enable "phone number" under "User & Authentication" -> "Email, Phone, Username" on the left hand side nav:
b. OpenAI API key
Visit https://platform.openai.com/account/api-keys to get your OpenAI API key if you're using OpenAI for your language model.
c. Upstash API key
-
Sign in to Upstash
-
Under "Redis" on the top nav, click on "Create Database"
-
Give it a name, and then select regions and other options based on your preference. Click on "Create"

-
Scroll down to "REST API" section and click on ".env". Now you can copy paste both environment variables to your
.env.local
Now you are ready to test out the app locally! To do this, simply run npm run dev under the project root.
You can connect to the project with your browser typically at http://localhost:3000/.
-
Register an account on fly.io and then install flyctl
-
If you are using Github Codespaces: You will need to install flyctl and authenticate from your codespaces cli by running
fly auth login. -
Run
fly launchunder project root. This will generate afly.tomlthat includes all the configurations you will need -
Run
fly scale memory 512to scale up the fly vm memory for this app. -
Run
fly deploy --ha=falseto deploy the app. The --ha flag makes sure fly only spins up one instance, which is included in the free plan. -
For any other non-localhost environment, the existing Clerk development instance should continue to work. You can upload the secrets to Fly by running
cat .env.local | fly secrets import -
If you are ready to deploy to production, you should create a prod environment under the current Clerk instance. For more details on deploying a production app with Clerk, check out their documentation here. Note that you will likely need to manage your own domain and do domain verification as part of the process.
-
Create a new file
.env.prodlocally and fill in all the production-environment secrets. Remember to updateNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEYby copying secrets from Clerk's production instance -cat .env.prod | fly secrets importto upload secrets.
You can fork this repo, make changes, and create a PR. Add **@bvergara87 as a reviewer.
If you are new to contributing on github, here is a step-by-step guide:
-
Click on
Forkon the top right of this page -
Work on your change and push it to your forked repo. Now when you navigate to the forked repo's UI, you should see something like the following:

-
Click on "Contribute" -> "Open Pull Request".
-
Once you have a PR, you can add reviewers.
Feel free to open feature requests, bug reports etc under Issues.