How teeraphat66050204/special-problem-fullstack works
This is Phase 1 of a PDF-to-Wiki backend: it defines document, wiki-version, and chunk schemas, plus a standalone digital-PDF text extractor. The intended user flow is upload and preserve a PDF, extract page-aware text, persist document metadata, then generate, review, publish, chunk, and eventually embed/search the wiki. Only the schema and extractor are implemented here; later workflow stages are documented handoffs, not inspected runtime components.
Main entry points: entities.py Document metadata · pdf_extractor.py PDF text extractor
Components 12
PDF intake
- Upload endpoint
- Original PDF
- PDF text extractor
app/services/pdf_extractor.py - Document metadata
app/models/entities.py
Wiki content
- Wiki generator
- Review and publish
- Versioned WikiPage
app/models/entities.py
Retrieval handoff
- Chunking
- Provenance chunks
app/models/entities.py - Embedding handoff
- Semantic search
Other components
- Uploader
Connections 15
- Uploader → Upload endpoint: submits PDF
README.md - Upload endpoint → Original PDF: saves original
README.md - Upload endpoint → PDF text extractor: calls extractor
README.md - PDF text extractor → Document metadata: returns text
README.md - Upload endpoint → Document metadata: persists metadata
README.md - Document metadata → Wiki generator: feeds generation
README.md - Wiki generator → Review and publish: generates draft
README.md - Review and publish → Versioned WikiPage: stores versions
README.md - Versioned WikiPage → Chunking: feeds chunking
README.md - Chunking → Provenance chunks: creates chunks
README.md - Provenance chunks → Embedding handoff: feeds embeddings
README.md - Embedding handoff → Semantic search: enables retrieval
README.md - Document metadata → Versioned WikiPage: owns versions
app/models/entities.py - Document metadata → Provenance chunks: owns chunks
app/models/entities.py - Versioned WikiPage → Provenance chunks: may scope chunks
app/models/entities.py