How eight-atulya/eye works
Project Type and Purpose
• This is a full-stack, AI-driven annotation and memory-management platform (“EYE”) with three operating modes (Heavy Load, Light, God Mode).
• The frontend is a Next.js/React web application. The backend is a Python service exposing REST endpoints, integrating AI engines (YOLO-E, Ollama, custom nodes) and CVAT for annotation. An orchestrator dispatches and monitors background jobs.
File Structure Highlights
• frontend/ : Next.js app, pages under src/app, feature folders (annotation, inference, memory, training, eye-ai, YOLO-E, projects, settings).
• backend/ : Python service (main.py), FastAPI-style api/ routes, auth/, schemas/, services/ (CVAT, memory, jobs, queue, Ollama), config, requirements.txt, Dockerfile.
• orchestrator/ : dispatcher.py, scheduler.py, monitor.py, workers/ (redis_worker, yolo_e_worker, simple_worker), Dockerfile.
• engines/ : plugin-style AI engine nodes (base, custom, forge, spectra, ultra, yolo_e).
• storage/ : persistence adapters (S3).
• monitoring/ : Prometheus configuration, custom health exporter, dashboards, alerts.
• config/, k8s/, docker-compose.yml : deployment and environment configuration.
• scripts/ : utilities for setup, tests, weight downloads.
Key Architectural Patterns
• Three-tier/full-stack separation: Frontend ←→ Backend API ←→ Data & AI engines.
• Dispatcher–worker pattern: orchestrator pulls from job queue (Redis?), schedules tasks to workers.
• Plugin engine architecture: engines/ directory implements Strategy pattern for different AI nodes.
• Service layer: backend/services implements integrations (CVAT, Ollama, memory).
• Micro-service-ish components: API server vs. orchestrator vs. monitoring vs. storage adapters.
• Event/message queue: used for inter-component communication (jobs, metrics).
Main Components and Interactions (to illustrate
A. Frontend (Next.js web UI)
• Sends HTTP(S) requests to Backend API
• WebSockets or polling for job/status updates
B. Backend API (FastAPI-style)
• Routes: annotations, jobs, memory, inference, metrics, Ollama, YOLO-E
• Auth service (JWT or session)
• Enqueues tasks in Redis queue
• Reads/writes from storage (S3 adapter) and database (if any)
C. Orchestrator
• Dispatcher: reads queue, assigns tasks to workers
• Scheduler: periodic maintenance or batch tasks
• Monitor: health checks, metrics export
D. Workers
• RedisWorker: general purpose
• YOLO-EWorker: runs YOLO-E inference/training
• SimpleWorker: lightweight jobs
E. Engines (plugin modules loaded by workers)
• BaseNode, CustomNode, ForgeNode, SpectraNode, UltraNode, YoloENode
F. External Services
• CVAT (annotation integration)
• Ollama (LLM inference)
• S3 or other blob storage
• Prometheus/Grafana (monitoring)
G. Configuration & Deployment
• Docker/Docker-Compose
• Kubernetes manifests (k8s/)
• Environment files (env.txt, eye.yaml)
• Makefile/scripts