How adil-soudri/plateforme-intelligente-marches-publics works
This is a French-language document-management and question-answering application: users upload documents and ask questions, while administrators manage reference documents and users. The backend indexes uploads and answers questions through hybrid retrieval, context construction, and generation; it also provides authentication, chat history, and document administration. The frontend exposes user and administrator workflows. Some frontend-to-API and indexing internals are not evidenced by the excerpts, so those links are omitted; the indexed RAG service calls are visible, though some of its detailed implementation was not sampled.
Main entry points: main.py FastAPI app · chat_controller.py Chat endpoints · auth_service.py Authentication · rag_service.py RAG orchestration
Components 28
Web application
- User workspace
frontend/app/dashboard/page.tsx - Chat interface
frontend/components/ChatBox.tsx - Chat history
frontend/app/chat/historique/page.tsx - Document admin
frontend/app/admin/documents/page.tsx - User admin
frontend/app/admin/utilisateurs/page.tsx
API and access
- FastAPI app
backend/app/main.py - Chat endpoints
backend/app/controllers/chat_controller.py - Auth endpoints
backend/app/controllers/auth_controller.py - User document API
backend/app/controllers/document_importe_controller.py - Reference document API
backend/app/controllers/document_reference_controller.py - Relational database
backend/app/core/database.py
Identity and accounts
- Token access control
backend/app/core/dependencies.py - Token security
backend/app/core/security.py - Authentication
backend/app/services/auth_service.py - User repository
backend/app/repositories/utilisateur_repository.py - Admin repository
backend/app/repositories/administrateur_repository.py
Document management
- Imported documents
backend/app/services/document_importe_service.py - Reference documents
backend/app/services/document_reference_service.py - Document indexing
backend/app/services/document/document_indexation_service.py
Question answering
- Chat records
backend/app/services/chat_service.py - RAG orchestration
backend/app/services/rag/rag_service.py - Hybrid retrieval
backend/app/services/document/hybrid_search_service.py - Vector retrieval
backend/app/services/document/vector_search_service.py - Text embeddings
backend/app/services/document/embedding_service.py - Context assembly
backend/app/services/rag/context_service.py - Answer generation
backend/app/services/rag/generation_service.py
Other components
- User
- Administrator
Connections 25
- FastAPI app → Chat endpoints: registers routes
backend/app/main.py - FastAPI app → Auth endpoints: registers routes
backend/app/main.py - FastAPI app → User document API: registers routes
backend/app/main.py - FastAPI app → Reference document API: registers routes
backend/app/main.py - Chat endpoints → RAG orchestration: asks questions
backend/app/controllers/chat_controller.py - Chat endpoints → Chat records: saves chat
backend/app/controllers/chat_controller.py - Chat endpoints → Relational database: opens session
backend/app/controllers/chat_controller.py - Auth endpoints → Authentication: delegates login
backend/app/controllers/auth_controller.py - Authentication → User repository: looks up users
backend/app/services/auth_service.py - Authentication → Admin repository: looks up admins
backend/app/services/auth_service.py - Authentication → Token security: verifies and signs
backend/app/services/auth_service.py - Token access control → Token security: decodes token
backend/app/core/dependencies.py - User document API → Imported documents: stores document
backend/app/controllers/document_importe_controller.py - User document API → Document indexing: indexes upload
backend/app/controllers/document_importe_controller.py - Reference document API → Reference documents: stores document
backend/app/controllers/document_reference_controller.py - Reference document API → Document indexing: indexes upload
backend/app/controllers/document_reference_controller.py - RAG orchestration → Hybrid retrieval: retrieves passages
backend/app/services/rag/rag_service.py - RAG orchestration → Context assembly: builds context
backend/app/services/rag/rag_service.py - RAG orchestration → Answer generation: generates answer
backend/app/services/rag/rag_service.py - Hybrid retrieval → Vector retrieval: uses vector search
backend/app/services/document/hybrid_search_service.py - Vector retrieval → Text embeddings: embeds query
backend/app/services/document/vector_search_service.py - User → User workspace
- User → Chat interface
- Administrator → Document admin
- Administrator → User admin