- Multi-tenant client management with unique API keys - Semaphore SMS integration (per-client key + sender name + credit balance) - DB-based SMS queue with 3-attempt retry and exponential backoff - Failed SMS dashboard with manual retry button - Reports page with date/client filter and CSV export - Admin auth via NextAuth (email/password) - Docker Compose setup (app + PostgreSQL 16) - Prisma 5 schema with SmsQueue, SmsLog, Client, User models Tech: Next.js 14 App Router + TypeScript + Tailwind CSS + Prisma + PostgreSQL
10 lines
284 B
TypeScript
10 lines
284 B
TypeScript
import { redirect } from 'next/navigation'
|
|
import { getServerSession } from 'next-auth'
|
|
import { authOptions } from '@/lib/auth'
|
|
|
|
export default async function Home() {
|
|
const session = await getServerSession(authOptions)
|
|
if (session) redirect('/dashboard')
|
|
redirect('/login')
|
|
}
|