Blazorhosted.DevJojo 1.0.3

dotnet new install Blazorhosted.DevJojo::1.0.3
                    
This package contains a .NET Template Package you can call from the shell/command line.

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:

  1. Install PostgreSQL (if not already installed)
  2. Create the database:
    psql -U postgres
    CREATE DATABASE MyAppDb_Dev;
    \q
    
  3. Update connection string in Server/appsettings.Development.json:
    {
      "ConnectionStrings": {
        "DefaultConnection": "Host=localhost;Port=5432;Database=MyAppDb_Dev;Username=postgres;Password=YOUR_PASSWORD"
      }
    }
    
  4. 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 Shared project.

βš™οΈ Customization Tips

  • Use appsettings.Development.json for 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.

Version Downloads Last Updated
1.0.3 363 12/21/2025
1.0.2 453 7/4/2025
1.0.1 361 6/11/2025
1.0.0 353 6/11/2025

v1.0.3: Updated to .NET 10 with all compatible packages. Fixed blank page issue. Excluded build artifacts from template scaffolding. Added UseAuthentication middleware.