A full-stack social media platform for creators to share, collaborate, and monetize their digital content with end-to-end encrypted chat and integrated payments.
DreamDot empowers creators to publish and monetize their art, writings, and thoughts in one unified platform. Whether you're a digital artist, indie author, blogger, or creative thinker β DreamDot offers the tools to connect, share, and earn from your creativity.
- Posts & Feeds: Share updates, images, and content with followers
- Comments & Likes: Engage with community content
- Following System: Follow creators you love
- Blocking: Control who can interact with you
- User Profiles: Customizable profiles with avatars, banners, and bios
- Communities: Create and join groups
- Digital Items: Upload and sell digital downloads
- Writings: Publish articles, blogs, and stories with rich text editor
- Digital Art: Share and sell illustrations, photography, and designs
- Comics: Create and publish webcomics, manga, and graphic novels
- Monetization Options:
- Free content
- One-time purchase
- Subscription-based access
- Private Messages: 1-on-1 encrypted conversations
- Community Chats: Group conversations with E2EE
- Media Sharing: Send encrypted images, videos, and audio
- Real-time: Instant delivery with typing indicators
- Zero Knowledge: Server never sees message content
- Socket.IO: WebSocket-based real-time communication
- Stripe Integration: Secure payment processing
- Balance Management:
- Initial balance: $50,000 for all new users (non-redeemable)
- Replenish balance: Add funds via Stripe checkout
- Redeem balance: Withdraw earned funds only
- Transaction History: Track all payments
- Credit System: Use credits for marketplace purchases
- Engagement insights
- Earnings dashboard
- Follower growth metrics
| Layer | Technologies |
|---|---|
| Frontend | Next.js 15 (App Router), TypeScript, Tailwind CSS 4, shadcn/ui, Quill.js |
| Backend | Next.js API Routes, Express.js, Socket.IO, Prisma ORM, NextAuth.js |
| Databases | PostgreSQL (5 schemas), MongoDB (chat & content) |
| Auth | |
| Encryption | Web Crypto API, TweetNaCl (E2EE chat) |
| Payments | Stripe |
| Media | ImageKit |
| Real-time | Socket.IO |
-
Users Database (
POSTGRESS_DB_USER)- Authentication, profiles, user analytics
- Security, sessions, certificates
-
Social Database (
POSTGRESS_DB_SOCIAL)- Posts, comments, likes
- Following/blocking relationships
- Notifications
-
Items Database (
POSTGRESS_DB_ITEMS)- Item metadata, transactions, reviews
- Favorites, collections, monetization
-
Community Database (
POSTGRESS_DB_COMMUNITY)- Communities, memberships
- Community posts and discussions
-
Audit Database (
POSTGRESS_DB_AUDIT)- Admin logs, system events
- Audit trails
- Chat: Conversations, encrypted messages
- Content: Full item content (writings, art, comics)
- Transactions: Payment transaction details
- Node.js 20.0.0 or higher
- npm 10.0.0 or higher
- MongoDB (Atlas recommended)
- PostgreSQL (Neon recommended)
- Stripe account (for payments)
- ImageKit account (for media)
# Clone the repo
git clone https://github.com/yourusername/dreamdot.git
cd dreamdot
# Install dependencies (this automatically generates Prisma clients via postinstall)
npm install
# Set up environment variables
cp .env .env.local # Or edit .env directly
# Edit the .env file with your credentials
# See below for all required variables
# Push database schemas (first time only)
cd apps/web
npx prisma db push --schema=src/lib/prisma/schema.user.prisma
npx prisma db push --schema=src/lib/prisma/schema.social.prisma
npx prisma db push --schema=src/lib/prisma/schema.item.prisma
npx prisma db push --schema=src/lib/prisma/schema.community.prisma
npx prisma db push --schema=src/lib/prisma/schema.audit.prisma
# Return to root and start all services
cd ../..
npm run dev:allThe application will be available at:
- Web App: http://localhost:5000
- Chat Server: http://localhost:3001
- Payment Service: http://localhost:3002
- Architecture Guide - Detailed system architecture and design decisions
- Integration Guide - Step-by-step setup and integration instructions
- Environment Variables - Configuration reference
dreamdot/
βββ apps/
β βββ web/ # Next.js frontend application
β β βββ src/
β β β βββ app/ # Next.js App Router pages & API routes
β β β β βββ api/ # Backend API routes
β β β β β βββ auth/ - Authentication
β β β β β βββ social/ - Follow, block, comments
β β β β β βββ items/ - Marketplace items
β β β β β βββ posts/ - Social posts
β β β β βββ (pages)/ - Frontend pages
β β β βββ lib/ # Utilities and database clients
β β β βββ mongoose/ - MongoDB models
β β β β βββ models/
β β β β βββ Writing.js
β β β β βββ DigitalArt.js
β β β β βββ Comic.js
β β β β βββ Item.js
β β β βββ prisma/ - PostgreSQL schemas
β β βββ components/ # React components
β β βββ ui/ - shadcn/ui components
β β βββ rich-text-editor.tsx
β β βββ balance-management.tsx
β β βββ create-content.tsx
β βββ chat/ # Socket.IO chat server
β β βββ src/
β β βββ controllers/
β β βββ models/
β β βββ services/
β β βββ socket.ts
β βββ payment/ # Stripe payment service
β βββ src/
β βββ routes/
β β βββ payment.js - Payment endpoints
β β βββ webhook.js - Stripe webhooks
β βββ models/
β β βββ Transaction.js - Transaction model
β βββ server.js
βββ packages/
β βββ ui/ # Shared UI components
β βββ typescript-config/# TypeScript configurations
β βββ eslint-config/ # ESLint configurations
βββ ARCHITECTURE.md # Architecture documentation
βββ INTEGRATION_GUIDE.md # Setup guide
βββ .env.example # Environment variables template
# Terminal 1: Next.js App
npm run dev
# Terminal 2: Chat Server
npm run chat:dev
# Terminal 3: Payment Service
npm run payment:dev# Build all apps
npm run build
# Build specific app
npm run build --workspace=apps/web- Next.js App: Vercel or Replit Autoscale
- Chat Server: Railway, Render, or VPS
- Payment Service: Railway, Render, or VPS
- MongoDB: MongoDB Atlas
- PostgreSQL: Neon, Supabase, or managed PostgreSQL
See INTEGRATION_GUIDE.md for detailed deployment instructions.
- End-to-End Encryption: Chat messages encrypted with Web Crypto API
- Password Hashing: bcrypt with salts
- JWT Authentication: Secure session management
- CORS Protection: Configured allowed origins
- Input Validation: All user inputs sanitized
- Stripe Integration: PCI-compliant payment processing
- Balance Separation: Initial vs. redeemable balance
POST /api/auth/signup - Register new user
POST /api/auth/signin - Login
GET /api/auth/me - Get current user
POST /api/social/follow - Follow user
DELETE /api/social/follow - Unfollow user
POST /api/social/block - Block user
DELETE /api/social/block - Unblock user
POST /api/social/comments - Create comment
GET /api/social/comments - Get comments
DELETE /api/social/comments - Delete comment
POST /api/posts/create - Create post
POST /api/items/create - Create item (writing/art/comic/digital)
GET /api/items/[id] - Get item details
PUT /api/items/[id] - Update item
DELETE /api/items/[id] - Delete item
POST /api/payment/create-checkout-session - Start Stripe checkout
POST /api/payment/redeem-balance - Redeem earned funds
GET /api/payment/transactions/:userId - Get transaction history
POST /webhook/stripe - Stripe webhook handler
send_message - Send encrypted message
message - Receive encrypted message
typing - User is typing
presence - User online/offline status
message_ack - Message acknowledgment
All services (Web App, Chat Server, Payment Service) use the same root .env file for configuration.
NEXTAUTH_SECRET- NextAuth secret keyJWT_SECRET- JWT token secret (shared across all services)MONGO_CLUSTER- MongoDB connection string (used by all services)POSTGRESS_DB_*- PostgreSQL database URLs (5 databases for web app)IMAGEKIT_*- ImageKit credentials (for web app media uploads)STRIPE_SECRET_KEY- Stripe API key (payment service)STRIPE_WEBHOOK_SECRET- Stripe webhook secret (payment service)NEXT_PUBLIC_CHAT_SERVER_URL- Chat server URL (web app)NEXT_PUBLIC_PAYMENT_SERVER_URL- Payment server URL (web app)CORS_ORIGIN- Allowed origins (chat and payment services)CLIENT_URL- Frontend URL (payment service)
DreamDot supports Google and GitHub OAuth authentication via NextAuth. OAuth providers are disabled by default and can be enabled via feature flags.
-
Set up OAuth credentials:
- Google: Get credentials from Google Cloud Console
- GitHub: Get credentials from GitHub Developer Settings
-
Add credentials to
.env:# Google OAuth GOOGLE_CLIENT_ID="your_google_client_id" GOOGLE_CLIENT_SECRET="your_google_client_secret" # GitHub OAuth GITHUB_ID="your_github_client_id" GITHUB_SECRET="your_github_client_secret"
-
Enable OAuth providers with feature flags:
# Server-side feature flags (for NextAuth) GOOGLE_OAUTH_ENABLED="true" # Set to "true" to enable Google OAuth GITHUB_OAUTH_ENABLED="true" # Set to "true" to enable GitHub OAuth # Client-side feature flags (for UI buttons) NEXT_PUBLIC_GOOGLE_OAUTH_ENABLED="true" NEXT_PUBLIC_GITHUB_OAUTH_ENABLED="true"
-
Configure OAuth callback URLs:
- Google: Add
http://localhost:5000/api/auth/callback/google(dev) and your production URL - GitHub: Add
http://localhost:5000/api/auth/callback/github(dev) and your production URL
- Google: Add
-
Restart the development server for changes to take effect.
- Server-side flags (
GOOGLE_OAUTH_ENABLED,GITHUB_OAUTH_ENABLED): Control whether providers are registered in NextAuth - Client-side flags (
NEXT_PUBLIC_GOOGLE_OAUTH_ENABLED,NEXT_PUBLIC_GITHUB_OAUTH_ENABLED): Control whether OAuth buttons appear in the UI - Both flags must be set to
"true"for OAuth to work - Setting flags to
"false"or omitting them disables OAuth entirely
DreamDot is more than a platform β it's a canvas for the dreamers. We believe in building a creative economy where expression meets ownership, and where your passion can power your livelihood.
- Social media features (posts, comments, likes)
- Follow/unfollow system
- Block/unblock functionality
- Marketplace with multiple item types
- Rich text editor for writings
- End-to-end encrypted chat
- Payment system with Stripe
- Balance management (replenish/redeem)
- Mobile applications
- Video streaming
- AI-powered recommendations
- Advanced analytics dashboard
- Multi-language support
- Subscription tiers for creators
- Advanced moderation tools
This is a private project. For questions or issues, contact the development team.
All rights reserved.
For support and questions:
- Check the Integration Guide
- Review the Architecture Documentation
- Consult the Environment Variables
- Contact the development team
Built with β€οΈ using Next.js, Socket.IO, and Stripe