GiraffeWebApp.Templates
0.4.1
dotnet new install GiraffeWebApp.Templates::0.4.1
This package contains a .NET Template Package you can call from the shell/command line.
Giraffe WebApp Template
An opinionated full stack .NET template for the Giraffe F# framework.
Guiding Princples
In rough order of priority
- Choose boring tech
- UI is driven by HTML (via Giraffe.ViewEngine)
- Limited Javascript
- Using htmx for interactivity (via Giraffe.ViewEngine.Htmx)
- Lean into functional paradigms
- Limit use of dependency injection
- Limit use of classes/OO principles
- An onion-y architecture
- IO happens at Handler levels
- Keep business logic pure
- Stay close to the ASP.NET Core convention
- If you're confused about how something works in F#/Giraffe, ideally searching for the way C#/ASP.Net Core does it should help you out.
Technology Choices
- Giraffe F# framework
- Builds on top of ASP.NET Core
- Postgres for Database
- DbUp for database migrations
- Dapper to handle DB queries
- Giraffe.ViewEngine for UI
- SimpleCSS for styling
How to Install
Run the following command on in a CLI:
dotnet new install "GiraffeWebApp.Templates::*"
How to Use
When creating a template, pass the following information:
--name
- the name for your project--DbName
- the name of your database--DbSchema
- the name of your db schema
Sample command:
dotnet new giraffewebapp --name Gitt --DbName gitt --DbSchema dev
Testing the Template Locally
To install template from source:
- Navigate to
src/content/GiraffeWebApp/
- Run
dotnet new install ./
to install template - Create project from template
dotnet new giraffewebapp --n MyProject
To uninstall template:
- Navigate to
src/content/GiraffeWebApp/
- Run
dotnet new uninstall ./
Sources
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.