Skip to main content

Repo Map

The Shokunin Platform is organized as a monorepo. This page is a reference map to help contributors find where to make changes.

Top-Level Structure


Directory Reference

app/

Next.js 15 App Router. Route groups organize the application: Key entry point: /docs route is at app/(platform)/docs/page.tsx.

components/

Reusable React components organized by concern: Key entry point: Platform navigation is in components/platform/sidebar-nav.tsx.

domains/

Domain-driven data access layer. Each domain encapsulates Firestore read/write logic for a specific business entity. This separates business logic from UI components. Pattern: Each domain exports custom hooks (e.g., useWorkshop, useAgents) that consume repositories and manage React state. Hooks receive tenantId and projectId from a parent context.

hooks/

Global custom React hooks shared across the app (not tied to a specific domain):

lib/

Utility functions and shared logic:

packages/

Internal shared packages. These are TypeScript modules used across the monorepo.

plugins/

OpenCode agent plugins that extend the AI coding agent’s capabilities: Key entry point: plugins/agent/README.md explains how to install and use the Shokunin agent plugin.

apps/

Micro-frontend applications:

infrastructure/

Local backend service configurations (see also docker-compose.yml at the root):

terraform/

GCP infrastructure as code. Provisions all cloud resources for the Shokunin Platform:
  • platform/environments/dev-shared/ — VPC, Artifact Registry, GKE Autopilot, GKE Gateway, Workshop Provisioner
  • platform/environments/staging/ and production/ — full Beads stack (Dolt VM, Filestore, Cloud Run)
  • platform/environments/dev/ — per-developer Firestore database and Secret Manager access
  • platform/modules/ — reusable single-purpose modules
  • terraform/tenants/ — per-tenant GKE namespace, HTTPRoutes, Workshop workload
  • terraform/config/ — environment and tenant .tfvars configuration files
See terraform/README.md for the conceptual infrastructure diagram and GCP component list.

tasks/

Product Requirements Documents (PRDs) and planning files. Source of truth for feature planning:

Key Entry Points


Naming Conventions