ESP32-S3 Bench Guide
ESP32-S3 N16R8 bench guide: live pinout, lessons, simulators and the bench log.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证AI English Learning Agent - FastAPI backend and Nextjs web app
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Personalized English learning platform for Vietnamese learners, powered by Gemini AI.
Stack: FastAPI · Next.js 16 · PostgreSQL · SQLite (dev) · Zustand · Tailwind-like CSS
AI_English_Learning_Agent/
├── agen-backend/ # FastAPI backend
└── agen-web/ # Next.js 16 frontend
cd agen-backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Mac/Linux
pip install -r requirements.txt
cp .env.example .env # Fill in your API keys
uvicorn main:app --reload --port 8000
API docs: http://localhost:8000/docs
cd agen-web
npm install
# Create .env.local:
echo "NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1" > .env.local
npm run dev
[User] → [Vercel CDN] → [Next.js Frontend]
↓ API calls
[Render.com Web Service]
[FastAPI Backend]
↓
[Render.com PostgreSQL]
Push code to GitHub (ensure agen-backend/ is in your repo)
Create a Render account at https://render.com
New → Blueprint → connect your GitHub repo
agen-backend/render.yamlSet secret environment variables in Render Dashboard:
GEMINI_API_KEY → set this secret directly in Render Environment VariablesOPENAI_API_KEY → your OpenAI key (optional)SECRET_KEY → auto-generated by Render (or set your own)First deploy will:
alembic upgrade head (create all tables)Note your backend URL: https://agen-api.onrender.com
⚠️ Free tier sleeps after 15 min inactivity — first request takes ~30s to wake up. Upgrade to Starter ($7/mo) for always-on.
Create a Vercel account at https://vercel.com
New Project → Import your GitHub repo
agen-webSet environment variable in Vercel Dashboard:
NEXT_PUBLIC_API_URL = https://agen-api.onrender.com/api/v1Click Deploy — Vercel builds and deploys automatically.
Update CORS in Render: set ALLOWED_ORIGINS to your Vercel URL
https://agen-web.vercel.app# Health check
curl https://agen-api.onrender.com/health
# Register test user
curl -X POST https://agen-api.onrender.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"Test1234","full_name":"Test","display_name":"Test"}'
Phần này hướng dẫn dựng một bản pilot chạy local trên giao diện máy tính.
cd agen-backend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
copy .env.example .env # Windows (hoặc: cp .env.example .env)
Người vận hành pilot mở agen-backend/.env và điền tối thiểu:
APP_ENV=development
SECRET_KEY=<chạy: python -c "import secrets; print(secrets.token_hex(32))">
DATABASE_URL=sqlite:///./agen_dev.db
ALLOWED_ORIGINS=http://localhost:3000
GEMINI_API_KEY=<khóa Gemini do người vận hành quản lý>
ADMIN_EMAILS=<email quản trị của bạn> # để truy cập trang /admin
FREE_DAILY_LESSON_LIMIT=3 # bài/ngày cho gói free (0 = không giới hạn)
Khởi động server (KHÔNG dùng --reload khi pilot để tránh vòng lặp reload):
python -m uvicorn main:app --host 0.0.0.0 --port 8000
cd agen-web
npm install
echo NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1 > .env.local
npm run dev
Mở app tại http://localhost:3000
AGEN sinh nội dung bài học bằng AI. Nếu sinh sẵn + duyệt trước, học viên sẽ nhận bài tức thì (không tốn quota, nội dung ổn định). Chạy CLI:
cd agen-backend
# Sinh + tự duyệt toàn bộ nội dung cấp A1 (mỗi bài = 1 lượt gọi AI):
python scripts/pregenerate_content.py --level A1 --auto-approve
# Có thể làm tiếp A2, B1 (tùy quota AI của bạn):
python scripts/pregenerate_content.py --level A2 --auto-approve
python scripts/pregenerate_content.py --level B1 --auto-approve
⚠️ Quota AI: Gemini free tier giới hạn ~20 lượt/ngày. Sinh cả một cấp độ (24 bài) sẽ dùng hết quota trong ngày. Dùng khóa trả phí để sinh toàn bộ một lần, hoặc chia nhiều ngày. Bài chưa sinh sẵn vẫn hoạt động — hệ thống tự sinh live khi học viên mở.
Nếu muốn review thủ công trước khi phát hành: bỏ --auto-approve (nội dung ở trạng
thái draft), rồi vào /admin → tab Kho nội dung để duyệt từng bài.
Trang /admin (giám sát chất lượng AI + quản lý kho nội dung) chỉ mở cho email nằm
trong ADMIN_EMAILS. Đăng ký một tài khoản bằng đúng email đó rồi truy cập /admin.
cd agen-backend
pytest -q
agen-backend/.env)| Variable | Required | Description |
|---|---|---|
APP_ENV | Yes | development or production |
SECRET_KEY | Yes | JWT signing key — use python -c "import secrets; print(secrets.token_hex(32))" |
DATABASE_URL | Yes | PostgreSQL or SQLite URL |
ALLOWED_ORIGINS | Yes | Comma-separated frontend URLs |
GEMINI_API_KEY | Yes* | Google Gemini API key |
OPENAI_API_KEY | No | OpenAI API key (alternative to Gemini) |
ADMIN_EMAILS | No | Comma-separated emails cho phép truy cập /admin (rỗng = không ai) |
FREE_DAILY_LESSON_LIMIT | No | Số bài/ngày cho gói free (mặc định 3; 0 = không giới hạn) |
ACCESS_TOKEN_EXPIRE_MINUTES | No | Default: 1440 (24h) |
*At least one AI key is required.
agen-web/.env.local)| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_API_URL | Yes | Backend API base URL |
# Run on new environment (production)
cd agen-backend
alembic upgrade head
# Create new migration after model changes
alembic revision --autogenerate -m "describe_your_change"
# Check current migration status
alembic current
cd agen-backend
# Build image
docker build -t agen-backend .
# Run with env vars
docker run -p 8000:8000 \
-e DATABASE_URL="sqlite:///./agen_dev.db" \
-e SECRET_KEY="your-dev-key" \
-e GEMINI_API_KEY="your-key" \
-e ALLOWED_ORIGINS="http://localhost:3000" \
agen-backend
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript, Zustand |
| Backend | FastAPI, SQLAlchemy 2, Pydantic v2 |
| Database | PostgreSQL (prod), SQLite (dev) |
| AI | Google Gemini 3.6 Flash / OpenAI GPT-4o-mini |
| Auth | JWT (python-jose), bcrypt |
| Migrations | Alembic |
| Deployment | Render.com (backend), Vercel (frontend) |
| Rate Limiting | slowapi |
Available at /docs (Swagger UI) — only in APP_ENV=development.
Disabled in production for security.