Deploy InnerLink: nextjs better-auth postgres

AI powered Therapy with AI-Human Therapist

Deploy InnerLink: nextjs better-auth postgres

/var/lib/postgresql/data

nextjs better-auth

vivekvt/InnerLink

Just deployed

Next.js Better Auth + AI Template πŸš€

Complete Authentication Starter with AI-Powered Demo App

A production-ready Next.js template featuring Better Auth, PostgreSQL, and a full InnerLink AI Therapy App as a reference implementation.

Next.js Better Auth PostgreSQL AI

✨ Features

  • πŸ” Complete Auth System - Login, signup, verification, profiles
  • πŸ€– AI Therapists - 6 specialized virtual therapists with HeyGen avatars
  • 🧘 Meditation Sessions - AI-powered guided meditation
  • πŸ’¬ Real-time Chat - Voice and text with streaming avatars
  • πŸ“± Responsive Design - Modern UI with Tailwind CSS + Radix UI
  • πŸ›‘οΈ Security First - Secure sessions and data handling
  • πŸ“Š Database Ready - Pre-configured PostgreSQL schema

Deploy and Host

Deploy on Railway

This template is optimized for Railway deployment with one-click setup including:

  • PostgreSQL database provisioning
  • Environment variable configuration
  • Automatic SSL certificates
  • Custom domain support

About Hosting

Railway Advantages

  • πŸš€ Zero Config Deployment - Deploy directly from GitHub
  • πŸ“Š Managed PostgreSQL - Automatic database setup and backups
  • πŸ”§ Environment Management - Secure variable handling
  • πŸ“ˆ Auto Scaling - Handle traffic spikes automatically
  • πŸ’° Cost Effective - Pay only for what you use
  • πŸ”’ Enterprise Security - SOC 2 compliant infrastructure

Infrastructure Requirements

  • Database: PostgreSQL 14+ for user data and sessions
  • Runtime: Node.js 18+ for Next.js application
  • Memory: 512MB minimum for AI avatar streaming
  • Storage: Minimal (stateless application)

Why Deploy

🎯 For Developers

  • Quick Start: Get authentication working in minutes, not hours
  • Best Practices: See production-ready patterns and security
  • AI Integration: Learn how to integrate HeyGen avatars and OpenRouter
  • Type Safety: Full TypeScript implementation with Drizzle ORM

πŸš€ For Startups

  • MVP Ready: Ship user authentication and AI features fast
  • Scalable Foundation: Built on modern, performant technologies
  • Customizable: Easy to modify for your specific use case
  • Production Tested: Security and performance optimized

πŸ“š For Learning

  • Modern Stack: Next.js 15, Better Auth, Drizzle ORM
  • AI Implementation: Real-world AI avatar and chat integration
  • Full-Stack Example: Complete app from auth to AI features

Common Use Cases

πŸ€– AI-Powered Applications

  • Mental Health Apps - Therapy bots, meditation guides
  • Education Platforms - AI tutors, language learning
  • Customer Support - Virtual assistants, help desks
  • Healthcare - Symptom checkers, wellness coaching

πŸ” Authentication-Heavy Apps

  • SaaS Platforms - User dashboards, subscription management
  • Social Networks - Profile systems, content sharing
  • E-commerce - User accounts, order history
  • Content Management - Admin panels, user-generated content

πŸ’Ό Business Applications

  • Employee Portals - HR systems, internal tools
  • Client Dashboards - Project management, reporting
  • Booking Systems - Appointments, reservations
  • CRM Systems - Customer relationship management

Dependencies for

Deployment Dependencies

Core Application
{
  "next": "^15.4.5",
  "react": "19",
  "typescript": "^5",
  "better-auth": "^1.3.4",
  "drizzle-orm": "^0.44.4"
}
Database & ORM
{
  "postgres": "^3.4.7",
  "drizzle-kit": "^0.31.4",
  "drizzle-zod": "^0.8.2"
}
UI & Styling
{
  "tailwindcss": "^4.1.11",
  "@radix-ui/react-*": "^1.1.x",
  "class-variance-authority": "^0.7.1",
  "tailwind-merge": "^3.3.1"
}
AI & Communication
{
  "@heygen/streaming-avatar": "^2.0.16",
  "@openrouter/ai-sdk-provider": "^1.1.0",
  "ai": "^5.0.8",
  "resend": "^4.8.0"
}
Development Tools
{
  "eslint": "^9",
  "prettier-plugin-tailwindcss": "^0.6.14",
  "@types/node": "^24",
  "@types/react": "^19"
}

Runtime Dependencies

  • Node.js 18+ - Required for Next.js 15
  • PostgreSQL 14+ - Database for user data and sessions
  • Memory: 512MB+ - For AI avatar streaming and chat
  • Storage: 50MB+ - Application code and assets

External Service Dependencies

  • HeyGen API - For AI avatar streaming (optional)
  • OpenRouter API - For AI conversations (optional)
  • Resend - For email verification and notifications
  • Railway PostgreSQL - Managed database service

Development Dependencies

  • Git - Version control and Railway deployment
  • npm/yarn - Package management
  • Environment Variables - Configuration management

πŸ”§ Environment Variables

Required for Basic Auth

DATABASE_URL="postgresql://..."
BETTER_AUTH_SECRET="your-secret-key"
NEXT_PUBLIC_BASE_URL="https://yourapp.railway.app"
RESEND_API_KEY="your-resend-key"
SENDER_EMAIL="noreply@yourdomain.com"

Optional for AI Features

HEYGEN_API_KEY="your-heygen-key"
OPEN_ROUTER_KEY="your-openrouter-key"

πŸš€ Quick Start

  1. Deploy to Railway - Click the deploy button above
  2. Configure APIs - Add your email and AI service keys
  3. Access App - Visit your Railway-provided URL
  4. Customize - Modify avatars, prompts, and UI to fit your needs

πŸ› οΈ Tech Stack

  • Framework: Next.js 15 + App Router + Turbopack
  • Auth: Better Auth + Email Verification
  • Database: PostgreSQL + Drizzle ORM
  • UI: Tailwind CSS + Radix UI + Shadcn
  • AI: HeyGen Avatars + OpenRouter Chat
  • Email: Resend
  • Hosting: Railway Platform

πŸ“„ License

MIT License - Build amazing things!


🌟 Perfect for the Railway Hackathon - Deploy AI-powered apps in minutes!


Template Content

nextjs better-auth

vivekvt/InnerLink

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
NEW
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
MΓΆbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1