Return to Terminal

System Architecture

High-level technical overview of the AuditMate B2B SaaS Engine.

Django 5.0 PostgreSQL Redis Celery Stripe API Fernet Encryption

01. Logical System Components

┌─────────────────────────────────────────────────────────────────────┐ │ Frontend (React/TypeScript) │ │ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │ │ │ Client Portal │ │ Billing Module │ │ Evidence Export │ │ └────────────┬─────────────────────┬──────────────────────┬───────────┘ ▼ ▼ ▼ ┌──────────────────────────────────────────────────────────────────────┐ │ Django REST Framework (Backend) │ │ ┌────────────────────────────────────────────────────────────────┐ │ │ │ Permission Layer: IsAuthenticated + IsSameOrg + HasActiveSub │ │ │ └────────────────────────────────────────────────────────────────┘ │ │ │ │ │ │ │ ┌──────▼──────┐ ┌──────▼──────┐ ┌──────▼──────┐ │ │ │ Org Engine │ │ Audit Engine│ │ Stripe Sync │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ └────────────────────────────────────┬─────────────────────────────────┘ ▼ ┌──────────────────────────────────────────────────────────────────────┐ │ Data & Task Persistence │ │ ┌────────────────────────┐ ┌────────────────────────┐ │ │ │ PostgreSQL (ACID) │ │ Redis (Queue) │ │ │ └────────────────────────┘ └────────────────────────┘ │ └──────────────────────────────────────────────────────────────────────┘

02. Security Flow: Premium Feature Access

How we handle feature gating for CSV/PDF exports at the middleware level.

[REQUEST] GET /api/v1/audits/export/csv/

[AUTH] Validate JWT → Identify User & Organization

[PERM] HasActiveSubscription check:

if org.subscription_status == 'active': ALLOW (200 OK)
else: BLOCK (403 Forbidden - "Upgrade to Premium")

03. Stripe Webhook Lifecycle

Asynchronous synchronization between Stripe billing and our local Database.

Stripe Checkout ──▶ Webhook (checkout.session.completed) │ ▼ Django Webhook Handler │ ┌───────┴───────┐ │ │ Verify Signature Lookup Org by ID │ │ └───────┬───────┘ ▼ Update local Org: sub_status = 'active'

04. Permission Matrix

Resource Endpoint Free User Pro User Admin Only
Run Security Scan -
PDF/CSV Export -
Manage Team - -
Risk Acceptance -
Download Security Whitepaper (HTML)