PlintoDocs

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

Featured
Next.js 14TypeScriptTailwind CSSPrisma
Advanced

React Dashboard

Modern admin dashboard with role-based access control and real-time updates

Featured
React 18TypeScriptViteTanStack Query
Intermediate

Framework Examples

Next.js App Router

Modern Next.js app with App Router, server components, and middleware

Next.js 14TypeScriptApp Router
Beginner

Next.js Pages Router

Traditional Next.js setup with Pages Router and API routes

Next.js 13TypeScriptPages Router
Beginner

React + Vite SPA

Single-page application with React Router and modern tooling

React 18ViteReact Router
Beginner

Vue 3 + Nuxt

Full-stack Vue application with Nuxt 3 and server-side rendering

Vue 3Nuxt 3TypeScript
Intermediate

Express API

Node.js REST API with Express and authentication middleware

ExpressNode.jsTypeScript
Intermediate

FastAPI Backend

Python API with FastAPI, async/await, and OpenAPI documentation

FastAPIPythonPydantic
Intermediate

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
Next.jsStripePrismaPostgreSQL

SaaS Application

Multi-tenant SaaS with organizations, billing, and feature flags

Features:

  • Organizations
  • RBAC
  • Billing
  • Feature Flags
Next.jsStripeVercelPlanetScale

Social Platform

Social networking app with user profiles, posts, and real-time chat

Features:

  • User Profiles
  • Posts & Comments
  • Real-time Chat
  • File Uploads
ReactSocket.ioMongoDBCloudinary

Project Management

Team collaboration tool with projects, tasks, and time tracking

Features:

  • Team Management
  • Projects & Tasks
  • Time Tracking
  • Notifications
VueNuxtSupabaseTailwind

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

Next.jsReactVueExpress
npx create-plinto-app my-app

Vercel Template

One-click deployment template for Vercel

Next.js
Deploy with VercelDeploy Now

Netlify Template

One-click deployment template for Netlify

ReactVue
Deploy to NetlifyDeploy Now

Community Examples

Community examples are built and maintained by the Plinto community. Want to add your example? Contact us or submit a PR!

Svelte SPA

SvelteKit application with authentication

by @johndoe

Community
SvelteSvelteKitTypeScript
View Code

Angular Dashboard

Angular admin dashboard with guards and services

by @janedoe

Community
AngularTypeScriptRxJS
View Code

Was this helpful?