Project Structure

Complete directory layout of the SCRIPE monorepo root, backend, frontend, and module anatomy.

SCRIPE is organized as a Git submodule monorepo with three main parts: the root repository, backend submodule, and frontend submodule. Understanding this structure is essential for navigating the codebase.

Root Monorepo

SCRIPE/ (Root Monorepo)Text
SCRIPE/
├── SCRIPE-Backend/          # .NET 10 Backend (Git Submodule)
├── SCRIPE-Frontend/         # Next.js 16 Frontend (Git Submodule)
├── tools/scripe-cli/        # CLI scaffolding tool
├── docs/                    # Technical documentation (67 files)
├── docs-commercial/         # Commercial documentation (25 files)
├── .gitmodules              # Submodule configuration
└── README.md                # Root README

Backend Structure

SCRIPE-Backend/ StructureText
SCRIPE-Backend/
├── src/
│   ├── Host/
│   │   └── API/
│   │       ├── Program.cs              # 288 lines — All wiring
│   │       ├── Controllers/            # 18 REST controllers
│   │       ├── Extensions/             # Middleware, CORS, YARP
│   │       └── Middleware/             # Request logging, audit
│   │
│   ├── Core/
│   │   ├── Core.Application/           # AstraFlow mediator, Behaviors, CQRS
│   │   ├── Core.Domain/                # Base entities, Result<T>
│   │   └── Core.Infrastructure/        # DI, Caching, Events, Blob
│   │
│   └── Modules/
│       └── Identity/
│           ├── Identity.Domain/         # 15 entities, Zod-like specs
│           ├── Identity.Application/    # Commands, Queries, DTOs
│           └── Identity.Infrastructure/ # EF DbContext, Repos
│
├── tests/
│   ├── Unit/                           # xUnit unit tests
│   ├── Integration/                    # API integration tests
│   └── Architecture/                   # ArchTest conventions
│
└── docs/                               # Backend-specific docs

Frontend Structure

SCRIPE-Frontend/ StructureText
SCRIPE-Frontend/
├── src/
│   ├── app/                            # Next.js App Router (connectors only)
│   │   ├── (auth)/                     # Auth pages (login, register)
│   │   ├── (modules)/                  # Module pages (admin, docs, etc.)
│   │   └── layout.tsx                  # Root layout with providers
│   │
│   ├── core/                           # Shared infrastructure
│   │   ├── ui/                         # Shadcn components (Button, Input, etc.)
│   │   ├── providers/                  # LanguageProvider, MainProvider
│   │   ├── store/                      # Zustand stores (Auth, UI, Toast)
│   │   ├── network/                    # API client, interceptors
│   │   ├── locales/                    # i18n dictionaries (7 languages)
│   │   └── common/                     # Result<T>, errors, constants
│   │
│   └── modules/                        # Feature modules (isolated)
│       ├── auth/                       # Authentication module
│       ├── admin/                      # Admin panel + sub-modules
│       │   ├── dashboard/              # Dashboard stats
│       │   ├── user-management/        # User CRUD
│       │   ├── role-management/        # Role + permissions
│       │   └── tenant-management/      # Multi-tenant admin
│       ├── home/                       # Home/landing page
│       └── docs/                       # Documentation portal (this)
│
└── public/                             # Static assets

Module Anatomy

Every frontend module follows an identical structure. This consistency makes it easy to navigate any module once you understand one. Each layer has strict responsibilities and import rules.

DirectoryLayerContentsImports Allowed
domain/entities/DomainZod schemas, business rulesExternal packages only
domain/interfaces/DomainRepository contractsDomain entities
data/models/DataAPI DTOs (raw API shapes)@core/network
data/mappers/DataDTO ↔ Entity mappingDomain + Data models
data/repositories/DataInterface implementations@core/network, mappers
presentation/viewmodels/PresentationReact hooks with logicDomain interfaces, TanStack Query
presentation/views/PresentationPure UI (<200 lines)ViewModels, components
presentation/components/PresentationReusable section UI@core/ui, own module only
di.tsRootDI container for moduleRepositories, services
index.tsRootPublic API exportsViews, entities
  • Allowed Imports

    • @core/* — Shared infrastructure
    • @modules/{self}/* — Own module files
    • External npm packages
  • Forbidden Imports

    • @modules/{other}/* — NEVER import from other modules
    • ../../modules/{other}/ — Relative paths to other modules
    • Embedding other module entities directly