App with a login page
This commit is contained in:
99
Readme.md
99
Readme.md
@@ -348,14 +348,6 @@ class ProcessingJob(BaseModel):
|
||||
- **Rationale**: Full compatibility with Celery workers and simplified workflow
|
||||
- **Implementation**: All repositories and services operate synchronously for seamless integration
|
||||
|
||||
### Implementation Status
|
||||
|
||||
1. ✅ Pydantic models for MongoDB collections
|
||||
2. ✅ Repository layer for data access (files + processing_jobs + users + documents) - synchronous
|
||||
3. ✅ Service layer for business logic (auth, user, document, job) - synchronous
|
||||
4. ✅ Celery tasks for document processing
|
||||
5. ✅ Watchdog file monitoring implementation
|
||||
6. ✅ FastAPI integration and startup coordination
|
||||
|
||||
## Job Management Layer
|
||||
|
||||
@@ -493,15 +485,88 @@ src/file-processor/app/
|
||||
|
||||
### Next Implementation Steps
|
||||
|
||||
1. **TODO**: Complete file processing pipeline =>
|
||||
1. ✅ Create Pydantic models for files and processing_jobs collections
|
||||
2. ✅ Implement repository layer for file and processing job data access (synchronous)
|
||||
3. ✅ Implement service layer for business logic (synchronous)
|
||||
4. ✅ Create Celery tasks for document processing (.txt, .pdf, .docx)
|
||||
5. ✅ Implement Watchdog file monitoring with dedicated observer
|
||||
6. ✅ Integrate file watcher with FastAPI startup
|
||||
2. Create protected API routes for user management
|
||||
3. Build React monitoring interface with authentication
|
||||
1. Build React Login Page
|
||||
2. Build React Registration Page
|
||||
3. Build React Default Dashboard
|
||||
4. Build React User Management Pages
|
||||
|
||||
#### Validated Folders and files
|
||||
```
|
||||
src/frontend/src/
|
||||
├── components/
|
||||
│ ├── auth/
|
||||
│ │ ├── LoginForm.jsx # Composant formulaire de login => Done
|
||||
│ │ └── AuthLayout.jsx # Layout pour les pages d'auth => Done
|
||||
│ └── common/
|
||||
│ ├── Header.jsx # Header commun => TODO
|
||||
│ ├── Layout.jsx # Header commun => TODO
|
||||
│ └── ProtectedRoutes.jsx # Done
|
||||
├── contexts/
|
||||
│ └── AuthContext.jsx # Done
|
||||
├── pages/
|
||||
│ ├── LoginPage.jsx # Page complète de login => Done
|
||||
│ └── DashboardPage.jsx # Page tableau de bord (exemple) => TODO
|
||||
├── services/
|
||||
│ └── authService.js # Service API pour auth => Done
|
||||
├── hooks/
|
||||
│ └── useAuth.js # Hook React pour gestion auth => TODO
|
||||
├── utils/
|
||||
│ └── api.js # Configuration axios/fetch => Done
|
||||
├── App.jsx # Needs to be updated => TODO
|
||||
```
|
||||
#### Choices already made
|
||||
* Pour la gestion des requêtes API et de l'état d'authentification, je propose
|
||||
* axios (plus de fonctionnalités) :
|
||||
* Installation d'axios pour les requêtes HTTP
|
||||
* Intercepteurs pour gestion automatique du token
|
||||
* Gestion d'erreurs centralisée
|
||||
* Pour la gestion de l'état d'authentification et la navigation : Option A + C en même temps
|
||||
* Option A - Context React + React Router :
|
||||
* React Context pour l'état global d'auth (user, token, isAuthenticated)
|
||||
* React Router pour la navigation entre pages
|
||||
* Routes protégées automatiques
|
||||
* Option C - Context + localStorage pour persistance :
|
||||
* Token sauvegardé en localStorage pour rester connecté
|
||||
* Context qui se recharge au démarrage de l'app
|
||||
* CSS : Utilisation de daisyUI
|
||||
|
||||
#### Package.json
|
||||
```
|
||||
{
|
||||
"name": "frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/vite": "^4.1.13",
|
||||
"axios": "^1.12.2",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"react-router-dom": "^7.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.33.0",
|
||||
"@types/react": "^19.1.10",
|
||||
"@types/react-dom": "^19.1.7",
|
||||
"@vitejs/plugin-react": "^5.0.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"daisyui": "^5.1.23",
|
||||
"eslint": "^9.33.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.3.0",
|
||||
"postcss": "^8.5.6",
|
||||
"tailwindcss": "^4.1.13",
|
||||
"vite": "^7.1.2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Annexes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user