This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Shesha is an open-source Low-Code development framework for .NET developers. It combines ASP.NET Core, ABP.io, React, and Next.js with drag-and-drop form building capabilities to reduce code requirements by 80%+ for typical business applications.
shesha-framework/
├── shesha-core/ # .NET backend framework (main solution)
├── shesha-reactjs/ # React/TypeScript component library (@shesha-io/reactjs)
├── shesha-starter/ # Starter template for new projects
├── shesha-functional-tests/ # Functional test suite
# Build the framework
dotnet build shesha-core/Shesha.sln --configuration Release
# Run backend tests (requires Docker for Testcontainers)
cd shesha-core/test/Shesha.Tests
dotnet test Shesha.Tests.csproj --configuration Release# Install dependencies
cd shesha-reactjs
npm install
# Build the library (includes lint check)
npm run build
# Run tests
npm test
# Run single test file
npx vitest run path/to/test
# Watch mode for development
npm run start
# Lint
npm run lint
npm run lint-fix
# Type check (strict null checks)
npm run type-check# Frontend development
cd shesha-starter/frontend
npm install
npm run dev
# Production build
npm run build
npm run start- Domain Layer (
Shesha.Core) - Domain entities, interfaces, business logic - Framework Layer (
Shesha.Framework) - Dynamic CRUD, metadata, configuration studio, JSON logic engine - Application Layer (
Shesha.Application) - Application services, DTOs, CRUD app services - Web Layer (
Shesha.Web.Host,Shesha.Web.Core) - API controllers, authorization, Swagger
Modules inherit from SheshaModule with lifecycle hooks:
PreInitialize()- Register servicesInitialize()- Configure servicesInitializeConfigurationAsync()- Async initialization
Key modules: Shesha.NHibernate (ORM), Shesha.GraphQL, Shesha.Scheduler (HangFire), Shesha.FluentMigrator
Provider Pattern - Context providers for state management:
SheshaApplicationProvider- App-level configurationFormDesignerProvider- Form builder contextDataContextProvider- Data management (appContext, pageContext, formContext)
Key Directories (shesha-reactjs/src/):
components/- 40+ UI components (dataTable, autocomplete, modal, etc.)designer-components/- Form builder componentsproviders/- Context providershooks/- Custom React hooks (useGet, useMutate, useFormExpression, etc.)apis/- API integration layer
Backend automatically generates CRUD APIs from domain entities via DynamicCrudAppService. Enable through entity configuration - no boilerplate code needed.
Replaces GlobalState to prevent unnecessary re-renders:
appContext- App-wide datapageContext- Page-scoped dataformContext- Form-scoped data
- Framework: xUnit with Testcontainers
- Requires Docker daemon running
- Tests run against SQL Server/PostgreSQL in containers
- Framework: Vitest with React Testing Library (jest-dom matchers via
@testing-library/jest-dom/vitest) - Config:
vitest.config.mjs, setup invitest-setup.ts globals: true, sodescribe/it/expect/viare used without importing them (typed via thevitest/globalsentry intsconfig.json)- Test files:
*.test.tsor*.spec.tsxinsrc/
- Default values set via
onAfterDataLoadscripts (not DefaultValue property) - Scripts execute in dependency order
- Direct write access to
dataandcontextwithout SetFieldValue
Use conventional commits via Commitizen: npm run commit
- Primary: SQL Server, PostgreSQL (via NHibernate)
- Additional: MongoDB (Shesha.MongoRepository), PostGIS for geographic data
- Migrations: FluentMigrator