SaasCore Docs
  • Get Started
  • Configuration
    • Database
    • Stripe
      • Product ID and Price ID
      • API keys
      • Stripe Webhook
    • Emails
      • Cron Jobs
    • Claudinary
    • Chat plugin
    • Upstash Redis
    • OAuth with Google and GitHub
    • Subscription types and plans
    • Affiliate program
    • Google Analytics Api
  • Landing page
    • Header
    • Hero
      • Discount
      • AvatarCircles
    • Other components
  • Authentication Flow
    • For Admins
    • For Clients
      • OAuth
      • Credentials
    • For Affiliates
  • Payments
    • Payment Flow Scenarios
      • Scenario 1: Registered Client
      • Scenario 2: Direct Subscription from Home Page
      • Upgrading/Downgrading/Canceling Subscriptions
    • Pricing Table
  • Component Protection
  • Pending ...
Powered by GitBook
On this page
  1. Configuration

Database

PreviousConfigurationNextStripe

Last updated 9 months ago

1. Create a Neon DB Account

  1. Sign Up: Go to the and sign up for an account.

  2. Create a New Database: Once logged in, create a new database instance. Note down the connection details (host, database name, username, password).

Add Your Database Credentials:

DATABASE_URL=postgresql://username:password@hostname:port/database?sslmode=require

PS: Your SAAS Plan names and affiliate program payment methods should be determined at both the config object level (/lib/config/main.ts) and the Prisma schema level.

enum SubscriptionPlan {
  STARTER
  PREMIUM
  ENTREPRISE
  PLUS
}
enum SelectedPaymentMethod {
  PAYONEER
  PAYPAL
  WISE
}

When you've ensured the config file and schema are aligned, run npx prisma db push to updates your database to match your Prisma schema , followed by npx prisma generate to regenerate the Prisma Client.

Neon DB website