Backend Services Overview

This section provides detailed documentation for each of Inwire's backend services. Each service handles a specific domain within the ML lifecycle and exposes REST APIs that the frontend and other services consume.


Service Architecture

Inwire follows a microservices architecture where each service is:

Service Communication

┌─────────────────────────────────────────────────────────────────────────────┐
│                              Frontend (Next.js)                              │
└─────────────────────────────────────────────────────────────────────────────┘
                                      │
                                      ▼
┌─────────────────────────────────────────────────────────────────────────────┐
│                              API Gateway                                     │
│                     (Authentication, Routing, Rate Limiting)                 │
└─────────────────────────────────────────────────────────────────────────────┘
         │              │              │              │              │
         ▼              ▼              ▼              ▼              ▼
    ┌─────────┐   ┌─────────┐   ┌─────────┐   ┌─────────┐   ┌─────────┐
    │  Core   │   │ Synthex │   │ Model   │   │ModelOps │   │   RAG   │
    │         │   │         │   │Training │   │         │   │         │
    └─────────┘   └─────────┘   └─────────┘   └─────────┘   └─────────┘
         │              │              │              │              │
         └──────────────┴──────────────┴──────────────┴──────────────┘
                                      │
                                      ▼
                        ┌─────────────────────────────┐
                        │     Shared Infrastructure    │
                        │  PostgreSQL │ Redis │ S3    │
                        └─────────────────────────────┘

Service Catalog

Core Services

Service Purpose Port Documentation
Core Authentication, users, teams, organizations 18000 Core Service
Synthex Synthetic data generation & data management 18090 Synthex User Guide
Model Training Experiment tracking & training orchestration 18052 Model Training
ModelOps Model deployment & lifecycle management 18087 ModelOps User Guide

AI/ML Services

Service Purpose Port Documentation
RAG Retrieval-Augmented Generation pipelines 8186 RAG Service
RAG Index Manager Knowledge base optimization 8187 RAG Index
RAG Sentinel AI security & compliance 8188 RAG Sentinel
PromptScope Prompt engineering & testing 8082 PromptScope
Agent Studio AI agent development 8089 Agent Studio

Data & Operations Services

Service Purpose Port Documentation
Stream Real-time data processing 8083 Stream Service
FlowForge Workflow automation 8084 FlowForge
Inwire Observe Platform monitoring & observability 8085 Observe
Vault Agent Secrets management 8086 Vault Agent

Core Service

The Core Service is the foundation of the Inwire platform, handling:

Key Endpoints

Endpoint Method Description
/api/v1/auth/login POST User authentication
/api/v1/auth/token/refresh POST Refresh JWT token
/api/v1/users GET/POST User management
/api/v1/teams GET/POST Team management
/api/v1/organizations GET/POST Organization management
/api/v1/integrations GET/POST Integration configuration

Authentication Flow

┌──────────┐         ┌──────────┐         ┌──────────┐
│  Client  │         │   Core   │         │ Database │
└────┬─────┘         └────┬─────┘         └────┬─────┘
     │                    │                    │
     │  POST /auth/login  │                    │
     │───────────────────>│                    │
     │                    │  Verify credentials│
     │                    │───────────────────>│
     │                    │<───────────────────│
     │   JWT + Refresh    │                    │
     │<───────────────────│                    │
     │                    │                    │
     │  API Request + JWT │                    │
     │───────────────────>│                    │
     │                    │  Validate token    │
     │   Response         │                    │
     │<───────────────────│                    │

Synthex Service

Synthex is the data management and synthetic data generation service — the "data twin" of the platform. It handles everything related to data preparation, profiling, transformation, and synthetic data generation.

Full documentation: Synthex User Guide

Capabilities

Key Endpoints

Endpoint Method Description
/api/v1/datasets GET/POST Dataset management
/api/v1/profiles GET/POST Data profile management
/api/v1/recipes GET/POST Transformation recipes
/api/v1/generators GET/POST Generator configurations
/api/v1/jobs GET/POST Generation job management

Model Training Service

The Model Training Service orchestrates ML experiments and training jobs:

Key Endpoints

Endpoint Method Description
/api/v1/experiments GET/POST Experiment management
/api/v1/runs GET/POST Training run management
/api/v1/metrics GET/POST Metric logging
/api/v1/artifacts GET/POST Artifact storage

Training Workflow

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│  Synthex    │────>│   Model     │────>│  ModelOps   │
│  (Dataset)  │     │  Training   │     │  (Deploy)   │
└─────────────┘     └─────────────┘     └─────────────┘
                          │
                          ▼
                    ┌───────────┐
                    │ Experiment│
                    │  Tracking │
                    │  - Runs   │
                    │  - Metrics│
                    │  - Models │
                    └───────────┘

ModelOps Service

The ModelOps Service manages the model lifecycle from registration to production:

Full documentation: ModelOps User Guide

Key Endpoints

Endpoint Method Description
/api/v1/models GET/POST Model registry
/api/v1/deployments GET/POST Deployment management
/api/v1/builds GET/POST Container builds
/api/v1/clusters GET Available clusters

Deployment Strategies

Strategy Description Use Case
Rolling Gradual pod replacement Low-risk updates
Blue/Green Instant traffic switch Zero-downtime
Canary Partial traffic routing Production testing
Shadow Mirror traffic without affecting users Validation

RAG Service

The RAG (Retrieval-Augmented Generation) Service builds knowledge-grounded AI pipelines:

Key Endpoints

Endpoint Method Description
/api/v1/pipelines GET/POST Pipeline management
/api/v1/documents GET/POST Document ingestion
/api/v1/query POST Query pipeline
/api/v1/embeddings POST Generate embeddings

RAG Index Manager

Optimizes and manages RAG knowledge bases:


RAG Sentinel

AI security and compliance for RAG pipelines:


PromptScope Service

Prompt engineering and testing platform:


Agent Studio

AI agent development platform:


Stream Service

Real-time data processing:


FlowForge Service

Workflow automation:


Inwire Observe

Platform monitoring and observability:


Vault Agent

Secrets management:


Common Patterns

API Response Format

All services use consistent response formats:

Success Response:

{
  "data": { ... },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 100
  }
}

Error Response:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input",
    "details": [ ... ]
  }
}

Pagination

List endpoints support pagination:

GET /api/v1/datasets?page=1&per_page=20&sort=created_at&order=desc

Filtering

Most list endpoints support filtering:

GET /api/v1/jobs?status=running&type=generation

Health Checks

All services expose health endpoints:

Endpoint Description
/health Basic liveness check
/health/ready Readiness check (includes dependencies)
/health/live Kubernetes liveness probe

API Documentation

Each service provides OpenAPI documentation:


Next Steps

For detailed service documentation: