Neon Database Setup
This guide will walk you through setting up your database and backend services with Neon for data storage.
Buildfast includes Neon integration for database storage, so you can start storing data immediately and build out your schema using the example schema.ts file.
Create Neon Account
- Go to neon.tech
- Sign up for a free account
- Click "New Project" to create your first project
- Choose your organization and enter project details
- Select a region close to your users
- Set a strong database password and save it securely
Get Your API Keys
Once your project is created:
- Go to Projects → Connect in your Neon dashboard
- Click "Show password" to reveal your password
- Copy your Connection String
Add to your .env file:
POSTGRES_URL=your_project_url
View and/or Update Database Tables
Create essential tables for your application:
Navigate to lib/db/schema.ts
to view the User table
You can create new tables in the schema.ts file
Generate a Drizzle Schema
With Drizzle, you can generate a schema from your database tables and then use it to migrate changes to your database.
pnpm db:generate
pnpm db:migrate
View your database tables
You can view your database tables in your Neon dashboard.
pnpm db:studio
Copy the link https://local.drizzle.studio/
and paste it in your browser to view your database tables.
Security Best Practices
Never expose your postgres connection string in client-side code.