Skip to content

Main - #19

Open
SjxSubham wants to merge 7 commits into
masterfrom
main
Open

Main#19
SjxSubham wants to merge 7 commits into
masterfrom
main

Conversation

@SjxSubham

@SjxSubham SjxSubham commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary by Sourcery

Require a configured DATABASE_URL and align the project’s Node.js version and tooling, while making minor UI adjustments to landing page badges and icons.

Enhancements:

  • Simplify hero and pricing UI by removing decorative Sparkles icons and adjusting the hero badge background styling.

Build:

  • Specify a minimum Node.js version via the package.json engines field and add an .nvmrc file to guide local Node version.
  • Update drizzle configuration to rely solely on a non-null DATABASE_URL environment variable.

Chores:

  • Update @types/node dev dependency to the latest major version and refresh the package-lock.json accordingly.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
saas-feedx Ready Ready Preview, Comment Jun 29, 2026 2:53am

@sourcery-ai

sourcery-ai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR tightens environment configuration for the database, aligns Node tooling to v24, and makes small UI tweaks to hero and pricing components (mainly removing decorative Sparkles icons and adjusting badge styling).

Sequence diagram for database initialization with required DATABASE_URL

sequenceDiagram
  participant NodeRuntime
  participant db_index_ts as db_index_ts
  participant postgres_client as postgres
  participant drizzle_orm as drizzle

  NodeRuntime->>db_index_ts: import db
  alt [DATABASE_URL is defined]
    db_index_ts->>postgres_client: postgres(DATABASE_URL)
    db_index_ts->>drizzle_orm: drizzle(client, schema)
    drizzle_orm-->>NodeRuntime: db
  else [DATABASE_URL is missing]
    db_index_ts->>NodeRuntime: Error(DATABASE_URL environment variable is not defined)
  end
Loading

File-Level Changes

Change Details Files
Enforce DATABASE_URL presence and remove local default fallbacks in Drizzle configuration.
  • Throw an error at startup when DATABASE_URL is not defined instead of silently defaulting to a local connection string.
  • Set the Postgres connection string in the db client strictly from process.env.DATABASE_URL.
  • Update drizzle.config.ts to use a non-null asserted DATABASE_URL value without any local fallback.
db/index.ts
drizzle.config.ts
Align Node version and type definitions to Node 24 and add Node version hinting for local development.
  • Add an engines field requiring Node >=24 in package.json.
  • Bump @types/node dev dependency from ^20 to ^24 to match the targeted Node version.
  • Add an .nvmrc file to pin the Node version for developers using nvm.
package.json
.nvmrc
Simplify landing page hero and pricing visuals by removing Sparkles icons and adjusting badge styling.
  • Change the hero badge background from a primary-tinted chip to a transparent style while keeping border styling.
  • Comment out the Sparkles icon and the "Open Source" text in the hero badge, effectively hiding that label from the UI.
  • Comment out the Sparkles icon in the "Most Popular" ribbon of the pricing card while keeping the text label.
  • Retain existing header visual behavior in page-headers.tsx (only non-functional diff, e.g., re-save).
app/landing-page/hero.tsx
app/landing-page/pricing-card.tsx
components/page-headers.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@SjxSubham SjxSubham self-assigned this Jun 29, 2026
@SjxSubham SjxSubham added the enhancement New feature or request label Jun 29, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • The new strict requirement for process.env.DATABASE_URL in db/index.ts and drizzle.config.ts will cause the app to hard-crash if the env var is missing; consider keeping a sensible default or providing a clearer, environment-specific fallback strategy to avoid confusing failures in local/dev setups.
  • The DATABASE_URL handling logic is now duplicated between db/index.ts and drizzle.config.ts; centralizing this configuration (e.g., in a shared config/util) would reduce the risk of these diverging in future changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new strict requirement for `process.env.DATABASE_URL` in `db/index.ts` and `drizzle.config.ts` will cause the app to hard-crash if the env var is missing; consider keeping a sensible default or providing a clearer, environment-specific fallback strategy to avoid confusing failures in local/dev setups.
- The `DATABASE_URL` handling logic is now duplicated between `db/index.ts` and `drizzle.config.ts`; centralizing this configuration (e.g., in a shared config/util) would reduce the risk of these diverging in future changes.

## Individual Comments

### Comment 1
<location path="drizzle.config.ts" line_range="17" />
<code_context>
   dbCredentials: {

-    url: process.env.DATABASE_URL ||  'postgres://localhost:5432/drizzle' // 5432 optioanl
+    url: process.env.DATABASE_URL!,

   }
</code_context>
<issue_to_address>
**issue (bug_risk):** Non-null assertion on DATABASE_URL in config can cause opaque failures in tooling runs.

Using `process.env.DATABASE_URL!` means tooling will crash with a vague TS/runtime error if the env var is missing (e.g., in CI or local runs), instead of failing with a clear config message. Consider mirroring the runtime check from `db/index.ts` or adding a specific error for migrations/studio so misconfiguration is easier to diagnose.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread drizzle.config.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant