pnpm install
pnpm dev
pnpm db:push
pnpm tsx cmd/generator/dummy
# or if you're running actual generation
pnpm tsx cmd/generator/<subject_name>/stimuli.ts
pnpm tsx cmd/generator/<subject_name>/mcqs.ts
pnpm tsx cmd/generator/<subject_name>/frqs.tsmake sure you set the required environment variables and follow the steps under "setting up mailgun".
then goto http://localhost:5173 for the ui.
you should use a file called .dev.vars to keep your environment variables.
# .dev.vars
# note: openai and google are mutually exclusive, you cannot specify both api keys at the same time
OPENAI_API_KEY="..."
GOOGLE_API_KEY="..."
# telemetry, to get error logs and other debug info, signup for a free account at honeycomb.io, get an API key and put it here
HONEYCOMB_API_KEY="..."
# for sending verification code emails
MAILGUN_API_KEY="..."
DATABASE_URL="..."
DATABASE_AUTH_TOKEN="..."Note
in projects using vite only VITE_ prefixed environment variables will be exposed by import.meta.env.
dev- run a dev environmenttest- run unit testsdb:generate- generates database sql migrationsdb:push- pushes migrations to a databasetsx- executes a typescript script, usually used to execute scripts undercmd/...
Note
the packages under cmd/generator/ can be executed directly to generate ap test questions and push them to the currently configured database.
Important
do not upgrade @opentelemetry/api from version 1.6.0 (until there is a fix for this).