docs(start): add tested PostgreSQL and Prisma recipe - #8374
docs(start): add tested PostgreSQL and Prisma recipe#8374tannerlinsley wants to merge 4 commits into
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe PR adds a runnable TanStack Start PostgreSQL and Prisma example. It includes schema migrations, server-only database access, validated transactional mutations, CSRF handling, a notes UI, end-to-end tests, and setup and deployment documentation. ChangesPostgreSQL notes example
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant Browser
participant NotesRoute
participant createNote
participant Prisma
participant PostgreSQL
Browser->>NotesRoute: Submit note form
NotesRoute->>createNote: Send slug, title, and category
createNote->>Prisma: Validate input and start transaction
Prisma->>PostgreSQL: Upsert category and create note
PostgreSQL-->>Prisma: Commit or constraint error
Prisma-->>createNote: Transaction result
createNote-->>NotesRoute: Success or error
NotesRoute-->>Browser: Refresh notes or display error
Merge Risk: ⚪ Minimal · up to No concrete merge-blocking risk remains in the reviewed changes. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 12 files. (4 skipped: 4 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
🚀 Changeset Version Preview3 package(s) bumped directly, 21 bumped as dependents. 🟩 Patch bumps
|
|
View your CI Pipeline Execution ↗ for commit 3194fec
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Important
At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.
Nx Cloud has identified a possible root cause for your failed CI:
We classified both tanstack-start-example-postgres:build and tanstack-start-example-postgres:test:e2e as environment failures rather than code issues. The build fails immediately because prisma generate requires DATABASE_URL, which is not set in our CI environment, and the e2e web server times out for the same reason. Our CI would need a PostgreSQL service and the DATABASE_URL secret provisioned before these tasks can pass.
No code changes were suggested for this issue.
Trigger a rerun:
🎓 Learn more about Self-Healing CI on nx.dev
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
🎯 Changes
Replace the database guide's abstract query snippet with a complete PostgreSQL + Prisma path while retaining the provider overview. Add a runnable local example with schema migrations, server-only database access, loader reads, validated server functions, transaction rollback, and deployment notes.
The example creates a category and note in one transaction. A duplicate note slug rolls back the new category and shows a useful error. This is a shared local demo with no accounts, and its documentation states that scope.
Validation: initialized an isolated native PostgreSQL 17.11 database and applied the committed migration. The example build and TypeScript check passed. Two browser tests passed in development and production, covering persisted SSR data, reloads, server validation, and rollback. Production response assertions and a client asset scan found no test database credentials. Reviewed the guide and production app in Chrome. Required ESLint (39 projects), type (42 projects), and unit (35 projects) checks passed. Existing dependency resolutions are preserved; only the new example's dependency graph was added.
The Docker Compose convenience path was not run because this machine lacks the Compose plugin. The documented native PostgreSQL path was used for database validation. No hosted-provider verification is claimed.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
New Features
Documentation