https://github.com/pdmlab/dotnetcoresaastemplate
https://github.com/pdmlab/dotnetcoresaastemplate
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pdmlab/dotnetcoresaastemplate
- Owner: PDMLab
- License: mit
- Created: 2022-06-22T08:04:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-26T00:12:05.000Z (over 3 years ago)
- Last Synced: 2025-06-01T11:42:37.295Z (about 1 year ago)
- Language: HTML
- Size: 2.02 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AspNet (Core) MVC Template
This is a GitHub Template for ASP.NET Core MVC using .NET 6.
It contains
* a .NET 6 Solution
* a ASP.NET Core MVC 6 project
* HTMX
* HTMX .NET extensions
* TailwindCSS 3 including hot reload (JIT)
* tmux/tmuxinator windows / panes for development
## Usage
### Create a new Repository
* Create a new Repository from this Template as described [here](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).
* Clone your new repository locally
### Run the solution
#### First time
```
yarn install
cd src/DotNetCoreSaaS
yarn install
libman restore
```
#### Development
```
yarn start
```
`tmuxinator` starts a new session with three windows:
##### Workspace

##### App (.NET output)

##### Frontend (tailwind build)

Browse https://localhost:5001

#### HTMX interaction
HTMX usage is shown on the Registration view, even the password strength indicator is build with pure ASP.NET and HTMX (no additional JavaScript)

## Known issues
* Not tested on Windows
* JetBrains Rider code completion does not work for TailwindCSS 3 JIT mode in `.cshtml` files [currently](https://youtrack.jetbrains.com/issue/RIDER-58725).
## Renaming solution / project / folders
Of course, you want to rename the projects files to match our needs.
You can use these commands, e.g. `DotNetCoreSaaS` gets renamed to `MyApp`:
### Rename all references inside the files
#### macOS
```shell
LC_ALL=C find . -type f -name '*.*' -not \( -path './node_modules/*' -o -path './src/DotNetCoreSaaS/node_modules/*' -o -path './assets' \) -exec sed -i '' 's|DotNetCoreSaaS|MyApp|g' {} \;
```
#### Linux
```shell
LC_ALL=C find . -type f -name '*.*' -not \( -path './node_modules/*' -o -path './src/DotNetCoreSaaS/node_modules/*' -o -path './assets' \) -exec sed -i 's/DotNetCoreSaaS/MyApp/g' {} \;
```
### Rename files and folders
#### macOS and Linux
```bash
find . -depth -name "*DotNetCoreSaaS*" | \
while IFS= read -r ent; do mv $ent ${ent%DotNetCoreSaaS*}MyApp${ent##*DotNetCoreSaaS}; done
```