Unified AI Storytelling & Business Simulation Platform
Dream-Vortex integrates two powerful systems into a cohesive platform:
- DreamCog - Advanced AI storytelling with sophisticated character modeling, world-building, and narrative generation
- Vorticog - Business simulation engine with AI-powered agent behavior and economic systems
Vorticog combines strategic business management with rich narrative experiences through semi-autonomous agents, dynamic relationships, and world-building features. Players manage companies, make strategic decisions, and interact with AI-driven characters in a living, evolving world.
- Company Management: Build and grow your business empire
- Business Units: Manage offices, stores, factories, mines, farms, and laboratories
- Resource Production: Extract, process, and manufacture goods
- Market Trading: Buy and sell goods in dynamic markets
- Employee Management: Hire, train, and manage workers
- Financial Systems: Handle cash flow, loans, investments, and taxes
- Technology Research: Unlock new capabilities through R&D
- Competition: Compete with other players and AI companies
Powered by sophisticated AI models for realistic character behavior:
- Personality Models: Big Five personality traits (Openness, Conscientiousness, Extraversion, Agreeableness, Neuroticism)
- Communication Styles: Customizable formality, verbosity, and emotional expression
- Behavioral Tendencies: Impulsiveness, risk-taking, empathy, leadership, independence
- Character Personas: Pre-defined personality templates (Ambitious Leader, Cautious Analyst, etc.)
- Character Traits: Professional, social, cognitive, and emotional characteristics
- Customers: End users with preferences and buying patterns
- Suppliers: Providers with reliability and negotiation styles
- Employees: Workers with skills, emotions, and career goals
- Partners: Business allies with varying commitment levels
- Investors: Financial backers with risk tolerance
- Competitors: Rival entities with strategic behaviors
- Emotional States: Happiness, satisfaction, stress, loyalty, trust
- Psychological Needs: Financial security, recognition, autonomy, social connection
- Motivation System: Short-term goals, long-term aspirations, core values
- Memory System: Experience tracking, knowledge accumulation, trauma, achievements
- Relationship Types: Business, personal, professional, familial, competitive
- Dynamic Metrics: Trust, affection, respect, loyalty, dependency, tension
- Relationship Events: Track significant moments and their impacts
- Social Networks: Complex multi-agent relationship graphs
- Group Types: Departments, teams, unions, associations, clubs, networks
- Group Dynamics: Cohesion, influence, morale
- Membership Roles: Leaders, core members, regular members, associates
- Communities: City-level social structures
- Event Types: Interactions, transactions, milestones, crises, celebrations, conflicts, negotiations
- Time-Sensitive Processing: Scheduled events with automatic execution
- Impact Tracking: Emotional and relationship changes
- Event Triggers: Automated event generation based on conditions
Enhanced narrative capabilities for rich storytelling:
- World Creation: Define genre, time period, technology level, magic systems
- World Rules: Custom physics, social norms, and magical systems
- Cultural Context: Rich cultural and historical backgrounds
- Location Types: Cities, buildings, wilderness, dungeons, realms, dimensions
- Nested Structures: Parent-child location relationships
- Location Attributes: Climate, population, danger levels, resources
- Lore Categories: History, legends, culture, religion, politics, science, magic, species
- Knowledge Management: Public and secret information
- Tagging System: Organize and search lore entries
- World Events: Historical timeline with major events
- Event Importance: 1-10 significance rating
- Flexible Dating: Support for fictional calendars
- Consequences Tracking: Long-term effects of events
- Time-Based Triggers: Events at specific times
- Condition-Based Triggers: Events based on game state
- Recurring Events: Automatic periodic occurrences
- Priority System: Control execution order
- Frontend: React 19, TypeScript, Vite, Tailwind CSS
- Backend: Express, tRPC, TypeScript
- Database: MySQL with Drizzle ORM
- Authentication: JWT-based with OAuth support
- State Management: TanStack Query (React Query)
├── client/ # React frontend
│ ├── components/ # UI components
│ └── pages/ # Page components
├── server/ # Express backend
│ ├── _core/ # Core server infrastructure
│ ├── db.ts # Database functions
│ └── routers.ts # API routes
├── shared/ # Shared types and utilities
├── drizzle/ # Database schema and migrations
│ └── schema.ts # Table definitions
└── docs/ # Documentation
├── AGENTIC_SIMULATION.md # Agentic system docs
└── DREAMCOG_INTEGRATION.md # World building docs
- Node.js 18+
- pnpm package manager
- MySQL database
- Clone the repository:
git clone https://github.com/o9nn/dream-vortex.git
cd dream-vortex- Install dependencies:
pnpm install- Configure environment:
cp .env.example .env
# Edit .env with your database and API credentials- Set up database:
npm run db:push- Start development server:
npm run devThe application will be available at http://localhost:5000.
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run check # TypeScript type checking
npm run format # Format code with Prettier
npm run test # Run tests
npm run db:push # Apply database migrationsThe system uses a comprehensive schema with 27+ tables:
Core Tables:
users,companies,business_units,citiesresource_types,inventory,production_recipesmarket_listings,transactions,notifications
Agentic Simulation Tables:
character_personas,character_traitsagents,agent_traits,agent_historiesrelationships,relationship_eventsagent_groups,group_membershipscommunities,community_membershipsagent_events,event_triggers
DreamCog Integration Tables:
agent_big_five_personalityagent_motivations,agent_memoriesworlds,locations,lore_entriesworld_events,scheduled_world_events
See docs/AGENTIC_SIMULATION.md and docs/DREAMCOG_INTEGRATION.md for detailed documentation.
The API is built with tRPC for end-to-end type safety. Key routers include:
company.*- Company operationsunit.*- Business unit managementproduction.*- Production and manufacturingmarket.*- Market tradingtransaction.*- Financial transactions
persona.*- Character personastrait.*- Character traitsagent.*- Agent operationsrelationship.*- Relationship managementgroup.*- Group operationscommunity.*- Community managementevent.*- Event processing
personality.*- Big Five personalitymotivation.*- Goal trackingmemory.*- Experience trackingrelationshipEvent.*- Relationship historyworld.*- World buildinglocation.*- Location hierarchylore.*- Lore managementworldEvent.*- Timeline eventsscheduledWorldEvent.*- Scheduled events
Agents make decisions based on:
- Personality traits and behavioral tendencies
- Current emotional state and psychological needs
- Memories and past experiences
- Relationships with other agents
- Motivations and goals
- Group and community influences
- Events shape narrative and game state
- Emotional impacts affect agent behavior
- Relationship impacts change social dynamics
- Historical tracking enables rich narratives
- Scheduled events create anticipation
- Relationships evolve through interactions
- Significant moments are recorded as events
- Trust, affection, and respect change over time
- Social networks influence agent behavior
- Group dynamics affect individual choices
- AGENTIC_SIMULATION.md: Core agentic simulation system
- DREAMCOG_INTEGRATION.md: Advanced AI storytelling features
- IMPLEMENTATION_SUMMARY.md: Implementation details
Run the test suite:
npm run testThe test suite covers:
- Database operations
- API endpoints
- Type validation
- Authorization checks
- Business logic
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run linting and tests
- Submit a pull request
- Full TypeScript type safety across the stack
- Optimized database queries with proper indexing
- Efficient relationship traversal
- Scalable schema design for large datasets
- Type-safe API with automatic validation
- JWT-based authentication
- SQL injection prevention via Drizzle ORM
- Input validation with Zod schemas
- Authorization checks on protected operations
- Secure credential storage
- DreamCog: Advanced AI storytelling platform
- Vorticog: Business simulation engine
- DreamGen: Base DreamGen API integration
MIT
- DreamGen for AI inspiration
- The open-source community for excellent tools
- All contributors to the project
For issues and questions:
- GitHub Issues: https://github.com/o9nn/dream-vortex/issues
- Documentation: See /docs directory
Built with ❤️ for the business simulation and storytelling community