Examples & Templates
Complete sample applications and code snippets to help you integrate Plinto quickly. Copy, customize, and deploy in minutes.
Featured Examples
Next.js SaaS Starter
Complete SaaS application with authentication, organizations, billing, and admin dashboard
Framework Examples
Next.js App Router
Modern Next.js app with App Router, server components, and middleware
Next.js Pages Router
Traditional Next.js setup with Pages Router and API routes
React + Vite SPA
Single-page application with React Router and modern tooling
Vue 3 + Nuxt
Full-stack Vue application with Nuxt 3 and server-side rendering
Express API
Node.js REST API with Express and authentication middleware
Use Case Examples
E-commerce Store
Complete online store with user accounts, order management, and payment integration
Features:
- User Registration
- Shopping Cart
- Order History
- Admin Panel
SaaS Application
Multi-tenant SaaS with organizations, billing, and feature flags
Features:
- Organizations
- RBAC
- Billing
- Feature Flags
Social Platform
Social networking app with user profiles, posts, and real-time chat
Features:
- User Profiles
- Posts & Comments
- Real-time Chat
- File Uploads
Code Snippets
Protect API Route
Secure your API endpoints with middleware
export async function GET(request: NextRequest) {
const session = await plinto.getSession(request)
if (!session) {
return new Response('Unauthorized', { status: 401 })
}
return Response.json({ user: session.user })
}
Login Component
React component for user authentication
export function LoginForm() {
const { signIn, loading } = usePlinto()
const handleSubmit = async (e) => {
e.preventDefault()
await signIn({ email, password })
}
return <form onSubmit={handleSubmit}>...</form>
}
Protected Route
Client-side route protection
export function ProtectedRoute({ children }) {
const { user, loading } = usePlinto()
if (loading) return <Loading />
if (!user) return <Navigate to="/login" />
return children
}
User Profile
Display and update user information
export function UserProfile() {
const { user, updateProfile } = usePlinto()
const handleUpdate = async (data) => {
await updateProfile(data)
}
return <ProfileForm user={user} onUpdate={handleUpdate} />
}
Starter Templates
create-plinto-app
CLI tool to scaffold new applications with Plinto authentication
npx create-plinto-app my-app
Vercel Template
One-click deployment template for Vercel
Deploy with Vercel
Deploy NowNetlify Template
One-click deployment template for Netlify
Deploy to Netlify
Deploy NowCommunity Examples
Community examples are built and maintained by the Plinto community. Want to add your example? Contact us or submit a PR!