Skip to content

feat: add database-neon module #8

@ronak-create

Description

@ronak-create

Summary

Add Neon (serverless Postgres) as a database option, alongside the existing database-postgresql module.

Why

Neon is the dominant serverless Postgres provider — used heavily with Next.js and Vercel deployments.
It has a distinct client (@neondatabase/serverless) optimised for connection pooling in serverless environments where long-lived pg pools aren't viable.


Files to generate

  • src/db/client.ts — Neon serverless client with pool setup
  • src/db/migrations/001_init.sql
  • .env.example — with DATABASE_URL (Neon connection string format)

Implementation hints

  • Add packages/modules/src/database/neon.ts
    → use supabase.ts or postgresql.ts as the template

  • Key dependency:

    • @neondatabase/serverless
  • The client.ts should:

    • use neon() for single queries
    • use Pool for transactions
  • Register in same places as other database modules


Contributor guidance

Refer to CONTRIBUTING.md → "Adding a New Module"


Acceptance criteria

  • foundation create lists Neon as a database option
  • Generated client.ts type-checks cleanly
  • .env.example contains DATABASE_URL=postgresql://...
  • Snapshot test added

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersmodule: databaseRelated to database systems, ORM integrations, or data modeling.new-modulebuild something here

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions