Documentation Index
Fetch the complete documentation index at: https://mintlify.com/revokslab/shipfree/llms.txt
Use this file to discover all available pages before exploring further.
Installation
This guide covers everything you need to install and configure ShipFree for development and production.Prerequisites
Before installing ShipFree, make sure you have the following installed on your system:Required
Bun
Version: 1.2.20 or higherBun is a fast JavaScript runtime and package manager.Verify installation:
PostgreSQL
Version: 14 or higherPostgreSQL is the database used by ShipFree.macOS:Ubuntu/Debian:Windows:
Download from postgresql.org
Optional
- Git: For cloning the repository
- OpenSSL: For generating secure secrets
- Docker: For containerized development (alternative to local PostgreSQL)
Step-by-step setup
Clone the repository
Start by cloning the ShipFree repository:
You can also download the ZIP file from GitHub if you prefer not to use Git.
Install dependencies
Install all required packages using Bun:This will install all dependencies listed in
package.json, including:- Next.js 16.1 framework
- Better-Auth for authentication
- Drizzle ORM for database operations
- TailwindCSS 4 for styling
- And many more packages
Run database migrations
Apply the database schema using Drizzle:This command:
- Connects to your database using
DATABASE_URL - Runs all migrations from the
migrations/folder - Creates all required tables (users, sessions, accounts, etc.)
The migration script is located at
scripts/migrate.ts and uses Drizzle’s migration runner.Available migration commands
Start development server
Launch the Next.js development server:The application will start at http://localhost:3000You should see output similar to:
Environment configuration details
Here’s a comprehensive overview of all environment variables:Database
Application
Authentication
OAuth providers (optional)
Google OAuth
Google OAuth
Get credentials from Google Cloud Console
GitHub OAuth
GitHub OAuth
Get credentials from GitHub Developer Settings
Microsoft OAuth
Microsoft OAuth
Get credentials from Azure Portal
Facebook OAuth
Facebook OAuth
Get credentials from Facebook Developers
Email providers (optional)
Payment providers (optional)
Stripe
Stripe
Get credentials from Stripe Dashboard
Polar
Polar
Get credentials from Polar Settings
Lemon Squeezy
Lemon Squeezy
Get credentials from Lemon Squeezy Settings
Cloudflare R2 storage (optional)
Sentry monitoring (optional)
Troubleshooting
Bun installation issues
Bun installation issues
Problem:
bun: command not foundSolution:- Install Bun using the official installer:
- Restart your terminal
- Verify with
bun --version
PostgreSQL connection errors
PostgreSQL connection errors
Problem:
Connection refused or ECONNREFUSEDSolution:- Check if PostgreSQL is running:
- Start PostgreSQL if it’s not running:
- Verify your
DATABASE_URLcredentials
database "shipfree" does not existSolution:Migration errors
Migration errors
Problem: Migration fails with table already existsSolution: For a fresh start, drop and recreate the database:Problem: Permission denied errorsSolution: Ensure your PostgreSQL user has proper permissions:
Port conflicts
Port conflicts
Problem: Port 3000 is already in useSolution: Use a different port:Or kill the process using port 3000:
Environment variable issues
Environment variable issues
Problem: Environment variables not loadingSolution:
- Ensure
.envfile exists in the root directory - Restart the development server after changing
.env - Check that variables are properly formatted (no spaces around
=) - For client-side variables, ensure they start with
NEXT_PUBLIC_
BETTER_AUTH_SECRET validation errorSolution: Generate a new secret:TypeScript errors
TypeScript errors
Problem: Type errors in the editorSolution:
- Restart your TypeScript server in VS Code (Cmd+Shift+P > “Restart TS Server”)
- Run type check:
- Ensure you have the latest dependencies:
Next steps
Now that ShipFree is installed, you can:Configure authentication
Set up OAuth providers and customize the auth flow
Set up payments
Configure your payment provider and pricing plans
Customize branding
Update your app’s colors, logo, and brand identity
Deploy to production
Learn how to deploy your application