Transform your dreams into playable 3D worlds using AI.
DreamQuest is a full-stack application that allows users to describe their dreams (via text or audio) and generates playable WebGL worlds based on the description. The system uses AI to parse dream narratives, generate world blueprints, and dynamically construct Unity-based 3D environments.
Live Demo: dreamquest.example.com
- ๐ Text or Audio Input - Describe dreams via text or voice recording
- ๐จ Customizable Styles - Low-poly, realistic, cartoon, or surreal visuals
- ๐ญ Mood Settings - Calm, tense, mystic, or nostalgic atmospheres
- ๐ฎ Real-time WebGL - Fully playable 3D worlds in the browser
- ๐ Progress Tracking - Live job status with animated loading states
- ๐ Shareable Worlds - Public links to share generated experiences
- ๐ฑ Responsive Design - Works on desktop and mobile
/dreamquest
/frontend # Next.js 15 App Router + TypeScript + Tailwind
/api # FastAPI + Pydantic + Redis
/workers # Background job orchestration (RQ)
/unity # Unity project + WebGL export scripts
/infra # Docker, docker-compose, nginx
/docs # Documentation
Tech Stack:
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS, Zustand, Zod
- Backend: FastAPI, Pydantic, Redis, RQ
- Unity: Unity 2022.3 LTS (WebGL export)
- Infrastructure: Docker, nginx, GitHub Actions
- Deployment: Vercel (frontend), Render/Railway (API)
See ARCHITECTURE.md for detailed architecture documentation.
- Node.js 20+
- Python 3.11+
- Redis
- Docker & Docker Compose (optional)
- Unity 2022.3+ (for WebGL builds)
-
Clone the repository
git clone https://github.com/yourusername/dreamquest.git cd dreamquest -
Install dependencies
npm install cd frontend && npm install && cd .. cd api && pip install -r requirements.txt && cd .. cd workers && pip install -r requirements.txt && cd ..
-
Start Redis
redis-server
-
Start the backend
cd api uvicorn main:app --reload --port 8000 -
Start the worker
cd workers rq worker --url redis://localhost:6379 dreamquest -
Start the frontend
cd frontend npm run dev -
Open your browser
http://localhost:3000
# Start all services
make up
# or
docker-compose -f infra/docker-compose.yml up -d
# View logs
make logs
# Stop services
make down- Navigate to
/dreamquest - Describe your dream in the text area (minimum 30 characters)
- Example: "I was flying over a magical forest at night. A glowing bird appeared and guided me to a floating house."
- Choose settings:
- Visual style: Low-poly, Realistic, Cartoon, or Surreal
- Mood: Calm, Tense, Mystic, or Nostalgic
- Duration: Short (5-10 min) or Long (15-30 min)
- Click "Generate My Dream World"
- Wait for processing (analyzing โ generating โ building โ ready)
- Play your world in the embedded WebGL viewer
- Share your creation with a public link
cd frontend
# Unit tests (Vitest)
npm run test
# E2E tests (Playwright)
npm run test:e2e
# Lint
npm run lintcd api
# Run pytest
pytest -v
# Lint
ruff check .
# Type check
mypy .cd frontend
vercel --prodSet environment variables:
NEXT_PUBLIC_API_URL- Your API URL
- Create a new Web Service
- Connect your GitHub repository
- Set build command:
pip install -r api/requirements.txt - Set start command:
uvicorn main:app --host 0.0.0.0 --port $PORT - Add environment variables:
REDIS_URLCORS_ORIGINS
- Create a new Background Worker
- Set start command:
rq worker --url $REDIS_URL dreamquest
See docs/DEPLOYMENT.md for detailed deployment guides.
Full API documentation is available at /docs/API.md or via FastAPI's built-in docs:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
POST /v1/jobs- Create new dream generation jobGET /v1/jobs/{jobId}- Get job status and resultGET /v1/jobs/{jobId}/blueprint- Get JSON blueprint for UnityPOST /v1/transcribe- Transcribe audio to text
- Open
/unityfolder in Unity 2022.3+ - Assign prefabs in
BlueprintLoadercomponent - Build Settings โ WebGL
- Build to
/frontend/public/webgl/{jobId}/
See unity/README.md for Unity setup details.
frontend/
app/ # Next.js App Router pages
components/ # React components
ui/ # shadcn/ui base components
DreamForm.tsx # Main dream input form
JobProgress.tsx # Job status tracker
WebGLViewer.tsx # WebGL iframe wrapper
lib/ # Utilities, API client, state management
tests/ # Vitest + Playwright tests
api/
routes/ # FastAPI route handlers
schemas.py # Pydantic models
main.py # FastAPI app entrypoint
workers/
orchestrator.py # Dream-to-world pipeline
unity/
Assets/Scripts/ # Unity C# scripts
StreamingAssets/ # Blueprint JSON files
The project uses:
- ESLint + Prettier for frontend
- Ruff + mypy for backend
- Commitlint for commit message conventions
- Husky for pre-commit hooks
# Format all code
npm run format
# Lint all code
npm run lintContributions are welcome! Please read CONTRIBUTING.md first.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see LICENSE file for details.
- Unity for WebGL export capabilities
- FastAPI for the excellent Python framework
- Next.js team for App Router
- shadcn/ui for beautiful components
- ๐ง Email: support@dreamquest.example.com
- ๐ฌ Discord: Join our community
- ๐ Issues: GitHub Issues
- Real AI integration (OpenAI/Anthropic for parsing, Whisper for transcription)
- 3D asset generation with SDXL/Stable Diffusion
- Procedural music generation with MusicGen
- User authentication with Supabase
- Public gallery of shared dreams
- VR support for Oculus/Meta Quest
- Mobile app (React Native)
- Multiplayer dream exploration
Made with โค๏ธ by the DreamQuest team