A modern, high-performance web application template combining the type safety of F#, the reactive UI patterns of Sutil, the utility-first approach of TailwindCSS, and the lightning-fast developer experience of Vite.
Clone the repository:
git clone https://github.com/muqiuhan/fable-sutil-tailwind-vite-template
cd fable-sutil-tailwind-vite-template
Install dependencies:
# Using npm
dotnet tool restore && npm install
# Or using bun
dotnet tool restore && bun install
Start the development server:
# Using npm
npm run dev
# Or using bun
bun run dev
This will:
http://localhost:5173
Create a production build:
# Using npm
npm run build
# Or using bun
bun run build
The output will be in the dist
directory.
āāā .config/ # .NET tool configuration
āāā public/ # Static assets
āāā src/
ā āāā App/ # F# application code
ā ā āāā Pages/ # Page components
ā ā āāā App.fs # Application entry point
ā ā āāā Router.fs # Routing logic
ā ā āāā State.fs # Global state management
ā ā āāā Types.fs # Type definitions
ā āāā style.css # Global styles with Tailwind imports
āāā index.html # HTML entry point
āāā tailwind.config.js # Tailwind configuration
āāā vite.config.ts # Vite configuration
Edit tailwind.config.js
to customize themes, extend utilities, or add plugins.
Add new pages by extending the Page
type in Types.fs
and updating the router in Router.fs
.
Global state is managed through the Elmish pattern in State.fs
.
This project is licensed under the MIT License - see the LICENSE file for details.