Dreamweave now centres on a TypeScript-first T3 stack: Next.js with tRPC, Prisma, and React Query. The Python FastAPI service has been retired in favour of a single Next.js application that owns both the UI and API surface. Docker Compose is provided for running the web stack locally with hot reload.
This repository contains confidential and proprietary information owned by Sepehr Mahmoudian. Access is limited to authorised collaborators for Dreamweave development. Do not share, distribute, or reuse any portion of these materials without explicit written permission from the owner.
- Added a dedicated Dreamweave “Worlds & Environments” composer that turns prompts or multi-angle reference images into Gaussian splat assets.
- New API endpoints:
POST /api/worlds/generate(Fal.ai-backed world generation with credit metering) andPOST /api/worlds/save(transaction-safe R2 uploads + asset registration). - Creation UI now supports text-to-world and image-to-world flows with preview and asset syncing.
apps/web– Next.js 15 application serving the marketing site and Dreamweave consoleapps/web/lib/ai– AI service clients (Fal.ai, Gemini, Azure OpenAI) for content generationapps/web/prisma– Prisma schema with PostgreSQL (Neon). Comprehensive models for users, communities, creations, assets, and crypto paymentsapps/web/server– tRPC API routers for type-safe backend procedurescontracts/– NEAR smart contracts (Rust): deposits, voting, staking, content-bounty-marketagents/– Automation agents and orchestration helpersscripts/– Utility scripts (video watermarking, user management)docker-compose.yml– Development stack with SQLite (use Neon for production)
-
Ensure Docker Desktop (or the Docker Engine + Compose Plugin) is running.
-
From the repository root run:
docker compose up --build
- Next.js + tRPC runs at http://localhost:3000
- Uses SQLite by default for development
- For production: Configure Neon PostgreSQL in
apps/web/.env
-
Stop the stack with
Ctrl+C. Add-dto run detached.
Volumes keep node_modules and .next inside the container to avoid polluting the host, while your code changes continue to hot reload through bind mounts.
If you prefer running without Docker:
-
Setup
cd apps/web pnpm install cp .env.example .env -
Configure Database
For development (SQLite):
# .env DATABASE_URL="file:./prisma/dev.db"
For production (Neon PostgreSQL):
# .env DATABASE_URL="postgresql://user:[email protected]/dbname?sslmode=require&pgbouncer=true" DIRECT_DATABASE_URL="postgresql://user:[email protected]/dbname?sslmode=require"
-
Start Development Server
pnpm prisma:push # Sync schema to database pnpm dev # Start at http://localhost:3000
-
Optional Tools
pnpm prisma:studio # Database GUI at http://localhost:5555
DATABASE_URL– Neon pooled connection string (required for production, uses PgBouncer)DIRECT_DATABASE_URL– Neon direct connection string (required for migrations)
NEXTAUTH_URL– Your site URL (e.g.,http://localhost:3000)NEXTAUTH_SECRET– Generate withopenssl rand -base64 32GOOGLE_CLIENT_ID– Google OAuth client ID (optional)GOOGLE_CLIENT_SECRET– Google OAuth client secret (optional)
NEXT_PUBLIC_NEAR_NETWORK_ID– NEAR network (testnetormainnet)NEXT_PUBLIC_NEAR_CONTRACT_ID– NEAR deposit contract ID (must matchNEAR_DEPOSIT_CONTRACT_ID)NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID– WalletConnect project ID for EVM walletsNEXT_PUBLIC_EVM_CONTRACT_ADDRESS– Your EVM wallet address for receiving payments- RPC URLs for on-chain verification (optional, uses public RPCs by default)
FALAI_KEY– Fal.ai API key for image/video/3D generationGEMINI_KEY– Google Gemini API key for AI vision and Dream ModeELABS_KEY– ElevenLabs API key for voice synthesis (optional)
R2_ACCESS_KEY_ID– Cloudflare R2 access keyR2_SECRET_ACCESS_KEY– Cloudflare R2 secret keyR2_BUCKET_NAME– R2 bucket name (e.g.,dreamweave-media)R2_ENDPOINT– R2 endpoint URLR2_PUBLIC_URL– Public URL for accessing files
RESEND_API_KEY– Resend API key for transactional emailsRESEND_FROM_EMAIL– Sender email address
See apps/web/.env.example for a complete list with descriptions.
Dreamweave uses a comprehensive Prisma schema with PostgreSQL (Neon) including:
- Authentication – NextAuth v5 with Google OAuth, wallet authentication (NEAR + EVM chains)
- Credits System – User credits, transactions, crypto payments (NEAR, ETH, MATIC, BNB, AVAX)
- Creations – User-generated worlds, characters, objects, stories, voices, agents
- Assets – Images, videos, audio, 3D models, Gaussian splats
- Communities – Custom branding, media assets, 10-tier custom ranking system
- Member Gamification – Score, rank, level, contribution tracking
- Activity Feed – Posts (text, image, video, audio, polls, announcements)
- Engagement – Reactions, threaded comments, likes, views
- Bounties – Community challenges with credit/badge rewards, submission review system
- Moderation – Status tracking (active/on_notice/suspended/banned), admin & public notes
- Messages – Direct messages, system announcements, priority levels
- Notifications – Activity feed for likes, comments, rank-ups, bounty approvals
See DATABASE_SCHEMA.md for detailed model documentation.
- Extend the tRPC router under
apps/web/server/api/routerswith domain-specific procedures - Set up Neon database and add connection strings to
.env - Configure Google OAuth credentials for authentication (optional)
- Set up Cloudflare R2 for file storage
- Deploy NEAR contracts to testnet/mainnet
- Configure AI service API keys (Fal.ai, Gemini)
- Prepare your preferred deployment target for production
- Database: See
DATABASE_SCHEMA.mdfor complete model documentation - Authentication: See
BETTER_AUTH_SETUP.mdfor auth configuration - Smart Contracts: See
SMART_CONTRACTS_EXPLAINED.mdand individual contract READMEs - Security: See
TOKEN_SECURITY_EXPLAINED.mdfor security best practices - File Storage: See
R2_SETUP_GUIDE.mdfor Cloudflare R2 setup - User Scripts: See
apps/web/scripts/README.mdfor user management utilities
Last Updated: 2025-10-14
Stack: Next.js 15, React 19, tRPC, Prisma, Better Auth, NEAR Protocol
License: See LICENSE file