P Practical Tools
Architecture plan · not connected to cloud services

Turn the local vault into an event-driven secure cell.

This page separates the current browser-only vault from the proposed production architecture. It shows where authentication, temporary credentials, object storage, workers, events, results, and the viewer belong.

End-to-end flow

One controlled path from browser to result.

The browser never receives broad cloud permissions. It receives a short-lived, narrowly scoped capability for the operation the user requested.

01

Validate

API validates JWT, tenant, file policy, size, and requested operation.

02

Broker

Token Broker exchanges identity for temporary scoped STS credentials.

03

Store

Encrypted object lands in a private bucket and emits an object-created event.

04

Process

Importer or isolated runner processes the object with network policy and limits.

05

Publish

Results are stored, status events are emitted, and the viewer reads filtered data.

Control plane

Hawk API Server

  • FastAPI or the existing Fastify service behind an HTTPS load balancer.
  • JWT verification, tenant authorization, idempotency keys, and audit records.
  • Helm release orchestration only from a trusted server-side worker.

Data plane

Private processing

  • S3 stores encrypted objects and evaluation logs with a lifecycle policy.
  • EventBridge routes object and job status events through a custom bus.
  • AWS Batch or EKS runner pods process jobs with CPU, memory, time, and network limits.

Read plane

Results and viewer

  • Aurora PostgreSQL stores normalized results, job state, ownership, and indexes.
  • Valkey is optional and must never be the source of truth.
  • Web Viewer supports browse, filter, export, and status without exposing secrets.

Local event simulation

Run the cell flow safely in this browser.

This simulation mirrors validation, scoped credentials, object-created events, importing, result storage, and viewer updates. It never contacts AWS, creates a Helm release, uploads a file, or sends data outside this page.

Ready. No cloud operation has been started.

    Migration plan

    Build it in safe increments.

    1. 1Keep local mode working. The existing IndexedDB and Web Crypto vault remains the offline fallback and demo mode.
    2. 2Add authenticated API boundaries. Implement JWT validation, ownership checks, upload sessions, and audit events before cloud access.
    3. 3Add private object storage. Use server-created presigned multipart uploads with encryption, checksum validation, and expiry.
    4. 4Add event processing. Object-created events create idempotent jobs; retries go to a dead-letter path instead of silently duplicating work.
    5. 5Add isolated runners. Choose AWS Batch first for simpler operations, then EKS/Karpenter when workload density requires it.