PromptStack

Chat or real-time app

A product where the screen updates as things happen: channels and direct messages, presence, typing indicators, read receipts, and message history. Real-time delivery is the core requirement.

You can change every choice once the builder opens.
Core features for the MVP
  • Channels and direct message conversations
  • Real-time message delivery with optimistic local echo
  • Presence showing who is online
  • Typing indicators and read receipts
  • Message history with pagination and search
  • File and image attachments
  • Reconnect handling that backfills anything missed while offline
  • Unread counts and push notifications
Left for later
  • Threaded replies and reactions
  • Message editing and deletion with an edit history
  • Voice or video calling
  • Moderation tooling and reporting

Recommended stack

SectionRecommended
LanguageTypeScript
Frontend frameworkNext.js
UI and stylingTailwind CSSshadcn/ui
BackendNext.js server
API styletRPC
Database enginePostgreSQL
Database providerSupabase
ORM and data accessDrizzle
CachingUpstash Redis
AuthenticationClerk
Authorization and rolesRole-based access control
SecurityInput validationRate limitingCORS and CSRF protectionSecurity headers and CSPSecrets management
File storageAWS S3
Real-timeSupabase Realtime
Background jobs and cronInngest
Email and notificationsWeb push notifications
Hosting and deploymentVercel
CI/CDGitHub Actions
Monitoring and analyticsSentryBetter Stack
TestingVitestPlaywright
ExtrasAccessibility (WCAG)PWA and offlineBackupsDocumentation

Data model draft

Conversation

A channel or a direct message thread.

  • id
  • type
  • name
  • topic
  • isPrivate
  • createdById
  • createdAt
  • Has many Messages
  • Has many ConversationMembers
Message

One message. Stored durably, then broadcast.

  • id
  • conversationId
  • senderId
  • body
  • clientGeneratedId
  • attachmentIds
  • sentAt
  • editedAt
  • deletedAt
  • Belongs to one Conversation
  • Belongs to one User as sender
ConversationMember

A user's membership of a conversation, and how far they have read.

  • id
  • conversationId
  • userId
  • role
  • lastReadMessageId
  • joinedAt
  • Belongs to one Conversation
  • Belongs to one User
User

A participant, with their presence state.

  • id
  • authProviderId
  • displayName
  • avatarUrl
  • presenceStatus
  • lastSeenAt
  • Has many Messages
  • Has many ConversationMembers