Backend Setup
Transform your frontend templates into full-stack applications with backend services.
Overview
Most of our self-hosted templates are frontend-only, designed to be lightweight and easy to deploy. However, to unlock the full potential of your Next.js applications, you'll likely want to add backend functionality.
This guide covers the most popular backend services you can integrate with your templates to add features like user authentication, data storage, email functionality, and more.
Don't want to set up backend services? Check out our Applications category for ready-to-use solutions with backend functionality already configured.
Authentication
Add user authentication to enable login, registration, and user management in your applications.
Firebase Auth
Firebase Authentication provides backend services and SDKs to authenticate users in your app.
- • Email/password, phone, and social provider authentication
- • Built-in security features and user management
- • Generous free tier with 10,000 monthly active users
npm install firebase
Supabase Auth
Supabase provides authentication that works seamlessly with PostgreSQL database.
- • Row Level Security (RLS) for data protection
- • Social logins and magic link authentication
- • Real-time subscriptions and instant APIs
npm install @supabase/supabase-js
NextAuth.js
NextAuth.js is designed specifically for Next.js applications with minimal configuration.
- • 50+ built-in providers (Google, GitHub, etc.)
- • Database adapters for popular databases
- • JWT and database sessions support
npm install next-auth
Clerk
Clerk provides beautiful, customizable UI components for authentication flows.
- • Pre-built sign-in/sign-up components
- • User profile management and organization features
- • Advanced security features and analytics
npm install @clerk/nextjs
Database & Storage
Add data persistence and file storage capabilities to your applications.
Supabase Database
Supabase provides a PostgreSQL database with real-time subscriptions and instant APIs.
- • Auto-generated REST and GraphQL APIs
- • Real-time subscriptions for live data
- • Built-in storage for files and images
npm install @supabase/supabase-js
Neon
Neon provides a serverless PostgreSQL database with Git-like branching for development workflows.
- • Database branching for development and testing
- • Automatic scaling and connection pooling
- • Compatible with existing PostgreSQL tools
npm install @neondatabase/serverless
Firebase Firestore
Firestore is a flexible, scalable NoSQL database with real-time synchronization.
- • Real-time synchronization across devices
- • Offline support with automatic sync
- • Powerful querying and indexing
npm install firebase
PlanetScale
PlanetScale provides a serverless MySQL database with Git-like branching for schema changes.
- • Database branching for safe schema changes
- • Automatic scaling and connection pooling
- • Compatible with existing MySQL tools
npm install @planetscale/database
Alternative: Applications
If setting up backend services seems overwhelming, consider our ready-to-use applications instead. These come with backend functionality already configured and hosted for you.
- • Forums and community platforms
- • Support ticket systems
- • CRM and customer management tools
- • E-commerce and marketplace solutions