Create Project


Let's make our next cross platform project a success with Bit.Boilerplate.

dotnet new bit-bp --name MyFirstProject 

Name

--name MyFirstProject 

It is required to specify a name for your project.
Server Database

--database Sqlite 
The API project requires an Entity Framework Core DbContext for tables such as ASP.NET Core Identity.

Supported options include SqlServer, PostgreSQL, MySQL and Other.

For the default SQLite option, we'd recommend installing sqlite package for Visual Studio and Visual Studio Code.
Multi-tenancy
--multitenant 

You can experience the Multi-tenancy feature instantly by logging into adminpanel.bitplatform.dev using [email protected] (Password: 123456). This gives you access to a demo tenant ("Store") where you can explore the Dashboard, Products, and Categories.

Alternatively, you can sign in using your regular Google/Gmail account to automatically create your own isolated tenant. Once inside your personal tenant, you will also gain access to advanced Identity Management features, including User and Role administration pages.

Note: The Global Tenant Administration page is exclusive to Global Administrators. To explore global management features, we recommend creating your project following this tutorial and running it locally. You can then log in using [email protected] (Password: 123456) to access full global admin privileges.

File Storage
--filesStorage Local 
The API project includes an Attachment Controller responsible for handling user images, including resizing and saving them in the WebP format using FluentStorage

Local option stores files on local hard drive.
Pipeline

--pipeline GitHub 

Ensure a rapid and reliable deployment by utilizing a pipeline. By selecting GitHub, CI/ CD pipelines will be set up using Github Actions.
Redis

--redis false 

bit Boilerplate handles most of your scalability requirements using Redis:

  • Hybrid (In-memory + Redis) caching with FusionCache
  • Background job processing for Hangfire
  • SignalR backplane (Azure SignalR Service is also pre-configured)
  • Distributed locking
If Redis integration is disabled:
  • In-memory caching will be used instead of hybrid caching
  • Background jobs will be persisted in the database (significantly slower)
In production, You may not scale out the application without addressing distributed locking and SignalR scale out concerns.

Aspire

Aspire helps you publish your project not only on Azure, AWS, and Kubernetes, but also on a simple Linux VPS running a basic Docker Compose setup, automatically building the database, API projects, and more.

In the Bit Boilerplate, .NET Aspire automatically provisions Redis, a database, file storage (Azure Blob Storage or S3), a test SMTP server, Keycloak, and Dev Tunnels for you!
--aspire 

Aspire helps you build, test, and deploy distributed applications with ease. Learn more at ASP.NET Core Aspire.

dotnet tool install -g Aspire.Cli
Aspire requires Docker Desktop to be installed and running. Download and install Docker Desktop from here.

API

--api Integrated 
Select the API mode that best aligns with your specific requirements.

Easily debug and deploy Server.Web projects that serves restful API services, SSR, Blazor Server, Blazor Auto and pre-rendering.

Module

--module None 
Use this parameter to initialize the project with a module. The two available options are Admin Panel and Sales.
Captcha

--captcha None 

By setting this parameter to None, CAPTCHA won't be added to the project.
Push Notification (Native and Web Push)

--notification 
Setting this parameter to True enables native push notification using firebase and APN for Androiod, iOS and macOS apps alongside with Web Push for Web Browsers.
Sample

--sample false 
Use this parameter to initialize the project with a sample pages. Checkout demo sample at Todo.
Sentry

--sentry false 
Adding --sentry true parameter to the dotnet new command allows you to capture errors, crashes, and analytics data seamlessly across all supported platforms.
AppInsights

--appInsights false 
To enable Azure Application Insights for both server and client-side applications (including web), set the appinsights parameter to true. This option will configure the application to store logs such as errors and informational messages.
SignalR

--signalR false 
Enabling this parameter will include sample code for SignalR, which can be used to implement real-time functionalities, such as chat, in your Blazor project.

Note:
Disabling this feature will affect AI Chatbot features.
Offline Database

--offlineDb false 
Setting this parameter to True enables SQLite and Entity Framework Core, allowing for the development of an offline-capable cross platform application.

Warning: It is advisable to use this option only when necessary, as integrating Entity Framework Core can increase application size and potentially reduce startup performance.
Cloudflare

--cloudflare 
Integrating Cloudflare and placing your backend behind the Cloudflare CDN will significantly enhance the app's performance while reducing server load.
Google Ads

--ads false 
Helps you earn money by displaying reward-based Google ads. Demo
bit Brouter

--brouter 
bit Brouter replaces Blazor's built-in Router and brings the powerful routing features that developers enjoy in Vue.js, React and Angular to the Blazor ecosystem: nested routing, async route guards, data loaders, keep-alive pages that preserve their state across navigation, named and typed routes, and animated view transitions.

It stays a drop-in replacement, so your existing @page routes, layouts and authorization keep working unchanged while you opt into the advanced features where you need them.


Visual Studio


Note: In second window of create new project modal, make sure to check Place solution and project in the same directory checkbox.