Docs
Platform Architecture Overview

Platform Architecture Overview

Understand Postion's multi-tenant architecture, routing system, and core technical infrastructure. A technical deep-dive for developers and advanced users.

Technical Foundation

Postion is built on a modern, high-performance technology stack designed for scalability, security, and developer experience. This document provides an overview of our platform architecture.

This document is intended for developers, technical users, and those curious about how Postion works under the hood.

Core Technology Stack

Our platform leverages industry-leading technologies:

LayerTechnologyPurpose
FrameworkNext.js 14Full-stack React framework with App Router
LanguageTypeScriptType-safe development
DatabasePostgreSQL + PrismaRelational data with type-safe ORM
PaymentsStripeSubscriptions & Connect payouts
StorageAWS S3 / R2Media file storage
EmailResend + MailgunTransactional & marketing emails
AIGoogle GeminiAI-powered writing assistance

Multi-Tenant Architecture

Postion uses a multi-tenant architecture where each user can create multiple independent sites (publications). This is the foundation of our "User → Site → Content" hierarchy.

How It Works

┌─────────────────────────────────────────────────────┐
│                    User Account                      │
│  (Billing, Profile, Global Settings)                │
├─────────────────────────────────────────────────────┤
│                                                      │
│   ┌─────────────┐  ┌─────────────┐  ┌─────────────┐ │
│   │   Site A    │  │   Site B    │  │   Site C    │ │
│   │ (Tech Blog) │  │ (Portfolio) │  │ (Newsletter)│ │
│   ├─────────────┤  ├─────────────┤  ├─────────────┤ │
│   │ • Posts     │  │ • Posts     │  │ • Posts     │ │
│   │ • Pages     │  │ • Pages     │  │ • Pages     │ │
│   │ • Templates │  │ • Templates │  │ • Templates │ │
│   │ • Subs      │  │ • Subs      │  │ • Subs      │ │
│   └─────────────┘  └─────────────┘  └─────────────┘ │
│                                                      │
└─────────────────────────────────────────────────────┘

Key Characteristics

🌐 Independent Domains

Each site can have its own subdomain (blog.postion.app) or custom domain (yourblog.com).

👥 Separate Subscribers

Subscriber lists are isolated per site. A user subscribing to Site A is not automatically subscribed to Site B.

💳 Unified Billing

While sites are separate, billing and Stripe Connect settings are managed at the user account level.

🎨 Unique Branding

Each site has its own templates, colors, fonts, and appearance settings.

Routing Architecture

Our middleware-based routing system intelligently handles requests based on the hostname.

Request Flow

flowchart TD
    A[Incoming Request] --> B{Check Hostname}
    B -->|postion.app| C[Main Platform Routes]
    B -->|Other Domain| D[Tenant Site Routes]
    
    C --> E{Path Check}
    E -->|/dashboard, /login, /site, /post| F[Authenticated Routes]
    E -->|/sso-bridge, /sso-logout| G[SSO Handling]
    E -->|Other| H[Rewrite to /home/*]
    
    D --> I[Rewrite to /domain/*]
    I --> J[Render Tenant Site]

Route Categories

CategoryPathsDescription
Authenticated/dashboard, /site/*, /post/*Require user login
SSO/sso-bridge, /sso-logoutSingle sign-on handling
Public Platform/home/*, /blog, /pricingMarketing & public pages
Tenant Sites*.postion.app, custom domainsUser-created publications

Content Security

We take content protection seriously. Postion includes built-in anti-piracy features to protect your paid content.

Security Features

Watermarking: Dynamic watermarks can be applied to premium content, displaying the viewer's identity.

Copy Protection: Optional copy/paste and right-click protection for sensitive content.

Screenshot Deterrent: Visual indicators that discourage screenshot sharing.

Access Logging: Track who views your content and when.

Note: Content security features are available on Premium plans. They can be enabled per-post or site-wide in your settings.

Database Architecture

Our database is designed around 42+ models organized into logical domains:

Core Domains

DomainKey ModelsPurpose
User SystemUser, Account, Session, UserProfileAuthentication & profiles
Site SystemSite, Template, TemplatePricingMulti-tenant publications
ContentPost, Page, Tag, SeriesContent management
SubscriptionsPlan, Subscription, TransactionMonetization
EmailSubscribe, EmailCampaign, EmailSendMarketing automation
CRMFanRelationship, FanTag, FanSegmentFan management
APIApiKey, ApiUsage, WebhookDeveloper platform

Data Relationships

erDiagram
    USER ||--o{ SITE : owns
    SITE ||--o{ POST : contains
    SITE ||--o{ PLAN : offers
    PLAN ||--o{ SUBSCRIPTION : has
    SUBSCRIPTION ||--o{ TRANSACTION : generates
    POST ||--o| POST_PRICING : has
    POST ||--o{ POST_PURCHASE : has
    USER ||--o| STRIPE_ACCOUNT : connects

Stripe Integration

Payment processing is handled entirely through Stripe, using two key features:

Stripe Subscriptions

For recurring revenue from your subscribers:

  • Monthly and annual billing cycles
  • Automatic payment retry
  • Subscription management portal

Stripe Connect

For creator payouts:

  • Direct deposits to creator bank accounts
  • Automatic platform fee deduction (5%)
  • Global payout support
  • Tax form generation

Learn more about setting up payments in our Stripe Connect Guide.

Storage Infrastructure

Media files are stored using cloud object storage:

  • Primary: AWS S3 for reliable, scalable storage
  • CDN: Global content delivery for fast load times
  • Formats: Support for images, videos, documents, and more

Storage quotas vary by plan. Check our Storage Quotas documentation for details.

Performance & Scalability

Postion is built for performance at scale:

⚡ Edge Runtime

Middleware runs at the edge for minimal latency worldwide.

📦 Smart Caching

Intelligent caching of static content and API responses.

🔄 Auto Scaling

Infrastructure scales automatically with traffic demands.

Need More Technical Details?

© Postion 2026 — BuouTech Inc.