Skip to content

Unified workspace for Mystira multi-repo development - VS Code workspace, docs, and tooling

License

Notifications You must be signed in to change notification settings

phoenixvc/Mystira.workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

698 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mystira Workspace

A unified workspace containing all Mystira platform components as integrated git submodules.

Overview

Mystira is an AI-powered interactive storytelling platform that combines blockchain technology, generative AI, and immersive narratives. This workspace consolidates all components of the Mystira ecosystem into a unified development environment.

Quick Start

# Clone with submodules
git clone --recurse-submodules https://github.com/phoenixvc/Mystira.workspace.git
cd Mystira.workspace

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Start development servers
pnpm dev

For detailed setup instructions, see Quick Start Guide.

Components

Each component is maintained as a separate repository and integrated into this workspace:

Component Description Tech Stack Repository
Mystira.Chain Blockchain integration & Story Protocol Python, gRPC phoenixvc/Mystira.Chain
Mystira.App Main storytelling application C#, .NET phoenixvc/Mystira.App
Mystira.StoryGenerator AI-powered story generation engine C#, .NET phoenixvc/Mystira.StoryGenerator
Mystira.Publisher Content publishing service TypeScript, Node phoenixvc/Mystira.Publisher
Mystira.DevHub Developer portal and tools TypeScript phoenixvc/Mystira.DevHub
Mystira.Admin.Api Admin backend API C#, ASP.NET Core phoenixvc/Mystira.Admin.Api
Mystira.Admin.UI Admin dashboard frontend TypeScript, React phoenixvc/Mystira.Admin.UI
Infrastructure Terraform, Kubernetes, CI/CD HCL, YAML (workspace-native)

Repository Structure

Mystira.workspace/
├── packages/               # Component submodules
│   ├── admin-api/         # Admin backend (C# API)
│   ├── admin-ui/          # Admin frontend (React)
│   ├── app/               # Main application (C#)
│   ├── chain/             # Blockchain service (Python)
│   ├── devhub/            # Developer portal (TypeScript)
│   ├── publisher/         # Publishing service (TypeScript)
│   └── story-generator/   # AI story engine (C#)
│
├── infra/                 # Infrastructure as Code
│   ├── terraform/         # Terraform modules & environments
│   ├── kubernetes/        # Kubernetes manifests
│   ├── docker/            # Dockerfiles for all services
│   └── scripts/           # Deployment scripts
│
├── .github/workflows/     # CI/CD pipelines
│   ├── *-ci.yml          # Component CI workflows
│   ├── infra-*.yml       # Infrastructure workflows
│   └── deployment-*.yml  # Deployment workflows
│
├── docs/                  # Workspace documentation
│   ├── architecture/      # Architecture docs & ADRs
│   ├── cicd/             # CI/CD documentation
│   ├── infrastructure/    # Infrastructure guides
│   └── planning/         # Planning & roadmaps
│
└── scripts/              # Utility scripts
    ├── sync-repo-metadata.sh  # Sync GitHub repo metadata
    └── repo-metadata.json     # Repository metadata config

Development

