Docs
Technical Architecture & Stack

Technical Architecture & Stack

A look under the hood at Postion. Explore our system architecture, modern tech stack, and the core design principles that ensure speed, scale, and security.

1. System Architecture Diagram

Core Flow:

  1. A user accesses a site ([username].postions.app or a custom domain) via the Next.js frontend.
  2. The Cloudflare Edge Network processes the request, providing global CDN acceleration.
  3. API requests are sent to the backend services via Next.js API Routes.
  4. The backend service interacts with the PostgreSQL database using Prisma ORM to fetch content data.
  5. The payment process is handled by the Stripe API, and subscription statuses are synced via Webhooks.
  6. AI-related features (e.g., writing assistant, SEO metadata generation) are implemented through an OpenAI-compatible API relay.
  7. Newsletter features are implemented on a Stalwart mail server over JMAP.

2. Technology Stack

  • Frontend: Next.js 14 (React), Tailwind CSS, BuouUI
  • Backend: Next.js API Routes, TypeScript
  • Database: PostgreSQL
  • ORM: Prisma
  • Payments: Stripe
  • Domain: Cloudflare
  • AI Services: OpenAI-compatible API relay, Vercel AI SDK
  • Deployment/Hosting: Single container, deployed with Dokploy
  • Authentication: NextAuth.js
  • Content Delivery: Cloudflare Edge Network (CDN)

[Info] Rationale: We chose a full-stack TypeScript solution centered on Cloudflare and Next.js to achieve maximum development efficiency, and outstanding performance (especially for SEO)β€”a perfect fit for a content platform's needs.

3. Core Data Schema

  • User: Stores user information and authentication details.
  • Site: Stores configurations for each creator's site (subdomain, custom domain, template, branding, etc.). A User can own multiple Sites.
  • Post: Stores article content, metadata, and publication status. Linked to a Site.
  • Subscription: Stores user subscription relationships, linked to a Stripe Subscription.
  • Webhook: Stores the developer webhook endpoints that creators configure.

4. Key Design Principles

  • Multi-tenancy: Content and configurations for different creators are isolated at the database level using a siteId.
  • Performance First: We utilize Incremental Static Regeneration (ISR) and CDN caching to ensure content pages load in milliseconds.
  • Security & Reliability: All payment information is handled by Stripe; we do not store sensitive payment data. We leverage platform-native security features (like Cloudflare's firewall) to prevent common attacks.
  • Scalability: CDN and application caching absorb most traffic to public pages.

Β© Postion 2026 β€” BuouTech Inc.