Spaces:
Sleeping
Sleeping
| # Multi-User Architecture | |
| Mplus Studio can run in one hosted Docker environment for multiple users, but Kaggle auth must be isolated per user. | |
| ## Services | |
| - App: Angular frontend served by the Node backend. | |
| - PostgreSQL: users, sessions, jobs, ownership, metrics, and audit records. | |
| - MinIO: S3-compatible object storage for uploaded images, generated outputs, and reports. | |
| - Kaggle CLI: executed server-side only, scoped to the current user's auth context. | |
| ## User Flow | |
| Product language should stay simple: | |
| ```text | |
| Productafbeeldingen maken | |
| Inloggen en starten | |
| Je kunt nu productafbeeldingen maken | |
| ``` | |
| The regular user flow should not mention Kaggle, GPU, kernel, notebook, provider, S3, or database. | |
| ## Kaggle Isolation | |
| Each user needs one isolated Kaggle auth context. | |
| For CLI-based auth, use a per-user config directory: | |
| ```text | |
| /app/data/kaggle-sessions/<user-id-or-session-id>/ | |
| ``` | |
| Every Kaggle command for that user must run with: | |
| ```text | |
| KAGGLE_CONFIG_DIR=/app/data/kaggle-sessions/<user-id-or-session-id> | |
| ``` | |
| Never expose Kaggle auth files to the browser. | |
| ## Storage Model | |
| PostgreSQL stores metadata and ownership. MinIO stores binary assets. | |
| Suggested object keys: | |
| ```text | |
| users/<user-id>/jobs/<job-id>/inputs/<file-name> | |
| users/<user-id>/jobs/<job-id>/outputs/generated.png | |
| users/<user-id>/jobs/<job-id>/report/result.md | |
| ``` | |
| ## Next Implementation Step | |
| The current MVP still generates directly from the request payload. The next backend step is to add: | |
| - session/user table; | |
| - job table; | |
| - S3 upload/download helpers; | |
| - async job status endpoint; | |
| - per-user Kaggle config resolution. | |