How alesimattia/prog_avanzata works
Key Components to Include:
Client Layer
• Postman/API clients making HTTP requests
• JWT authentication flow
API Layer
• Express.js server (port 8080)
• Routes (/budget, /dataset, /upload, /process, /status)
• Middleware chain:
• Authorization middleware
• File upload middleware
• Python adapter middleware
Application Layer
• Controllers:
• AdminController
• UserController
• Models:
• Users
• Datasets
• Files
• BullMQ Queue System for processing tasks
Storage Layer
• PostgreSQL Database (port 5432)
• Redis Cache (port 6379)
• File System Storage for images/datasets
Processing Layer
• Python SAM Model service
• Image processing pipeline
• [Client Layer]
• ↓
• [API Layer]
• ↓
• [Application Layer]
• ↓
• [Storage/Processing Layer]
Connection types
• Double lines: Data persistence
Specific technical details
• Port numbers
• Database tables
• Queue names
• File storage paths
Authentication Flow
• JWT token validation
• Role-based access (Admin vs User)
Dataset Management
• Image/ZIP upload process
• Dataset CRUD operations
• Storage interaction
Processing Pipeline
• Task queue management
• Python SAM model interaction
• Result storage and retrieval
Data Flow
• Client request handling
• Middleware processing
• Controller logic
• Model interactions
• Storage operations
Special Considerations:
MVC pattern implementation
• Model: Database.ts and related models
• View: API responses
• Controller: AdminController and UserController
Demonstrate the Python integration through the adapter pattern
Remember to include Docker container boundaries since the application is containerized, showing how different services interact within the Docker network.
This system design should effectively communicate both the high-level architecture and the important implementation details of this neural network dataset processing system.