How osamahmada2024/neurina works
NeurinaXAI is a FastAPI image-translation and enhancement API with a separate agent-driven reference-selection capability. The primary workflow is an API request routed to image operations, which preprocess, translate or manage images, and use MongoDB and Cloudinary for persistence. Account authentication and public-reference synchronization are additional product stages. The graph includes the documented agent workflow, but its internal workflow wiring is not excerpted; those relationships are omitted rather than inferred.
Main entry points: main.py FastAPI app · controller.py Image controller · user_controller.py Account operations · base.py Image state and storage helpers
Components 24
API and accounts
- FastAPI app
src/main.py - Image routes
src/routes/image/router.py - Image catalog API
src/routes/image/catalog.py - User routes
src/routes/user_route.py - Account operations
src/controllers/user_controller.py - Authentication and email
src/services/auth_service.py
Image workflows
- Image controller
src/controllers/image/controller.py - Face preprocessing
src/controllers/image/preprocessing.py - Style translation
src/controllers/image/translation.py - Image library
src/controllers/image/library.py - Image state and storage helpers
src/controllers/image/base.py
Agent orchestration
- Agent API
src/routes/agent_routes.py - Style-transfer workflow
src/orchestration/workflows - Agent stages
src/orchestration/agents - Agent state
src/schemes/agent_state.py - Ollama client
src/helpers/AgentTools/ollama_client.py
Models and persistence
- MongoDB
src/models/database/database.py - Cloudinary storage
src/services/cloudinary_service.py - Face restoration
src/services/face_restoration_service.py - Model preloader
src/services/model_preloader.py
Other components
- API client
- Cloudinary
- Ollama service
- User
Connections 25
- API client → FastAPI app: sends requests
src/main.py - FastAPI app → Image routes: mounts API
src/main.py - Image routes → Image catalog API: routes requests
src/routes/image/router.py - Image catalog API → Image controller: calls image operations
src/routes/image/catalog.py - Image controller → Face preprocessing: inherits operations
src/controllers/image/controller.py - Image controller → Style translation: inherits operations
src/controllers/image/controller.py - Image controller → Image library: inherits operations
src/controllers/image/controller.py - Image controller → Image state and storage helpers: inherits shared state
src/controllers/image/controller.py - Image state and storage helpers → MongoDB: reads references
src/controllers/image/base.py - Image state and storage helpers → Face restoration: uses postprocessor
src/controllers/image/base.py - FastAPI app → MongoDB: initializes database
src/main.py - FastAPI app → Model preloader: loads models
src/main.py - FastAPI app → Cloudinary storage: initializes service
src/main.py - Cloudinary storage → Cloudinary: uploads images
- User → User routes: uses account API
- User routes → Account operations: dispatches account actions
- Account operations → MongoDB: reads and writes users
src/controllers/user_controller.py - Account operations → Authentication and email: verifies credentials
src/controllers/user_controller.py - Account operations → Cloudinary storage: uploads profile pictures
src/controllers/user_controller.py - FastAPI app → Agent API: mounts API
- Agent API → Style-transfer workflow: starts workflow
- Style-transfer workflow → Agent stages: dispatches stages
- Agent stages → Agent state: uses shared state
src/orchestration/agents/base_agent.py - Agent stages → Ollama client: requests generation
src/orchestration/agents/query_agent.py - Ollama client → Ollama service: sends prompts
src/helpers/AgentTools/ollama_client.py