All implementations
Next.js + Prisma + Postgres
structuralNext.js 15 (App Router) backed by Prisma/Postgres. Realtime delivered via Pusher Channels to avoid long-lived connections on serverless. Clerk for auth.
For spec: Slack-like Messaging App
Frontend
Next.js 15 (App Router)
Backend
Next.js route handlers
Database
Postgres (Neon)
ORM
Prisma
Auth
Clerk
Hosting
Vercel
realtime
Pusher Channels
6 tables5 routes3 modules6 packages7 env vars4 features uncovered
Packages
next^15prisma^5@prisma/client^5@clerk/nextjs^6pusher— Server-side event publishingpusher-js— Client subscriptionEnvironment
DATABASE_URLrequiredCLERK_SECRET_KEYrequiredNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYrequiredPUSHER_APP_IDrequiredPUSHER_KEYrequiredPUSHER_SECRETrequiredFeature implementations
File Storage
file-storageVercel Blob for uploads; Attachment row per file.
Tables
Attachment4 fieldsidStringmessageIdStringurlStringmimeString
Env vars
BLOB_READ_WRITE_TOKEN *
Messaging
messagingChannels + DMs via a single Message model; Pusher events on write.
Tables
Message7 fieldsidStringchannelIdString?recipientIdString?senderIdStringcontentStringparentIdString?createdAtDateTime
Channel3 fieldsidStringnameStringisPrivateBoolean
Routes
GET
/c/[channelId]app/c/[channelId]/page.tsx
POST
/api/messagesapp/api/messages/route.ts
Modules
lib/pusher/server.ts— pusher.trigger(channel, event, data)lib/pusher/client.ts— useChannel hook
Notifications
notificationsNotifications piggy-back on Pusher private channels per user.
Tables
Notification5 fieldsidStringuserIdStringkindStringpayloadJsonreadAtDateTime?
Routes
GET
/api/notificationsSearch
searchPostgres tsvector column with a GIN index + a simple /search page.
Tables
MessageExtended with a content_tsv generated column
Routes
GET
/searchUser System & Auth
user-systemClerk handles sessions + UI. Local User row mirrored via webhook.
Tables
User4 fieldsidStringclerkIdStringemailStringnameString?
Routes
POST
/api/webhooks/clerkapp/api/webhooks/clerk/route.ts
Modules
lib/auth.ts— currentUser() wrapper + org helpers
Uncovered features
The spec includes features this implementation doesn't describe. Contributions welcome.
Roles & PermissionsAudit LoggingRate Limiting & Abuse PreventionOnboarding & Activation