Installation and Setup
Installation Options
CASCADA Framework offers three deployment options to suit different development and production needs:
🚀 Option 1: Local Development (Recommended for Development)
Best for: Development, testing, debugging
# Clone and install
git clone <repository-url>
cd games
pnpm install
# Start development server
pnpm dev
# → http://localhost:5173 (Game)
# → http://localhost:5174 (Documentation)Features:
- Hot module replacement
- Full debugging capabilities
- All game modes available
- Complete documentation
- Fastest development cycle
🐳 Option 2: Docker Development (Full Environment)
Best for: Consistent development environment, multiplayer testing
# Start full development environment
pnpm docker:dev
# Or with build
pnpm docker:dev:buildFeatures:
- Game: http://localhost:5173
- Documentation: http://localhost:5174
- Multiplayer Server: http://localhost:2567
- Consistent environment across platforms
- All services pre-configured
- Multiplayer functionality ready
Docker Services:
cascada-dev: Main game applicationcascada-docs: Documentation servercascada-server: Multiplayer server (Colyseus)
🌐 Option 3: Vercel Deployment (Production Ready)
Best for: Production deployment, public demos, sharing
# Install Vercel CLI
npm i -g vercel
# Build for production
node scripts/build-production.js
# Deploy to Vercel
vercel --prodFeatures:
- Game:
https://your-project.vercel.app/(Your full game) - Documentation:
https://your-project.vercel.app/docs/(Complete docs) - Automatic HTTPS
- Global CDN
- Zero configuration deployment
- Production optimized builds
What's Deployed:
- Your complete CASCADA Framework game (236KB)
- All game modes (Classic, Fractal, Ascension, Temporal)
- Full documentation with search
- Single domain with both game and docs
Prerequisites
Before starting, ensure you have:
- Node.js 18.0.0 or higher
- pnpm 8.0.0 or higher
Check Versions
node --version # v18.0.0+
pnpm --version # v8.0.0+Install Node.js
If Node.js is not installed, download from nodejs.org
Install pnpm
pnpm install -g pnpmProject Installation
1. Clone Repository
git clone <repository-url>
cd games2. Install Dependencies
ppnpm installThis will install:
phaser- game enginevite- dev server and bundlertypescript- compilervue- UI frameworkvitepress- documentation
3. Run Dev Server
pnpm devOpens http://localhost:5173 with landing page!
Available Scripts
CASCADA Framework includes comprehensive npm scripts for development, building, and deployment:
Development Scripts
# Start development server
pnpm dev
# → http://localhost:5173
# Start documentation server
pnpm docs:dev
# → http://localhost:5174
# Start multiplayer server
pnpm server:dev
# → http://localhost:2567Build Scripts
# Build production bundle
pnpm build
# Preview production build
pnpm previewQuality Assurance Scripts
# Run all checks (architecture + modes + TypeScript)
pnpm lint
# Check architecture compliance
pnpm check:architecture
# Check game modes structure
pnpm check:modes
# Validate layer isolation
pnpm validate:isolation
# ESLint only
pnpm lint:eslintDocker Scripts
# Full development environment
pnpm docker:dev
# Build and run
pnpm docker:dev:build
# Stop containers
pnpm docker:dev:down
# View logs
pnpm docker:dev:logs
# Packages development only
pnpm docker:packages
# Documentation only
pnpm docker:docsDocumentation Scripts
# Development documentation
pnpm docs:dev
# Build documentation
pnpm docs:build
# Preview built documentation
pnpm docs:previewProject Structure
After installation you'll see:
games/
├── docs/ # Documentation (VitePress)
├── src/ # Source code
│ ├── platform/ # Phaser base
│ ├── core/ # Universal systems
│ └── game/ # LINX game
├── public/ # Static assets
├── node_modules/ # Dependencies
├── package.json # pnpm config
└── README.md # Technical READMEAvailable Commands
# Development
pnpm dev # Game dev server (http://localhost:5173)
pnpm docs:dev # Docs dev server (http://localhost:5174)
# Build
pnpm build # Production build
pnpm docs:build # Build docs
# Verification
pnpm lint # TypeScript type check
pnpm preview # Preview production build
# Documentation
pnpm docs:preview # Preview docsVerify Installation
Run Game:
pnpm devYou should see:
- Landing page with engine presentation
- Navigation to Demo and Docs
- LINX game demo (click "Try Demo")
Run Documentation:
pnpm docs:devOpens http://localhost:5174 with this documentation!
Troubleshooting
Error: "pnpm: command not found"
pnpm install -g pnpmError: "Node version too old"
Update Node.js to version 18+
Error during dependency installation
# Clear cache and reinstall
rm -rf node_modules pnpm-lock.yaml
ppnpm installPort 5173 already in use
# Change port in vite.config.ts
server: {
port: 3000, # Different port
}Next Steps
After successful installation, choose your path:
For Developers
- Read Quick Start
- Study Project Structure
- Test Adaptive Viewport
- Try Game Modes
For Production Deployment
- Review Vercel Deployment Guide
- Test production build:
node scripts/build-production.js - Deploy:
vercel --prod
For Multiplayer Development
- Start Docker environment:
pnpm docker:dev - Read Multiplayer Guide
- Test multiplayer features at http://localhost:2567
All three options are ready to use! 🎯