Appearance
Getting Started
Welcome to Gryd.IO! This guide will help you get up and running quickly.
Quick Start with Templates
The fastest way to start a new project is using our CLI templates:
bash
# Install Gryd.IO templates
dotnet new install Gryd.IO.Templates
# Create a complete API with Auth + Crud
dotnet new gryd-api -n MyApiProject
# Or create a minimal API
dotnet new gryd-minimal -n MyMinimalApi
# Or create a new module for an existing project
dotnet new gryd-module -n Products -o CatalogTIP
See the CLI Templates documentation for all available options and generated structures.
Prerequisites
- .NET 10.0 SDK or later
- Your favorite IDE (Visual Studio, VS Code, Rider)
- Basic knowledge of C# and ASP.NET Core
Manual Installation
For standalone package installation and the supported NuGet feed configuration, follow the canonical Installation guide. The package overview lists the current package IDs.
Project Structure
Gryd.IO follows Clean Architecture principles. Here's the recommended structure:
📦 YourApplication/
├── 📁 src/
│ ├── 📁 Core/
│ │ ├── 📁 YourApp.Domain/ # Entities, ValueObjects, Events
│ │ └── 📁 YourApp.Application/ # Commands, Queries, Handlers
│ ├── 📁 Infrastructure/
│ │ └── 📁 YourApp.Infrastructure/ # Repositories, External Services
│ └── 📁 Presentation/
│ └── 📁 YourApp.API/ # Controllers, Middlewares
└── 📁 tests/
├── 📁 YourApp.Domain.Tests/
├── 📁 YourApp.Application.Tests/
└── 📁 YourApp.API.Tests/Run a maintained minimal API
The gryd-minimal template is a small runnable API. Install the templates using the template installation instructions, then generate a project:
bash
dotnet new gryd-minimal -n MyMinimalApi
cd MyMinimalApiThe generated project targets .NET 10 and defaults to PostgreSQL. Start a local PostgreSQL database, then set a complete connection string for this process; replace the example password with your local value:
bash
export ConnectionStrings__DefaultConnection='Host=localhost;Port=5432;Database=grydminimaldb_dev;Username=postgres;Password=local-postgres-password'
dotnet restore
dotnet build
dotnet run --urls http://localhost:5000The controller exposes GET /api/v1/hello. In another terminal, verify the route and health checks:
bash
curl http://localhost:5000/api/v1/hello
curl http://localhost:5000/health/live
curl http://localhost:5000/health/readyLiveness does not check dependencies. Readiness checks PostgreSQL connectivity with a three-second bound, so it returns 503 if the database is unavailable. These endpoints do not verify migrations or application tables. The generated appsettings contains a Development sample connection string; the environment variable above overrides it. Use a local password and never commit real credentials.
The route and service setup come from the maintained HelloController and Program.cs. The template is compiled by the repository's template validation workflow. For Auth-enabled or Clean Architecture projects, use gryd-api or gryd-module; their options and generated structure are described in CLI templates.
When Auth is included, configure its separate ConnectionStrings:DefaultPostgresConnection as well as any business database connection. See the Auth getting started guide and the module template README for RSA keys, Redis, migration commands, and local configuration. .NET does not expand ${NAME} placeholders embedded in JSON; provide complete secret values through environment configuration, user-secrets, or a secret manager.