Prerequisites

  • Node.js >= 18.x with pnpm >= 8.x (TypeScript components)
  • .NET SDK 9.0+ (C# components)
  • Python 3.11+ (Chain component)
  • Docker (local development)
  • Git with submodule support

Note: For .NET development, you'll need to configure GitHub Packages authentication. See Setup Guide for NuGet configuration including Package Source Mapping.

Working with Submodules

# Initialize submodules after cloning
git submodule update --init --recursive

# Update all submodules to latest
git submodule update --remote

# Update specific submodule
git submodule update --remote packages/chain

For detailed submodule workflows, see Submodules Guide.

Common Tasks

# Install all dependencies
pnpm install

# Run linting
pnpm lint

# Run tests
pnpm test

# Build all packages
pnpm build

# Build specific package
pnpm --filter @mystira/publisher build

# Start development mode
pnpm dev

# Start specific service
pnpm --filter mystira-publisher dev

Debugging

The workspace includes VS Code debug configurations for TypeScript/Node.js services. Template environment files are provided:

  • .env.admin-api - Admin API environment variables
  • .env.publisher - Publisher service environment variables
  • .env.story-generator - Story Generator service environment variables

Before debugging, update these files with your local configuration values. The debug configurations will automatically load these environment files.

CI/CD Pipeline

The workspace uses a distributed CI/CD model:

Component Dev CI (in component repos)

Each component runs its own dev CI workflow in its repository for fast feedback during development:

Component Repository Runtime
Admin API phoenixvc/Mystira.Admin.Api .NET 9.0
Admin UI phoenixvc/Mystira.Admin.UI Node.js 20
App phoenixvc/Mystira.App .NET 9.0
Chain phoenixvc/Mystira.Chain Python 3.11
DevHub phoenixvc/Mystira.DevHub Node.js 20
Publisher phoenixvc/Mystira.Publisher Node.js 20
Story Generator phoenixvc/Mystira.StoryGenerator .NET 9.0

Workspace Workflows (staging/production)

This workspace handles integration, staging, and production deployments:

Infrastructure Workflows

  • Infrastructure: Deploy - Automated infrastructure deployment
  • Infrastructure: Validate - Infrastructure validation

Deployment Workflows

  • Deployment: Staging - Auto-deploy to staging on main branch
  • Deployment: Production - Manual production deployment

Workspace Workflows

  • Workspace: CI - Workspace-level CI
  • Workspace: Release - NPM package releases via Changesets

Utilities

  • Utilities: Check Submodules - Validate submodule commits
  • Utilities: Link Checker - Check markdown links in documentation

All workflows run on push to dev/main and on pull requests.

Infrastructure

The infrastructure is defined using:

  • Terraform - Cloud resources (Azure AKS, networking, databases)
  • Kubernetes - Container orchestration with Kustomize overlays
  • Docker - Containerized microservices
  • Azure Front Door - CDN, WAF, and DDoS protection

Environments

Environment URL Deployment Branch
Development *.dev.mystira.app Manual dev
Staging *.staging.mystira.app Auto (on main push) main
Production *.mystira.app Manual (protected) main

Quick Deploy

# Deploy to dev environment
gh workflow run "Infrastructure: Deploy" \
  --field environment=dev \
  --field components=all

# Deploy to staging (automatic on main branch push)
git push origin main

# Deploy to production (requires manual approval)
gh workflow run "Deployment: Production" \
  --field confirm="DEPLOY TO PRODUCTION"

See Infrastructure Documentation for detailed guides.

Documentation

Getting Started

Development

Infrastructure & DevOps

Planning & Migration

Utilities

Repository Metadata Sync

Sync repository descriptions, topics, and settings across all Mystira repos:

# Preview changes
./scripts/sync-repo-metadata.sh --dry-run

# Apply changes
./scripts/sync-repo-metadata.sh

Configuration: scripts/repo-metadata.json

Architecture

┌─────────────────────────────────────────────────────────────────────────────────┐
│                              Mystira Platform                                    │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│                            ┌─────────────────────┐                              │
│                            │   Azure Front Door  │                              │
│                            │   (CDN + WAF + TLS) │                              │
│                            └──────────┬──────────┘                              │
│                                       │                                         │
│  ┌────────────────────────────────────┼────────────────────────────────────┐    │
│  │                                    │                                    │    │
│  ▼                                    ▼                                    ▼    │
│ ┌───────────────────────────────┐  ┌─────────────┐  ┌───────────────────────┐  │
│ │      Mystira.App (Client)     │  │ Admin UI    │  │     DevHub            │  │
│ │  ┌───────────────────────────┐│  │  (React)    │  │  (Tauri Desktop)      │  │
│ │  │  Blazor WebAssembly PWA   ││  │             │  │  Developer Portal     │  │
│ │  │  • Web • Mobile • Offline ││  │ admin.      │  │                       │  │
│ │  │  • IndexedDB • Haptics    ││  │ mystira.app │  │                       │  │
│ │  └────────────┬──────────────┘│  └──────┬──────┘  └───────────┬───────────┘  │
│ │               │               │         │                     │              │
│ └───────────────┼───────────────┘         │                     │              │
│                 │                         │                     │              │
│                 └─────────────────────────┴─────────────────────┘              │
│                                    │                                            │
│                                    ▼                                            │
│  ┌──────────────────────────────────────────────────────────────────────────┐  │
│  │                         Kubernetes (AKS)                                  │  │
│  │  ┌────────────┐  ┌────────────┐  ┌─────────────┐  ┌───────────┐          │  │
│  │  │ Publisher  │  │ Admin API  │  │   Story     │  │   Chain   │          │  │
│  │  │(TypeScript)│  │(C# .NET 9) │  │  Generator  │  │  (Python) │          │  │
│  │  │            │  │            │  │ (C# + AI)   │  │           │          │  │
│  │  │ • Content  │  │ • Entra ID │  │ • Claude    │  │ • Story   │          │  │
│  │  │ • Publish  │  │ • CRUD     │  │ • GPT-4     │  │   Protocol│          │  │
│  │  │ • NFT Mint │  │ • Analytics│  │ • Context   │  │ • Web3    │          │  │
│  │  └─────┬──────┘  └─────┬──────┘  └──────┬──────┘  └─────┬─────┘          │  │
│  │        │               │                │               │                │  │
│  │        └───────────────┴────────────────┴───────────────┘                │  │
│  │                                │                                         │  │
│  └────────────────────────────────┼─────────────────────────────────────────┘  │
│                                   │                                            │
│  ┌────────────────────────────────┴─────────────────────────────────────────┐  │
│  │                        Shared Infrastructure                              │  │
│  │  ┌────────────┐  ┌─────────┐  ┌───────────┐  ┌─────────────────────────┐ │  │
│  │  │ PostgreSQL │  │  Redis  │  │ Key Vault │  │    Azure Monitor        │ │  │
│  │  │ (Flexible) │  │ (Cache) │  │ (Secrets) │  │ (App Insights + Logs)   │ │  │
│  │  └────────────┘  └─────────┘  └───────────┘  └─────────────────────────┘ │  │
│  └──────────────────────────────────────────────────────────────────────────┘  │
│                                                                                 │
│  ┌──────────────────────────────────────────────────────────────────────────┐  │
│  │                          Security & Auth                                  │  │
│  │  ┌─────────────────┐  ┌───────────────────┐  ┌─────────────────────────┐ │  │
│  │  │ Microsoft Entra │  │ Entra External ID │  │   Managed Identity      │ │  │
│  │  │  ID (Admins)    │  │ (Consumer Users)  │  │  (Service-to-Service)   │ │  │
│  │  └─────────────────┘  └───────────────────┘  └─────────────────────────┘ │  │
│  └──────────────────────────────────────────────────────────────────────────┘  │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────┐
│                           Package & Container Registries                         │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│  ┌─────────────────────────┐  ┌─────────────────────────┐  ┌─────────────────┐ │
│  │    Docker Images        │  │     NuGet Packages      │  │   NPM Packages  │ │
│  │  (Azure Container Reg.) │  │   (GitHub Packages)     │  │   (npmjs.org)   │ │
│  │                         │  │                         │  │                 │ │
│  │  myssharedacr.azurecr.io│  │  nuget.pkg.github.com/  │  │  @mystira/*     │ │
│  │                         │  │  phoenixvc/index.json   │  │                 │ │
│  │  • publisher:latest     │  │                         │  │  • publisher    │ │
│  │  • chain:latest         │  │  • Mystira.App.Domain   │  │  • shared-utils │ │
│  │  • story-generator      │  │  • Mystira.App.Shared   │  │  • ui-components│ │
│  │  • admin-api:latest     │  │  • Mystira.App.Contracts│  │                 │ │
│  │  • admin-ui:latest      │  │  • Mystira.StoryGen.*   │  │                 │ │
│  └─────────────────────────┘  └─────────────────────────┘  └─────────────────┘ │
│                                                                                 │
│  ┌──────────────────────────────────────────────────────────────────────────┐  │
│  │                      Infrastructure as Code                               │  │
│  │   Terraform (Azure) │ Kubernetes (Kustomize) │ GitHub Actions (CI/CD)    │  │
│  └──────────────────────────────────────────────────────────────────────────┘  │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Mystira.App

The main client application (Mystira.App) is built with:

  • Blazor WebAssembly - C# frontend running in the browser via WebAssembly
  • Progressive Web App (PWA) - Offline-capable with service workers
  • IndexedDB - Client-side data persistence and sync
  • Haptics & Audio - Native device feature integration via JS interop

Backend: ASP.NET Core on .NET 9 with Cosmos DB and hexagonal architecture (CQRS + MediatR)

Package Ecosystem

Registry Packages Purpose
Azure Container Registry publisher, chain, story-generator, admin-api, admin-ui Docker images for Kubernetes deployment
GitHub Packages (NuGet) Mystira.App.Domain, Mystira.App.Shared, Mystira.App.Contracts, Mystira.StoryGenerator.* Shared .NET libraries for service development
npmjs.org @mystira/publisher, @mystira/shared-utils TypeScript packages via Changesets

Service Endpoints

Environment Service URL
Development Web App dev.mystira.app
Admin UI dev.admin.mystira.app
Admin API dev.admin-api.mystira.app
Publisher dev.publisher.mystira.app
Story Generator dev.story-api.mystira.app
Story Web dev.story.mystira.app
Chain dev.chain.mystira.app
Staging Web App staging.mystira.app
Admin UI staging.admin.mystira.app
Admin API staging.admin-api.mystira.app
Publisher staging.publisher.mystira.app
Story Generator staging.story-api.mystira.app
Story Web staging.story.mystira.app
Chain staging.chain.mystira.app
Production Web App mystira.app
Admin UI admin.mystira.app
Admin API admin-api.mystira.app
Publisher publisher.mystira.app
Story Generator story-api.mystira.app
Story Web story.mystira.app
Chain chain.mystira.app

Security

  • Review our Security Policy for reporting vulnerabilities
  • All secrets managed via Azure Key Vault and Kubernetes secrets
  • Branch protection enforced on main and dev branches
  • Required CI checks before merging

Contributing

We welcome contributions! Please read:

  1. Contributing Guide - Development process
  2. Commit Conventions - Commit message format
  3. Submodules Guide - Working with submodules

License

Proprietary - All rights reserved by Phoenix VC / Mystira

Contact

About

Unified workspace for Mystira multi-repo development - VS Code workspace, docs, and tooling

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 10