Skip to Content
Upblit
AboutOpen SourceCommunityDeveloperContactPricing
Star on GitHub—Sign in
CTRL K
  • Introduction
    • AI Gateway Overview
    • Documents
    • Tenants
    • API Reference Overview
    • AI Gateway API
    • API Keys API
    • Applications API
    • Authentication
    • Ingest API (SDK)
    • Organizations API
    • Projects API
    • Telemetry API
    • Users API
    • Architecture Overview
    • Database Architecture
    • Multi-Tenancy
    • Security Model
    • Service Boundaries
    • Telemetry Pipeline
  • DeployX CLI
    • Contributing
    • Architecture Rules
    • Coding Guidelines
    • SDK Development
    • Dashboard Overview
    • AI Gateway
    • API Keys
    • Applications
    • Observability
    • Organizations
    • Profile
    • Projects
    • Quickstart
    • Authentication
    • Your First Project
    • Installation
    • Observability Overview
    • Structured Logs
    • Telemetry Flow
    • Distributed Traces
    • SDK Overview
    • Express SDK
    • Go SDK
    • Java SDK (Coming Soon)
    • Python SDK
    • React SDK (Coming Soon)
  • Introduction
    • AI Gateway Overview
    • Documents
    • Tenants
    • API Reference Overview
    • AI Gateway API
    • API Keys API
    • Applications API
    • Authentication
    • Ingest API (SDK)
    • Organizations API
    • Projects API
    • Telemetry API
    • Users API
    • Architecture Overview
    • Database Architecture
    • Multi-Tenancy
    • Security Model
    • Service Boundaries
    • Telemetry Pipeline
  • DeployX CLI
    • Contributing
    • Architecture Rules
    • Coding Guidelines
    • SDK Development
    • Dashboard Overview
    • AI Gateway
    • API Keys
    • Applications
    • Observability
    • Organizations
    • Profile
    • Projects
    • Quickstart
    • Authentication
    • Your First Project
    • Installation
    • Observability Overview
    • Structured Logs
    • Telemetry Flow
    • Distributed Traces
    • SDK Overview
    • Express SDK
    • Go SDK
    • Java SDK (Coming Soon)
    • Python SDK
    • React SDK (Coming Soon)

On This Page

  • Tenant Hierarchy
  • Data Isolation
  • PostgreSQL
  • MongoDB
  • API Key Scoping
  • AI Gateway Tenancy
  • Current Model vs. Future Options
ArchitectureMulti-Tenancy

Multi-Tenancy

Upblit uses shared database, shared schema multi-tenancy. All organizations share the same PostgreSQL tables and MongoDB collections. Data isolation is enforced at the application layer.

Tenant Hierarchy

User (GitHub identity) └── Organization ← top-level tenant ├── Plan (billing tier) ├── Invite (membership) └── Project └── Application ├── API Key └── Telemetry (Traces, Logs in MongoDB)

Data Isolation

PostgreSQL

Every query is scoped to the authenticated user’s organizations:

// Correct — scoped to user's orgs organizationRepository.findByUsersContaining(currentUser) // Wrong — returns all orgs (never do this) organizationRepository.findAll()

MongoDB

Every telemetry query includes projectId or applicationId as a filter:

// Correct traceRepository.findByProjectId(projectId) // Wrong — returns all tenants' data traceRepository.findAll()

API Key Scoping

When the backend receives an ingest request:

  1. Validates x-api-key against ApiClient table
  2. Resolves applicationId from the key record
  3. Resolves projectId from the application record
  4. Stores telemetry with both IDs — ensuring it’s always associated with the correct tenant

AI Gateway Tenancy

AI tenants are also scoped to an organization:

Organization └── AI Tenant (organizationId field) └── AI Document

All AI tenant queries must include the organizationId filter.

Current Model vs. Future Options

ModelWhen to Consider
Shared schema (current)< 1,000 organizations, standard isolation
Schema-per-tenant> 1,000 organizations, compliance requirements
Database-per-tenantEnterprise customers requiring complete isolation

The current model is appropriate for the current scale. Do not migrate without an explicit product and engineering decision.

Last updated on May 27, 2026
Database ArchitectureSecurity Model
Upblit

A student-built observability workbench for logs, traces, metrics, API keys, and AI-assisted incident notes.

OAuthAPI scopesTrace contextRetention notes

Product

  • Architecture
  • Dashboard preview
  • AI docs
  • Security
  • Pricing

Developers

  • Developer docs
  • API reference
  • Changelog
  • GitHub
  • Status

Company

  • Support
  • Contact
  • Docs
  • Dashboard
  • Sign in

Legal

  • Privacy Policy
  • Terms
  • Cookie Policy
  • Acceptable Use
  • Data Retention
  • Data Processing

Copyright 2026 Upblit. All rights reserved.

Built for telemetry review, API operations, and incident response.