← All templates

Social Media Feed

Content & Social · React + Node (Express) · 22 @molecule/* packages

Instagram-like social with posts, stories, followers, and feed — with built-in Stripe-backed subscription tiers

Open in Molecule

What is inside

  • auth
  • feed
  • stories
  • followers
  • likes
  • comments
  • image-upload
  • realtime
  • push-notifications
  • subscriptions

Screens (14)

  • Landing /
  • Login /login
  • Signup /signup
  • ForgotPassword /forgot-password
  • ResetPassword /reset-password
  • Feed /feed (signed in)
  • Profile /profile/:handle (signed in)
  • PostDetail /posts/:id (signed in)
  • Explore /explore (signed in)
  • Messages /messages (signed in)
  • Notifications /notifications (signed in)
  • Settings /settings (signed in)
  • Search /search (signed in)
  • Pricing /pricing

Data model (17 tables)

  • activities — id, actorId, action, resourceType, resourceId, metadata, createdAt
  • activity_seen_status — userId, lastSeenActivityId, updatedAt
  • bookmarks — id, userId, resourceType, resourceId, folder, createdAt, updatedAt
  • comments — id, resourceType, resourceId, userId, parentId, body, editedAt, createdAt, …
  • devices — id, createdAt, updatedAt, userId, name, pushPlatform, pushSubscription, hasPushSubscription
  • dm_messages — id, dm_thread_id, sender_id, content, media_url, seen_at, created_at
  • dm_threads — id, user_a_id, user_b_id, last_message_at, created_at
  • follows — id, followerId, targetType, targetId, createdAt, updatedAt
  • moderation_reports — id, reporter_id, target_type, target_id, reason, status, resolution, resolved_by, …
  • notifications — id, user_id, type, actor_id, target_type, target_id, body, href, …
  • post_comments — id, post_id, user_id, parent_id, body, created_at, updated_at
  • post_likes — id, post_id, user_id, created_at
  • posts — id, user_id, caption, media_urls, thumbnail_url, hashtags, location, visibility, …
  • reactions — id, resourceType, resourceId, userId, type, createdAt, updatedAt
  • stories — id, user_id, media_url, caption, view_count, visibility, created_at, expires_at
  • story_views — id, story_id, viewer_id, viewed_at
  • user_follows — id, follower_id, following_id, created_at

API (9 handlers)

  • \_notify api/src/handlers/_notify.ts
  • feed api/src/handlers/feed.ts
  • follows api/src/handlers/follows.ts
  • messages api/src/handlers/messages.ts
  • moderation api/src/handlers/moderation.ts
  • notifications api/src/handlers/notifications.ts
  • posts api/src/handlers/posts.ts
  • stories api/src/handlers/stories.ts
  • users api/src/handlers/users.ts

Subscription tiers

free / pro / team — gated by: maxFollows, maxPosts, maxStories, advancedFeatures, canExport, retentionDays

Built from 22 @molecule/* packages

Browse all @molecule/* packages →

Required secrets

  • DATABASE_URL PostgreSQL connection string
  • S3_BUCKET S3 bucket for media uploads
  • S3_ACCESS_KEY_ID S3 access key
  • S3_SECRET_ACCESS_KEY S3 secret key
  • VAPID_PUBLIC_KEY VAPID public key for push notifications
  • VAPID_PRIVATE_KEY VAPID private key for push notifications

The @molecule/* packages are Apache-2.0. The app you build from this template is yours to export and self-host. Licensing