How kezakage/pfe-help works
PatrimoineHub appears to be a collaborative heritage platform: users explore Algerian heritage resources, authenticate, and work on projects with media, annotations, discussions, and exports. The frontend routes public and authenticated experiences; its API client connects those experiences to a Django backend. Chatbot retrieval and asynchronous media/export processing are distinct supporting workflows. The README provides no architecture detail, and many backend views and frontend pages were not sampled, so links between those unsampled implementations are omitted rather than inferred.
Main entry points: App.jsx Application routes · NotificationsContext.jsx Notification state · retriever.py Chunk retrieval · pdf.py PDF builder
Components 27
Web client
- Application routes
frontend/src/App.jsx - Heritage search
frontend/src/pages/app/AdvancedSearch.jsx - Project workspace
frontend/src/pages/app/ProjectWorkspace.jsx - Auto annotation
frontend/src/pages/app/AutoAnnotation.jsx - Chatbot interface
frontend/src/pages/app/Chatbot.jsx - Export center
frontend/src/pages/app/ExportCenter.jsx - API client
frontend/src/lib/api.js
Identity and updates
- Authentication state
frontend/src/context/AuthContext.jsx - Accounts
backend/apps/accounts - Notification state
frontend/src/context/NotificationsContext.jsx - Notifications
backend/apps/notifications
Heritage collaboration
- Heritage projects
backend/apps/heritage/views.py - Heritage records
backend/apps/heritage/models.py - Project pages
backend/apps/pages - Discussions
backend/apps/discussions
AI assistance
- RAG service
backend/apps/chatbot/services/rag.py - Chunk retrieval
backend/apps/chatbot/services/retriever.py - Knowledge chunks
backend/apps/chatbot/models.py - Embedding service
backend/apps/chatbot/services/embeddings.py
Media and exports
- Media annotation UI
frontend/src/components/MediaAnnotator.jsx - Media records
backend/apps/media/models.py - Media processing
backend/apps/media/tasks.py - CLIP classifier
backend/apps/media/services/clip_classifier.py - Export jobs
backend/apps/exports/tasks.py - Export records
backend/apps/exports/models.py - PDF builder
backend/apps/exports/services/pdf.py
Other components
- Visitor or researcher
Connections 20
- Visitor or researcher → Application routes: uses
frontend/src/App.jsx - Application routes → Heritage search: routes to
frontend/src/App.jsx - Application routes → Project workspace: routes to
frontend/src/App.jsx - Application routes → Auto annotation: routes to
frontend/src/App.jsx - Application routes → Chatbot interface: routes to
frontend/src/App.jsx - Application routes → Export center: routes to
frontend/src/App.jsx - Heritage search → API client: queries
frontend/src/pages/app/AdvancedSearch.jsx - Authentication state → API client: authenticates through
frontend/src/context/AuthContext.jsx - Notification state → API client: loads notifications
frontend/src/context/NotificationsContext.jsx - Notification state → Notifications: opens socket
frontend/src/context/NotificationsContext.jsx - Notification state → Authentication state: reads user
frontend/src/context/NotificationsContext.jsx - RAG service → Chunk retrieval: retrieves chunks
backend/apps/chatbot/services/rag.py - Chunk retrieval → Knowledge chunks: queries
backend/apps/chatbot/services/retriever.py - Chunk retrieval → Embedding service: embeds query
backend/apps/chatbot/services/retriever.py - Media processing → Media records: loads and updates
backend/apps/media/tasks.py - Media processing → CLIP classifier: classifies image
backend/apps/media/tasks.py - Export jobs → Export records: loads and updates
backend/apps/exports/tasks.py - Export jobs → PDF builder: builds PDF
backend/apps/exports/tasks.py - PDF builder → Heritage records: reads project resource
backend/apps/exports/services/pdf.py - PDF builder → Media records: reads media
backend/apps/exports/services/pdf.py