FAQ
Frequently asked questions about ShipSecure boilerplate.
General Questions
What is ShipSecure?
ShipSecure is a security-first SaaS boilerplate built with Next.js 16. It provides a solid foundation for building secure web applications with authentication, billing, and essential security features pre-configured and tested.
Who is ShipSecure for?
ShipSecure is designed for:
- Indie hackers building their first SaaS
- Developers who want security best practices out of the box
- Startups that need to ship fast without compromising security
- Agencies building MVPs for clients
What's included?
- Next.js 16 with App Router
- Authentication (GitHub & Google OAuth)
- Database (PostgreSQL + Prisma)
- Security headers & rate limiting
- Gumroad payments + GitHub delivery
- Landing page with customizable config
- Test suite (Vitest + Playwright)
- Documentation
Is this open source?
ShipSecure is a paid boilerplate that you can customize freely after purchase. You get full source code access and can modify it however you like for your projects.
Installation & Setup
What are the requirements?
- Node.js 18+ (check with
node -v) - PostgreSQL database (local or cloud: Supabase, Neon, Railway)
- Git (for cloning the repository)
I'm getting "Module not found" errors
Run these commands to reset your dependencies:
rm -rf node_modules package-lock.json
npm install
npx prisma generate
How do I fix database connection errors?
-
Check your DATABASE_URL format:
# Should be: postgresql://user:password@host:port/database postgresql://postgres:mypassword@localhost:5432/mydb -
If using a cloud database:
- Check if it's paused (free tiers often pause after inactivity)
- Verify the connection string was copied correctly
- Ensure SSL is configured if required
-
If using local PostgreSQL:
# Check if PostgreSQL is running pg_isready
See Installation Guide for detailed troubleshooting.
Port 3000 is already in use
Run on a different port:
PORT=3001 npm run dev
Authentication
How do I set up OAuth?
- Create OAuth apps on GitHub and/or Google Cloud Console
- Add credentials to
.env.local - Set callback URLs to
http://localhost:3000/api/auth/callback/{provider}
See Authentication Guide for step-by-step instructions.
OAuth returns "Invalid credentials" error
Check these:
- Client ID and Secret are correct in
.env.local - Callback URL matches exactly (including
httpvshttps) AUTH_SECRETis set (generate withnpx auth secret)
Sessions aren't persisting
- Make sure
DATABASE_URLis configured - Run
npx prisma db pushto create database tables - Check if cookies are being blocked by your browser
Can I add other OAuth providers?
Yes! Auth.js supports many providers. Add them in src/lib/auth.ts:
import Discord from "next-auth/providers/discord";
providers: [
GitHub({ ... }),
Google({ ... }),
Discord({
clientId: process.env.DISCORD_CLIENT_ID,
clientSecret: process.env.DISCORD_CLIENT_SECRET,
}),
],
Billing & Payments
Why Gumroad + GitHub Invite?
ShipSecure uses the same delivery model as popular boilerplates:
- Customer purchases on Gumroad (provides GitHub username)
- You invite them to your private repository
- Customer accepts invite and clones the code
This approach is:
- Simple: No complex license verification code needed
- Secure: GitHub handles access control
- Proven: A reliable and industry-standard delivery method
How do I deliver the code to customers?
- Set up a custom field in Gumroad for "GitHub Username" (required)
- When someone purchases, you receive their GitHub username
- Add them as a collaborator to your private repository
- Customer accepts the invite and can clone the code
See Billing & Payments for detailed setup instructions.
Can I use Stripe instead?
For subscriptions (monthly/yearly), yes! The database schema includes fields for Stripe:
model User {
// ...
customerId String? // Stripe Customer ID
subscriptionId String? // Stripe Subscription ID
}
Stripe integration is on our roadmap - see Roadmap.
Database
Which databases are supported?
ShipSecure uses PostgreSQL via Prisma. Recommended cloud options:
- Supabase - Free tier, managed PostgreSQL
- Neon - Serverless PostgreSQL, free tier
- Railway - Simple setup, free tier
- PlanetScale - MySQL (requires schema changes)
How do I add new database models?
- Edit
prisma/schema.prisma - Run
npx prisma db push(development) - Run
npx prisma generate
See Database & Prisma for examples.
Should I use db push or migrate?
npx prisma db push: Quick development, no migration historynpx prisma migrate dev: Production, team projects, version control
For production deployments, always use npx prisma migrate deploy.
How do I view my database?
npx prisma studio
Opens a visual database browser at http://localhost:5555.
Security
What security features are included?
- Security Headers: CSP, HSTS, X-Frame-Options, etc.
- Rate Limiting: API protection (60 req/min, 20 for auth)
- Input Validation: Zod schemas for all inputs
- CSRF Protection: Built into Auth.js
- SQL Injection Prevention: Prisma ORM
All security features are tested with TDD. See Security Features.
Do I need to configure security headers?
No! Security headers are automatically applied to all responses via middleware. You can customize them in src/lib/security/headers.ts if needed.
How does rate limiting work?
- Uses Upstash Redis in production (required for serverless)
- Falls back to in-memory storage in development
- Configure limits in
src/middleware.ts
Is ShipSecure PCI/SOC2/HIPAA compliant?
ShipSecure provides security best practices, but compliance requires additional measures specific to your use case:
- PCI: Don't store card data - use Stripe/Gumroad
- SOC2: Requires audit procedures and documentation
- HIPAA: Requires BAA agreements and specific configurations
Deployment
Where can I deploy ShipSecure?
Any platform that supports Next.js:
- Vercel (recommended) - Best Next.js support
- Netlify -
netlify.tomlincluded - Railway - Easy database setup
- Fly.io, Render, DigitalOcean, etc.
See Deployment Guide.
What environment variables do I need in production?
Required:
DATABASE_URL=postgresql://...
AUTH_SECRET=your-production-secret
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
Recommended:
UPSTASH_REDIS_REST_URL=...
UPSTASH_REDIS_REST_TOKEN=...
NEXT_PUBLIC_APP_URL=https://your-domain.com
# RESEND_API_KEY=... (if using email features)
Do I need to update OAuth callback URLs?
Yes! After deploying, update callback URLs in your OAuth provider settings:
- GitHub:
https://your-domain.com/api/auth/callback/github - Google:
https://your-domain.com/api/auth/callback/google
Customization
How do I change the app name and branding?
Edit src/config/site.ts:
export const siteConfig = {
name: "YourAppName",
title: "YourAppName - Your Tagline",
description: "Your app description",
// ...
};
See Customization Guide.
How do I customize the landing page?
Edit src/config/marketing.ts to change:
- Hero section text
- Features list
- Pricing plans
How do I change colors?
Edit src/app/globals.css:
:root {
--primary: 142 71% 45%; /* Your primary color (HSL) */
--secondary: 217 33% 17%;
}
Testing
What testing tools are included?
- Vitest - Unit and integration tests
- Playwright - End-to-end tests
- React Testing Library - Component tests
How do I run tests?
# Unit tests
npm test
# E2E tests
npm run test:e2e
# Watch mode
npm run test:watch
See Testing Guide.
Are there example tests?
Yes! Check src/lib/security/__tests__/ for examples of:
- Security headers tests
- Rate limiting tests
- Input validation tests
Troubleshooting
Build fails with TypeScript errors
# Check for type errors
npm run type-check
# Or
npx tsc --noEmit
ESLint errors blocking development
# Fix auto-fixable issues
npm run lint -- --fix
Prisma Client not found
npx prisma generate
"Invalid token" or CSRF errors
- Clear browser cookies
- Sign out and sign back in
- Verify
AUTH_SECREThasn't changed
Getting "Too Many Requests" error
Rate limit is working! Wait 1 minute or:
- Increase limits in
src/middleware.tsfor development - Configure Upstash Redis for production
Updates & Support
How do I get updates?
Check the GitHub repository for new releases. You can pull updates manually:
git remote add upstream https://github.com/hasankemaldemirci/shipsecure.git
git fetch upstream
git merge upstream/main
Note: Resolve conflicts carefully to keep your customizations.
Where can I get help?
- Documentation: You're reading it!
- GitHub Issues: Report bugs or request features
- Email: support@shipsecure.dev
Can I use ShipSecure for multiple projects?
Your purchase includes a commercial license for unlimited projects. Build as many products as you want!
Still Have Questions?
If your question isn't answered here:
- Check the specific documentation pages
- Search the GitHub repository for similar issues
- Contact support at support@shipsecure.dev
Happy building!