Inspiration

We wanted a small, deployable content platform that demonstrates modern serverless deployment patterns: edge-first frontend, managed serverless database, and safe CI/automation for schema changes.

What it does

  • Public content listing with full-text search
  • Admin UI for creating, editing, and publishing content
  • Server-side API routes on Next.js that query Aurora
  • Migrations and seeds applied via AWS RDS Data API or from a bastion EC2

How we built it

  • Frontend: Next.js (App Router) deployed to Vercel
  • Database: Amazon Aurora Serverless (Postgres) with migrations in drizzle SQL
  • Secrets: AWS Secrets Manager for DB credentials
  • CI: GitHub Actions for lint/build; migrations scripts available for Data API or SSM-run on EC2 ### High-Level Architecture Diagram
┌─────────────────────────────────────────────────────────────────┐
│                        INTERNET / USERS                         │
└────────────────────────┬────────────────────────────────────────┘
                         │ HTTPS
        ┌────────────────┼────────────────┐
        │                │                │
        ▼                ▼                ▼
    ┌─────────┐  ┌──────────────┐  ┌──────────────┐
    │  Web    │  │   Git        │  │   Vercel     │
    │ Browser │  │   Provider   │  │   Analytics  │
    │         │  │  (GitHub)    │  │              │
    └────┬────┘  └──────┬───────┘  └──────┬───────┘
         │               │                  │
         └───────────────┼──────────────────┘
                         │
                         ▼
        ┌────────────────────────────────────┐
        │      VERCEL PLATFORM               │
        │  ┌──────────────────────────────┐  │
        │  │   Next.js App (Frontend)     │  │
        │  │   - React Components         │  │
        │  │   - Client-side Logic        │  │
        │  │   - Static Assets            │  │
        │  └──────────────┬───────────────┘  │
        │                 │                   │
        │  ┌──────────────▼───────────────┐  │
        │  │   Next.js API Routes         │  │
        │  │   - /api/content/*           │  │
        │  │   - /api/search              │  │
        │  │   - /api/auth/*              │  │
        │  └──────────────┬───────────────┘  │
        │                 │                   │
        │  ┌──────────────▼───────────────┐  │
        │  │   Environment Variables      │  │
        │  │   - DATABASE_URL             │  │
        │  │   - NEXTAUTH_SECRET          │  │
        │  └──────────────┬───────────────┘  │
        │                 │                   │
        └─────────────────┼───────────────────┘
                          │
         ┌────────────────┼────────────────┐
         │                │                │
         ▼                ▼                ▼
    ┌──────────┐  ┌────────────────┐  ┌──────────┐
    │   AWS    │  │   AWS OIDC     │  │CloudWatch│
    │ Secrets  │  │   Provider     │  │   Logs   │
    │ Manager  │  │   (tokens)     │  │          │
    └──────────┘  └────────┬───────┘  └──────────┘
                           │
                 ┌─────────▼─────────┐
                 │                   │
                 ▼                   ▼
        ┌─────────────────┐  ┌──────────────────┐
        │   AWS Aurora    │  │  AWS RDS IAM     │
        │   Serverless    │  │   Auth (OIDC)    │
        │  PostgreSQL     │  │                  │
        │                 │  │  Role: h0-db-    │
        │ Tables:         │  │       role       │
        │ - users         │  │                  │
        │ - content       │  │  Permissions:    │
        │ - categories    │  │  - SELECT        │
        │ - search_index  │  │  - INSERT        │
        │                 │  │  - UPDATE        │
        │ Instance:       │  │  - DELETE        │
        │ serverless-1    │  │                  │
        └─────────────────┘  └──────────────────┘

Challenges we ran into

  • Vercel cannot join private VPCs — required either a proxy/SSM runner or AWS Data API. We implemented Data API scripts and an EC2 runbook for safe operations.
  • Build-time DB access caused prerender failures; we made DB init resilient at import time so builds succeed when DB is unreachable.

Accomplishments that we're proud of

  • Full Next.js 16 migration and stable build on main
  • Drizzle 0.45 migration + Data API migration/seed scripts
  • Admin UI, content CRUD and search working with seeded demo data

What we learned

  • Build zero stack with Vercel and AWS

What's next for StackPress

  • Move to app-specific DB user, enable IAM auth for app, add gated CI job to run migrations, and improve tests/observability.

Built With

  • amazon-aurora-serverless-(postgres)
  • aws-secrets-manager
  • jest
  • next.js
  • rds-data-api
  • tailwind-css
  • typescript
  • vercel
Share this project:

Updates