An interactive web application for strategic planning and analysis across multiple domains of deterrence, featuring NATO vs Russia strategic scenarios with turn-based mechanics, AI gameplay, and comprehensive analytics.
- Two-Player Mode: Strategic NATO vs Russia scenarios with turn-based mechanics
- Single-Player AI Mode: Play against an intelligent AI opponent (password: MDDS)
- Five Strategic Domains: Joint, Economy, Cognitive, Space, and Cyber
- Card System: Three card types (Assets, Permanents, Experts) with unique effects
- Budget Management: Turn-based budgets with pooled and restricted modes
- Deterrence Tracking: Real-time scoring across all domains
-
Database Sessions: Store and retrieve game sessions with password protection
-
Analysis Dashboard: Multi-tab interface with pattern recognition and strategic insights
- Generic Patternization: Discover winning strategies across 7 analysis categories
- Predetermined Considerations: Answer strategic questions with card statistics
- Ask Questions: Interactive Q&A with LLM-style responses
-
Research Dashboard: Statistical analysis environment
- Hypothesis Development with smart variable recommendations
- Session Filtering and multi-variable selection
- Descriptive Statistics (N, Mean, SD, Min, Max, Range, Median, IQR)
- Statistical Test Recommendations (11 methodologies)
- Scientific Word Document Generation with APA formatting
-
Mobile Interface: Dedicated mobile views for session management
-
PDF/Word Reports: Generate professional research documents
-
Strategy Logging: Comprehensive action tracking with timestamps
- Real-time state synchronization
- PostgreSQL database integration
- Responsive Material Design UI
- Light/dark theme support
- Password-protected sections
- Automated AI decision-making with balanced strategy
- Open the application in your web browser
- Enter session details on the login screen
- Choose between Two-Player or Single-Player (password: MDDS) mode
- Optional: Check "Skip Turn 1" to start at Turn 2
- Make strategic purchases and advance through turns
- Access Analytics and Research dashboards for insights
- Single Player Mode:
MDDS - Database Sessions:
MDDS - Permanent Cards Logs:
MDDS
π See DEPLOYMENT.md for complete deployment instructions
For deployments where frontend and backend run on different subdomains, follow this setup:
# Set your backend API URL (different subdomain)
VITE_API_URL=https://api.example.com
# Allow requests from your frontend subdomain(s)
FRONTEND_URL=https://app.example.com
# For multiple frontend origins:
FRONTEND_URL=https://app.example.com,https://www.app.example.com
The CORS middleware will automatically:
- Allow credentials (cookies) across subdomains
- Accept specified HTTP methods (GET, POST, PUT, DELETE, PATCH)
- Allow necessary headers (Content-Type, Authorization)
- Cache preflight requests for 24 hours
Frontend: http://localhost:5173
Backend: http://localhost:5050
# .env file
VITE_API_URL=http://localhost:5050
FRONTEND_URL=http://localhost:5173
See DEPLOYMENT.md for complete deployment instructions with examples for different hosting providers.
# Install Node.js 18+ and PostgreSQL
# Create database
npm install
npm run db:push
npm run build
npm start# Install Node.js 18+ and PostgreSQL
# Create database
npm install
npm run db:push
npm run build
pm2 start npm --name "mdds" -- startFor detailed step-by-step instructions, environment setup, troubleshooting, and production configuration, refer to the DEPLOYMENT.md guide.
- Node.js 18 or higher
- PostgreSQL 14 or higher
- 2GB RAM
- 5GB disk space
- Node.js 20 LTS
- PostgreSQL 15+
- 4GB RAM
- 10GB SSD storage
- React 18 with TypeScript
- Vite for development and bundling
- Tailwind CSS + shadcn/ui components
- Zustand for state management
- React Query for data fetching
- Wouter for routing
- Express.js server
- Drizzle ORM with PostgreSQL
- Zod for validation
- Session management with express-session
- simple-statistics for statistical calculations
- docx for Word document generation
- Chart.js for data visualization
- Server-side chart rendering with canvas
mdds-app/
βββ client/ # Frontend React application
β βββ src/
β β βββ pages/ # Page components
β β βββ components/ # Reusable UI components
β β βββ state/ # Zustand store
β β βββ logic/ # Game logic
β β βββ utils/ # Utility functions
βββ server/ # Backend Express server
β βββ routes.ts # API routes
β βββ storage.ts # Database interface
β βββ index.ts # Server entry point
βββ shared/ # Shared TypeScript types
β βββ schema.ts # Database schema
βββ DEPLOYMENT.md # Deployment guide
βββ README.md # This file
- Purchase Phase: Select cards from available inventory
- Commit Phase: Finalize purchases and calculate deterrence
- Advance Phase: Move to next turn with refreshed budgets
- Turn 1: Base turn with 200K per domain (1000K total, domain-restricted)
- Turn 2+: Pooled budget of 1000K (spend across any domain)
- Permanent cards provide discounts on future purchases
- Each card has effects on one or more domains
- Effects can benefit your team or penalize opponents
- Total deterrence determines strategic advantage
- Final scores calculated at game conclusion
The AI opponent uses a balanced strategy that:
- Analyzes deterrence gaps across all domains
- Prioritizes domains where it's falling behind
- Selects cards based on impact value, not just cost
- Balances permanent cards with immediate effects
- Adapts dynamically to player decisions
- Maintains competitive scoring for engaging gameplay
# Install dependencies
npm install
# Start development server
npm run dev
# Run database migrations
npm run db:push
# Build for production
npm run buildCreate a .env file with:
DATABASE_URL=postgresql://user:password@localhost:5432/mdds
PGHOST=localhost
PGPORT=5432
PGUSER=your_user
PGPASSWORD=your_password
PGDATABASE=mdds
SESSION_SECRET=your-random-secret
NODE_ENV=developmentPOST /api/sessions- Create new game sessionGET /api/sessions- Get all sessionsGET /api/sessions/:name- Get specific sessionPUT /api/sessions/:name- Update sessionPOST /api/analysis/ask- Query session dataPOST /api/research/generate-report- Generate research document
- All sensitive operations are password-protected
- Session secrets should be randomly generated
- Database credentials should never be committed
- Use HTTPS in production environments
- Keep dependencies updated regularly
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- React Query caching for API requests
- Optimistic UI updates
- Lazy loading for heavy components
- Server-side chart generation
- Database indexing on frequently queried fields
Common issues and solutions are documented in DEPLOYMENT.md.
For quick fixes:
- Database connection: Check
.envcredentials and PostgreSQL service - Port conflicts: Change port in
server/index.ts - Memory issues: Increase Node.js heap size with
--max-old-space-size - Build errors: Clear
node_modulesand reinstall
This application is proprietary software for strategic planning and analysis.
For deployment assistance or technical issues, refer to:
- DEPLOYMENT.md - Complete deployment guide
- Application logs via PM2:
pm2 logs mdds - Database logs in PostgreSQL log directory
Version: 1.0.0
Last Updated: October 2025