Experimental full-stack .NET ecosystem focused on code generation, strongly typed APIs, automatic UI generation, and real-time communication.
gAPI is a collection of libraries, Roslyn source generators, backend/frontend code generators, and infrastructure tools designed to drastically reduce boilerplate in modern .NET applications.
The project is heavily focused on:
- Strongly typed contracts
- Automatic API generation
- Real-time communication
- Generated CRUD flows
- Generated UI components/pages
- Minimal manual glue code
- Keeping full control when needed
The ecosystem is currently used in several of my own projects and serves as both an active portfolio project and an experimental application platform.
This project is under active development and still changes frequently, including breaking changes. The tooling works for my own workflows and projects, but installation/setup is not yet streamlined for external developers.
The goal right now is experimentation, architecture exploration, and building a cohesive ecosystem.
A major design goal of gAPI is:
Generate as much repetitive infrastructure as possible, while still allowing developers to fully take over any layer manually.
Most parts of the ecosystem are intentionally designed as "drop-in" systems:
- You can use the generated/default implementations
- Or completely replace them with your own
gAPI tries to avoid trapping developers in a rigid framework.
The shared core library used by the entire ecosystem.
Contains:
- Attributes
- Delegates
- Interfaces
- DDD-style key/id classes
- Helpers/utilities
- SSE/WSS helpers
- Serialization helpers
Every gAPI project references this library.
The server-side "drop-in" core package.
Contains:
- Authentication infrastructure
- Base data contexts
- Middleware
- Mapping helpers
- Account services
- Fabric client
- Storage client
- SSE/WSS communication helpers
The client-side "drop-in" core package.
Contains:
- Item/List datasource helpers
- Standard client views
- Authentication helpers
AuthenticatedHttpClient- HTTP client handlers
A lightweight abstraction layer to simplify service bus communication.
One of the core ideas behind gAPI is using Roslyn Source Generators to eliminate repetitive application plumbing.
Automatically generates serializers for classes marked with the GenerateSerializer attribute.
Can generate:
- Binary serializers
- Span serializers
- Multipart form data serializers
- Comparers
- Copy/create methods
Supported generation targets include:
BinaryReader/BinaryWriterSpan<byte>- HTTP multipart content
Generates server-side API endpoints for interfaces marked with:
GenerateApiGenerateMinimalApi
Features:
- Automatic endpoint generation
- Automatic routing
- Service discovery/implementation wiring
- Authentication integration
- Minimal API support
Uses:
IServerAuthenticationService
Generates strongly typed client-side API proxies for interfaces marked with:
GenerateApiGenerateMinimalApi
Features:
- Automatic HTTP proxy generation
- Strongly typed contracts
- Integrated authentication support
Uses:
IAuthenticatedHttpClient
The reverse communication counterpart to AutoApi.
Allows the server to invoke client-side interfaces marked with:
GenerateHub
Targets can be:
- Services
- ViewModels
- Razor components
Uses SSE-based communication integrated with the gAPI authentication ecosystem.
Client-side implementation for AutoSse.
Requires registration/subscription through:
IClientConnection
WebSocket-based counterparts of:
AutoApiAutoSse
Because WebSockets are full-duplex, separate client/server communication models become unnecessary.
The architecture and usage remain mostly identical, meaning you can often switch from:
- HTTP + SSE to:
- Full WebSockets
by changing only a few startup lines in Program.cs.
Automatically generates reusable UI components for CRUD-style APIs.
When CRUD methods are marked with special attributes:
IsCreateIsReadIsUpdateIsDeleteIsList
the generator creates components such as:
- Details
- Dropdowns
- Forms
- Editable grids
- Lists
- Selectors
- Tables
Automatically generates pages from GenerateApi interfaces using:
IsPagemethod attributes
Supports:
- Complex object graphs
- Arrays
- Immutable-style data structures
Unlike Roslyn source generators, these libraries generate actual source files into your project.
Generates a complete backend layer based on an Entity Framework DbContext.
Can generate:
- DTOs
- CRUD services
- Service interfaces
- State objects
- Mappers
- UseCases
UseCases act as an adapter layer between:
- Entity Framework
- CRUD services
and are intended to centralize:
- Authorization
- Record-level security
- Business access rules
Generates frontend pages/components physically into your project.
Uses only the service model (GenerateApi interfaces) as source.
Can generate:
- Pages
- CRUD components
- Layout structures
You can:
- Keep the generated source
- Customize it manually
- Or switch to fully automatic runtime/generated components
A lightweight storage server compatible with the gAPI ecosystem.
Comparable to:
- Azure Blob Storage
Supports:
- Local storage
- Azure Storage
- Custom implementations
Features:
- No SQL Server dependency
- Uses
gAPI.EntityFrameworkDisk - Can run on low-cost/free-tier hosting
A console application acting as a backplane for:
- SSE
- WSS communication
Responsible for:
- Routing messages between API nodes
- Coordinating real-time communication
Future plans include:
- Service discovery
- Service-to-service communication
- Full ServiceBus integration
Small helper utility intended to configure projects when installing gAPI packages.
Currently not actively used. The long-term goal is to reduce configuration complexity and rely more on environment variables.
Tiny internal test project.
It compiles. That's about all the guarantees it currently provides 😄
Please don't use it as a reference. If you want to see example usage, check the UwvLlm project instead.
https://github.com/willembeltman/UwvLlm
An experimental file-based persistence library inspired by classic Entity Framework-style workflows.
Instead of using a traditional SQL database, data is stored directly on disk using generated serializers and indexed storage structures.
Features:
- High-performance generated serializers
- Key index files for fast lookups
- Linq expression support for key index based queries
- Experimental lazy loading support
- Experimental support for complex DDD-style entities and aggregates
The library is primarily designed for lightweight/self-hosted scenarios and is currently used internally by gAPI.Storage.Server.
It is still highly experimental and actively evolving.
The authentication system works, but the implementation still needs a cleaner architecture.
Setup is currently not beginner-friendly. A lot of internal assumptions still exist because the ecosystem was initially built for personal use.
The generated UI/component system is still incomplete and evolving.
Breaking changes happen frequently during development.
The ecosystem has grown large enough that multiple active projects now depend on it, including publicly accessible ones.
Open sourcing it allows:
- Transparency
- Collaboration
- Portfolio visibility
- Architectural discussion
- Experimentation with advanced .NET tooling concepts
gAPI heavily experiments with:
- Roslyn Source Generators
- ASP.NET Core
- Minimal APIs
- SSE
- WebSockets
- Strongly typed API contracts
- Code generation
- Immutable-style models
- Automated CRUD/UI generation
- Full-stack .NET workflows
This project is still evolving rapidly.
Some parts are surprisingly stable. Some parts change daily.
The main purpose right now is building a cohesive developer ecosystem that minimizes repetitive work while keeping the flexibility of normal .NET development.