FastPPT is an AI lesson-prep system for teachers:
upload materials -> chat for teaching intent -> generate slides_json + PPTX + DOCX -> preview/download -> revise PPT
This repository is prepared for contest demo stability first.
Use demo profile before running:
cp backend/.env.demo backend/.env
cp docker/.env.demo docker/.envDemo profile guarantees:
CONTEST_FORCE_PLAIN=true(hard-disable agent path for contest demo)ENABLE_AGENT=false(agent path disabled by default)REDIS_URL=(Redis optional, not required for demo)RAGFLOW_*empty by default
Check runtime mode:
curl http://localhost:8000/healthExpected key fields in demo mode:
chat_mode: plainagent_enabled: falsecontest_force_plain: trueredis: skippeddemo_mode: true
- Multi-file upload: PDF/DOCX/PPTX/TXT + image + video
- Intent chat: collect topic/goal/audience/difficulty/key points/duration/style
- Generation:
slides_jsonfor frontend preview/edit- real
PPTXexport DOCXlesson plan export
- Mode A minimal support:
- if old PPT is uploaded, preserve reference outline order during generation
- Per-page evidence:
- each generated page contains
evidence[]from uploaded knowledge chunks
- each generated page contains
- Revision:
/api/generate/revisesupports page-level updates and re-exports PPTX
docker compose -f docker/docker-compose.yml up --build- Frontend:
http://localhost:5173 - Backend:
http://localhost:8000 - API docs:
http://localhost:8000/docs
Redis is optional in contest mode. If you explicitly need agent runtime, start with:
docker compose -f docker/docker-compose.yml --profile agent up --buildBackend:
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8000Frontend:
cd frontend
npm install
npm run dev- Upload material:
curl -X POST http://localhost:8000/api/upload -F "file=@example.pdf"- Chat for intent:
curl -X POST http://localhost:8000/api/chat \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"我要一节光合作用课程"}],"stream":false,"use_agent":false}'- Generate:
curl -X POST http://localhost:8000/api/generate \
-H "Content-Type: application/json" \
-d '{"intent":{"topic":"光合作用","teaching_goal":"理解并应用","audience":"高中生","difficulty_focus":"重点难点","key_points":["过程","影响因素"],"duration":"45分钟","style":"结构化讲解"},"file_ids":[]}'- Revise:
curl -X POST http://localhost:8000/api/generate/revise \
-H "Content-Type: application/json" \
-d '{"intent":{"topic":"光合作用"},"slides_json":{"theme":{},"pages":[{"type":"content","title":"示例","bullets":["a"]}]},"instruction":"第1页增加互动题","page_indexes":[1]}'Backend critical tests:
python -m pytest -q backendFrontend build:
cd frontend
npm run buildbackend/
api/ # upload/chat/generate/download
core/ # llm/rag/parser/ppt/doc/evidence
frontend/
src/
components/
docker/
docs/
- Advanced agent path is kept as optional mode and is not the default contest path.
- If you intentionally enable agent mode, configure Redis and related dependencies first.