Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Dzoukr/SAFEr.Template
Strongly opinionated modification of amazing SAFE Stack Template for full-stack development in F#.
https://github.com/Dzoukr/SAFEr.Template
Last synced: 3 months ago
JSON representation
Strongly opinionated modification of amazing SAFE Stack Template for full-stack development in F#.
- Host: GitHub
- URL: https://github.com/Dzoukr/SAFEr.Template
- Owner: Dzoukr
- License: mit
- Created: 2020-10-25T21:00:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T06:23:32.000Z (11 months ago)
- Last Synced: 2024-04-28T11:33:30.351Z (10 months ago)
- Language: F#
- Homepage:
- Size: 609 KB
- Stars: 98
- Watchers: 11
- Forks: 14
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fsharp-project-templates - Dzoukr/SAFEr.Template - Strongly opinionated modification of amazing SAFE Stack Template for full-stack development in F# (Full Stack)
README
# SAFEr.Template [![NuGet](https://img.shields.io/nuget/v/SAFEr.Template.svg?style=flat-square)](https://www.nuget.org/packages/SAFEr.Template/)
Strongly opinionated modification of amazing [SAFE Stack Template](https://safe-stack.github.io/) for full-stack development in F#.
## Installation
Install SAFEr Template:
dotnet new install SAFEr.Template
Create new directory for your kick-ass full-stack next-unicorn app:
mkdir NextUnicornApp
cd NextUnicornAppBootstrap your application using Giraffe 🦒:
dotnet new SAFEr
Restore dotnet tools:
dotnet tool restore
And start it in development mode:
dotnet run
Your application is now running on:
http://localhost:8080 // fable frontend
http://localhost:5000 // backend API for Giraffe## Disclaimer
I really love [SAFE Stack Template](https://safe-stack.github.io/) template - it's a great thing for devs to start work on F# full-stack apps. However for me, the minimal template is too minimal and the default template is too different from my preferences, so I always struggle with the need to delete/restructure many things. This template makes it right for me and my projects from the very beginning. Feel free to use it. And one more thing... This template can change every time I decide to take a different approach to F# full-stack, so stay sharp. :)
## Dude, where are my Azure Functions?
If you previously used this template, you may be looking for the Azure Functions template. As I no longer need this scenario and don't want to maintain it, I've removed it from the template in the v4.0.0. However, you can still use it by installing the previous version of the template:
dotnet new install SAFEr.Template --version 3.3.0
## Key differences from SAFE Stack template
### Folder structure
- Project folders contains names of application [AppName].Client, [AppName].Server, ...
### Client
- Fable 4 as dotnet tool
- Feliz + Feliz.DaisyUI as default
- Feliz.Router for secured routing (including fallback to default page when navigating to non-existent page)
- Feliz.UseElmish instead of full Elmish
- TailwindCSS JIT as npm packages
- SharedView module for helper functions to navigate to strongly typed pages
- Public content in `public` folder
- Vite.js instead of webpack
- Femto pre-installed
- Yarn instead of npm used### Server
- Giraffe instead of Saturn as default
- Startup class used for ASP.NET setup
- Application split into more files with separate `WebApp` module### Shared
- Remoting definition in `API` module
### GitHub Actions
- Continuous Integration pipeline prepared in `.github/workflows/CI.yml`