TutorLoom
The learning platform for companies, colleges and training institutes. Free and open source, with an Enterprise edition.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證assists in formulating the planning for a role 2 exercise.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Role2 Builder is a Next.js frontend (deployed on Vercel at
www.role2builder.org) backed by a FastAPI service
(backend/) reachable at https://api.role2builder.org.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Updated 2026-07-25: the backend no longer runs in its own AWS environment. The dedicated Elastic Beanstalk environment
role2-builder-prodwas terminated for cost consolidation.
The FastAPI backend now runs as a second Docker Compose service on the R2RA
production instance (Elastic Beanstalk environment r2ra-prod, AWS account
885232248320, us-east-1), listening on port 8080 of that instance.
Public entry is unchanged: https://api.role2builder.org is a CloudFront
distribution whose origin now points to
r2ra-prod.eba-yg3nk3rp.us-east-1.elasticbeanstalk.com:8080.
The Next.js frontend on Vercel (www.role2builder.org) is unaffected by this change.
The role2-builder CodePipeline no longer deploys anything. Its final stage
uploads the built bundle (Dockerfile, backend/, requirements.txt) to:
s3://r2ra-artifacts-885232248320/role2-builder/latest.zip
The R2RA repo's build pulls that bundle into its own deploy artifact — see
R2RA's buildspec.yml and deploy/docker-compose.eb.yml.
A push to main (excluding docs/markdown-only changes) deploys with no
manual steps:
.github/workflows/deploy.yml) authenticates to AWS
through GitHub OIDC (IAM role github-actions-start-pipeline — no AWS
keys stored in GitHub) and starts the role2-builder pipeline, which
publishes the bundle to S3.rb-publish-chains-r2ra automatically starts the r2ra pipeline,
which pulls the bundle and deploys to r2ra-prod. Live ~15 minutes
after the push.Ordering only matters if you bypass the automation — a manually started
r2ra run must wait for the role2-builder pipeline to finish first, or
the deploy ships the previous (stale) bundle.
Manual fallback if the workflow is unavailable (run in order, waiting for the first to finish):
aws codepipeline start-pipeline-execution --name role2-builder
aws codepipeline start-pipeline-execution --name r2ra
The Dockerfile builds the FastAPI backend image consumed by the R2RA deploy.
The buildspec.yml artifact selection (Dockerfile, backend/,
requirements.txt) defines the exact bundle shape the R2RA deploy consumes.
⚠️ Runtime contract — do not break these:
- The container must keep serving on port 8000 internally — the R2RA compose file maps
8080 → 8000.- The container receives only
CORS_ORIGINSandGEMINI_API_KEYas environment variables. They are set on ther2ra-prodEB environment, not in this repo.- The container must not assume a
DATABASE_URL. Saved exercises (the/historypage) live in a private S3 bucket instead, viabackend/archive.py:role2-exercises-885232248320(us-east-1; one gzipped JSON per exercise plusindex.json; ~7 MB, well under a cent a month, nothing always-on). The bucket name is a code default (override withEXERCISE_BUCKET, empty = off), so no new env var is needed. Ther2ra-eb-ec2-roleinstance role carries an inline policy,role2-exercises-archive(s3:ListBucketon the bucket,s3:GetObject+s3:PutObjecton its objects). Old Railway rows are loaded withpython scripts/import_exercises.py exercises.json.- Gemini cost guards are built in with safe defaults and need no new env vars. They can optionally be tuned on the EB environment:
MAX_USD_PER_EXERCISE(default 5),MAX_USD_PER_DAY(25, UTC day, then/generate-exercisereturns 429),MAX_CONCURRENT_JOBS(2),MAX_CALLS_PER_CASE(4), and thinking-token capsTHINKING_CASE(1024),THINKING_CONTROLLER(2048),THINKING_REVIEW(1024),THINKING_REVISE(512),THINKING_ORDERS(1024). Spend is estimated from token usage atGEMINI_PRICE_IN_PER_M/GEMINI_PRICE_OUT_PER_M(0.30 / 2.50 USD) and logged per exercise (AI usage for ...) — the in-process meter resets on container restart, so keep a Google Cloud budget alert as the backstop.- Keep
Dockerfile,requirements.txt, and the buildspec's artifact selection (Dockerfile,backend/,requirements.txt) intact — the R2RA deploy consumes exactly that bundle shape.
If the co-hosted setup needs to be rolled back (for reference — not an automated process):
role2-builder application versions.api.role2builder.org CloudFront origin back to that environment.To learn more about Next.js, take a look at the following resources:
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!