Blazorhosted.DevJojo
1.0.3
dotnet new install Blazorhosted.DevJojo::1.0.3
BlazorHosted .NET 10 Template
This is a custom template for creating a Blazor WebAssembly (WASM) App hosted with ASP.NET Core, using the latest features of .NET 10.
π¦ Whatβs Included
This template scaffolds a solution with the following projects:
Client: The Blazor WebAssembly frontend.Server: The ASP.NET Core backend that serves the client app and hosts APIs.Shared: A shared class library for common models and DTOs.
Features
- β PostgreSQL Database - Pre-configured with Entity Framework Core
- β Cookie Authentication - Fully configured authentication system
- β Identity Management - ASP.NET Core Identity with custom user management
- β Clean Architecture - Organized with Domain, Application, and Infrastructure layers
- β API Documentation - Scalar API reference for development
- β Logging - Serilog configured for console logging
π Getting Started
1. Install the Template
If not already installed, install the template globally:
dotnet new --install Blazorhosted.DevJojo
You can verify the installation using:
dotnet new --list | grep blazorhosted
2. Create a New Project
dotnet new blazorhosted -n MyApp
cd MyApp
This will scaffold:
MyApp/
βββ MyApp.Client/
βββ MyApp.Server/
βββ MyApp.Shared/
βββ MyApp.sln
3. Run the App
From the root folder:
dotnet build
dotnet run --project Server
The app will be available at https://localhost:<PORT_CONFIGURED>
Note: Before running, you need to set up the database. See the Database Configuration section below.
ποΈ Database Configuration
This template uses PostgreSQL by default. You need to:
- Install PostgreSQL (if not already installed)
- Create the database:
psql -U postgres CREATE DATABASE MyAppDb_Dev; \q - Update connection string in
Server/appsettings.Development.json:{ "ConnectionStrings": { "DefaultConnection": "Host=localhost;Port=5432;Database=MyAppDb_Dev;Username=postgres;Password=YOUR_PASSWORD" } } - Run migrations:
cd Server dotnet ef database update
For detailed database setup instructions and alternative database providers, see DATABASE.md.
4. Development Workflow
- Modify Blazor components in
Client/Pages. - Add API controllers or endpoints in
Server/Controllers. - Share models or DTOs between client and server via the
Sharedproject.
βοΈ Customization Tips
- Use
appsettings.Development.jsonfor dev config. - Cookie Authentication has already been configured. All you need is your UI
- Database related items can be found in Infrastracture/Persistence
- Use dependency injection across all projects as needed
π οΈ Build & Publish
To publish the app:
dotnet publish Server -c Release -o ./publish
This bundles the Blazor client app and serves it from the ASP.NET Core backend.
π License
This template is open for personal or commercial use. Customize it freely.
-
net10.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.
v1.0.3: Updated to .NET 10 with all compatible packages. Fixed blank page issue. Excluded build artifacts from template scaffolding. Added UseAuthentication middleware.