This is a GitHub Template for ASP.NET Core MVC using .NET 6.
It contains
- a .NET 8 Solution configured for Vertical Slice Architecture (VSA)
- a ASP.NET Core MVC 8 project
- HTMX
- HTMX .NET extensions
- TailwindCSS 3 including hot reload (JIT)
- tmux/tmuxinator windows / panes for development
- Create a new Repository from this Template as described here.
- Clone your new repository locally
yarn install
cd src/AspNetCoreMvcHtmx
yarn install
libman restore
yarn start
tmuxinator
starts a new session with three windows:
Browse https://localhost:5001
HTMX usage is shown on the Registration view, even the password strength indicator is build with pure ASP.NET and HTMX (no additional JavaScript)
- Not tested on Windows
- JetBrains Rider code completion does not work for TailwindCSS 3 JIT mode in
.cshtml
files currently.
Of course, you want to rename the projects files to match our needs.
You can use these commands, e.g. AspNetCoreMvcHtmx
gets renamed to MyApp
:
LC_ALL=C find . -type f -name '*.*' -not \( -path './node_modules/*' -o -path './src/AspNetCoreMvcHtmx/node_modules/*' -o -path './assets' \) -exec sed -i '' 's|AspNetCoreMvcHtmx|MyApp|g' {} \;
LC_ALL=C find . -type f -name '*.*' -not \( -path './node_modules/*' -o -path './src/AspNetCoreMvcHtmx/node_modules/*' -o -path './assets' \) -exec sed -i 's/AspNetCoreMvcHtmx/MyApp/g' {} \;
find . -depth -name "*AspNetCoreMvcHtmx*" | \
while IFS= read -r ent; do mv $ent ${ent%AspNetCoreMvcHtmx*}MyApp${ent##*AspNetCoreMvcHtmx}; done