Closegram
Closegram is a social media platform focused on close-knit connections. It supports posts with multiple media types, real-time messaging, voice/video calls, stories, coin monetization, and creator subscriptions.
Monorepo structure
Turborepo with npm workspaces:
| Path | Description |
|---|---|
apps/frontend-nextjs | Main web app (Next.js 14, port 3001) |
apps/frontend-public | Legacy React app (CRA) |
apps/backend | GraphQL API (Apollo Server + Express) |
apps/ios | Native iOS app |
apps/docs | This documentation site (port 3003) |
Shared packages
| Package | Description |
|---|---|
packages/graphql | Single source of truth — GraphQL schema (schema.web/schema.admin) + operations (Web/, Admin/) |
packages/apollo-web | Generated TS client @closegram/apollo-web for frontend-nextjs |
packages/apollo-admin | Generated TS client @closegram/apollo-admin for frontend-admin |
packages/apollo-swift | Generated Swift ClosegramGraphQL module for apps/ios |
packages/tailwind-config | Shared Tailwind configuration |
packages/typescript-config | Shared TypeScript configuration |
packages/eslint-config | Shared ESLint rules |
Running the project
# All apps in parallel
npm run dev
# Main frontend only
cd apps/frontend-nextjs && npm run dev
# Docs only
cd apps/docs && npm run dev
Before running the backend or frontend, you'll need to configure their .env files — see Environment Setup for the full variable reference and Obtaining API Keys for step-by-step instructions on getting real keys from Firebase, Google, Apple, Stripe, AWS, and the rest.
Tech stack
- Frontend: Next.js 14 (App Router), React 18, Tailwind CSS
- API: GraphQL via Apollo Client (HTTP + WebSocket)
- Auth: Firebase + Apple Sign-In + Phone OTP
- Payments: Stripe
- i18n: i18next / react-i18next (EN, ES)
- Real-time: GraphQL Subscriptions (WebSocket)
- Push: Firebase Cloud Messaging (FCM) + VoIP (iOS)
- Monorepo: Turborepo + npm workspaces
Feature map
| Feature | Status |
|---|---|
| Authentication (email, Apple, Google, phone OTP) | ✅ |
| Posts with multiple media and reactions | ✅ |
| Real-time messaging with rich message types | ✅ |
| Voice and video calls (LiveKit WebRTC) | ✅ |
| Coins, tips, and coin packages | ✅ |
| Paid messages (unlock price) | ✅ |
| Creator subscriptions and subscription-gated conversations | ✅ |
| Exclusive (coin-gated) posts | ✅ |
| Post collaborators and promotions | ✅ |
| Stories and live streams (LiveKit) | ✅ |
| Notifications (push, email, SMS) | ✅ |
| Saved posts and collections | ✅ |
| Hashtags and trending | ✅ |
| 2FA (TOTP) and session management | ✅ |
| Content reporting and auto-moderation rules | ✅ |
| Data export (GDPR portability) | ✅ |
| Account verification (typed badges) | ✅ |
| Favorite users list | ✅ |
| Location and nearby users | ✅ |
| Contacts import and suggestions | ✅ |
| User feedback and voting | ✅ |
| Break mode and memorialization | ✅ |
| Admin panel (dashboard, moderation, analytics) | ✅ |
| iOS app (MVVM + Redux + Clean Architecture) | ✅ |