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 READMEBackend 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 docsFrontend 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 assetsModule 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.
| Directory | Layer | Contents | Imports Allowed |
|---|---|---|---|
| domain/entities/ | Domain | Zod schemas, business rules | External packages only |
| domain/interfaces/ | Domain | Repository contracts | Domain entities |
| data/models/ | Data | API DTOs (raw API shapes) | @core/network |
| data/mappers/ | Data | DTO ↔ Entity mapping | Domain + Data models |
| data/repositories/ | Data | Interface implementations | @core/network, mappers |
| presentation/viewmodels/ | Presentation | React hooks with logic | Domain interfaces, TanStack Query |
| presentation/views/ | Presentation | Pure UI (<200 lines) | ViewModels, components |
| presentation/components/ | Presentation | Reusable section UI | @core/ui, own module only |
| di.ts | Root | DI container for module | Repositories, services |
| index.ts | Root | Public API exports | Views, 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