sourcebot/packages/db
Michael Sukkarieh 173a56ab64
Revamp onboarding flow (#376)
* sign up copy nits

* first pass at new onboarding page

* wip join onboard logic

* refactor auth provider fetch logic

* add member approval and invite link flag logic

* update join request flow and remove jit logic

* onboard guard

* nits, onboard role check, invite link enabled check

* fix bg color issue in onboarding page

* refactor onboard UI

* ui nits and more onboarding resource cards

* revamp auth docs

* change member approval default behavior and updated docs

* merge prisma migrations

* add id to resource card

* feedback

* feedback

* feedback and fixed build

* settings drop down UI nit

* ui nits

* handle join when max capacity case

* add news data for member toggle

* refactor for public access case

* add iap bridge to onboard logic

* fetch member approval req and invite link enabled flag on server

* ui nits

* fix invite link enable toggle snapping issue

* ui nits

* styling and ui nits, pass in invite id from server

* add mcp resource in onboard step

* get invite link in server

* fix build issue

* refactor docs on config

* minor doc nit
2025-07-14 20:14:41 -07:00
..
prisma Revamp onboarding flow (#376) 2025-07-14 20:14:41 -07:00
src v3 effort (#158) 2025-03-31 22:34:42 -07:00
tools feat(analytics): Adds analytics dashboard (#358) 2025-06-20 14:57:05 -07:00
.gitignore v3 effort (#158) 2025-03-31 22:34:42 -07:00
package.json Add support for structured logs (#323) 2025-06-02 11:16:01 -07:00
README.md v3 effort (#158) 2025-03-31 22:34:42 -07:00
tsconfig.json v3 effort (#158) 2025-03-31 22:34:42 -07:00

@sourcebot/db

This package contains the database schema (prisma/schema.prisma), migrations (prisma/migrations) and the client library for interacting with the database. Before making edits to the schema, please read about prisma's migration model to get an idea of how migrations work.

Tools

This library contains a /tools directory with a collection of tooling needed for database management. Notable tools are:

  • yarn tool:prisma - runs the prisma CLI with an additional required param --url, the connection URL of the database you want the command to run against. This tool is geared towards running commands against non-dev database like staging or prod since 1) it allows you to quickly switch between environments, and 2) connection URLs do not need to be persisted in a DATABASE_URL environment variable. Examples:
# Run prisma studio
yarn tool:prisma studio --url postgresql://username:password@url:5432/db_name

# Rollback a migration
yarn tool:prisma migrate resolve --rolled-back "migration_name" --url postgresql://username:password@url:5432/db_name
  • yarn tool:run-script - runs a script (located in the /tools/scripts directory) that performs some operations against the DB. This is useful for writing bespoke CRUD operations while still being type-safe and having all the perks of the prisma client lib.
# Run `migrate-duplicate-connections.ts`
yarn tool:run-script --script  migrate-duplicate-connections --url postgresql://username:password@url:5432/db_name