USRSE / USRSE/usrse.github.io

feat(db): set up NeonDB + Drizzle ORM with membership schema

Open
#1,917 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
33
Forks
104
Avg merge
12h 3m
Merged PRs (30d)
10

Description

Summary

Set up the database infrastructure for the membership management system. Design and implement the schema, configure NeonDB serverless Postgres, and establish the Drizzle ORM migration workflow.

Requirements

  • Configure NeonDB project and connection (serverless driver)
  • Set up Drizzle ORM with type-safe schema definitions
  • Design schema tables: users, profiles, memberships, roles, sessions, audit_log
  • Profile fields: name, pronouns, bio, institution, title, photo_url, github, linkedin, orcid, website, research_interests (array), working_groups, affinity_groups
  • Role system: member, admin (board/staff), super_admin
  • Audit log table for admin actions (who did what, when)
  • Set up Drizzle Kit for migration generation and management
  • Seed script for development data
  • Document schema in a migrations README

Context

Parent issue: #1916
This is the foundation — must be completed before auth, profiles, or admin dashboard.

Implementation Notes

  • Use drizzle-orm/neon-http for serverless edge compatibility
  • Schema should use Postgres-native types (jsonb for flexible fields, text arrays for tags)
  • Consider Drizzle relations for type-safe joins
  • All timestamps should be timestamp with time zone

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test paths are specified. Start by reviewing the NeonDB serverless connection and Drizzle ORM migration workflow, then define the users, profiles, memberships, roles, sessions, and audit_log schema from the requirements. Done means migrations, development seed data, and the migrations README are available and all listed fields, roles, timestamps, and audit logging requirements are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.