How 2303a52243/smart-document-classification-and-management-system works
Smart Document Classification and Management is a React/FastAPI application for authenticated document vaults. Users register or sign in, upload PDF/DOCX/TXT files, then search, preview, correct, download, and reclassify stored documents; analytics and category management are additional workflows. The documented upload flow extracts and preprocesses text, predicts a calibrated category, and stores document metadata and files. Edges reflect excerpts, SOURCE INDEX references, or README statements; unsampled implementation details are not inferred.
Main entry points: App.jsx Route shell · documents.py Document operations · client.js REST client · connection.py MongoDB collections
Components 24
Web application
- Route shell
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - Upload page
frontend/src/pages/Upload.jsx - Document library
frontend/src/pages/Documents.jsx - Document detail
frontend/src/pages/DocumentDetail.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Category management
frontend/src/pages/Categories.jsx - Analytics view
frontend/src/pages/Analytics.jsx - REST client
frontend/src/api/client.js
API and identity
- FastAPI routes
backend/app/main.py - Account routes
backend/app/api/auth.py - Document operations
backend/app/api/documents.py - Category routes
backend/app/api/categories.py - Analytics routes
backend/app/api/analytics.py - JWT security
backend/app/core/security.py - User dependency
backend/app/core/dependencies.py
Document analysis
- Text extraction
backend/app/nlp/extractor.py - Text preprocessing
backend/app/nlp/preprocessor.py - Calibrated classifier
backend/app/nlp/classifier.py
Storage and records
- File storage
backend/app/services/storage.py - Activity logging
backend/app/services/activity.py - MongoDB collections
backend/app/database/connection.py
Other components
- Vault user
- S3-compatible storage
Connections 36
- Vault user → Route shell: uses
frontend/src/App.jsx - Route shell → Auth context: provides auth
frontend/src/App.jsx - Route shell → Upload page: routes to
frontend/src/App.jsx - Route shell → Document library: routes to
frontend/src/App.jsx - Route shell → Document detail: routes to
frontend/src/App.jsx - Route shell → Dashboard: routes to
frontend/src/App.jsx - Route shell → Category management: routes to
frontend/src/App.jsx - Route shell → Analytics view: routes to
frontend/src/App.jsx - Auth context → REST client: calls auth
frontend/src/context/AuthContext.jsx - Upload page → REST client: calls API
frontend/src/pages/Upload.jsx - Document library → REST client: calls API
frontend/src/pages/Documents.jsx - Document detail → REST client: calls API
frontend/src/pages/DocumentDetail.jsx - Dashboard → REST client: calls API
frontend/src/pages/Dashboard.jsx - Category management → REST client: calls API
frontend/src/pages/Categories.jsx - Analytics view → REST client: calls API
frontend/src/pages/Analytics.jsx - REST client → FastAPI routes: REST requests
frontend/src/api/client.js - FastAPI routes → Account routes: registers routes
backend/app/main.py - FastAPI routes → Document operations: registers routes
backend/app/main.py - FastAPI routes → Analytics routes: registers routes
backend/app/main.py - FastAPI routes → Category routes: registers routes
backend/app/main.py - Account routes → JWT security: uses credentials
backend/app/api/auth.py - Account routes → MongoDB collections: reads/writes users
backend/app/api/auth.py - User dependency → JWT security: validates token
backend/app/core/dependencies.py - User dependency → MongoDB collections: loads user
backend/app/core/dependencies.py - Document operations → User dependency: requires user
backend/app/api/documents.py - Document operations → Text extraction: extracts text
backend/app/api/documents.py - Document operations → Text preprocessing: preprocesses text
backend/app/api/documents.py - Document operations → Calibrated classifier: classifies text
backend/app/api/documents.py - Calibrated classifier → Text preprocessing: cleans text
backend/app/nlp/classifier.py - Document operations → File storage: saves files
backend/app/api/documents.py - Document operations → MongoDB collections: stores records
backend/app/api/documents.py - Document operations → Activity logging: logs actions
backend/app/api/documents.py - Activity logging → MongoDB collections: writes logs
backend/app/services/activity.py - Analytics routes → MongoDB collections: queries records
backend/app/api/analytics.py - Category routes → MongoDB collections: queries categories
backend/app/api/categories.py - File storage → S3-compatible storage: uploads optionally
backend/app/services/storage.py