LuciferCore.Templates 2.10.0

Prefix Reserved
dotnet new install LuciferCore.Templates@2.10.0
                    
This package contains a .NET Template Package you can call from the shell/command line.

LuciferCore High-Throughput App Template

A dotnet new template for LuciferCore — an attribute-driven WebSocket/HTTP server with built-in routing, DI, and middleware. Scaffolds a ready-to-run app so you focus on business logic, not setup.

Requirements

  • .NET 9 SDK

Install & Create Project

# installs the latest version
dotnet new install LuciferCore.Templates

To install a specific version instead:

dotnet new install LuciferCore.Templates@<version>

# example
dotnet new install LuciferCore.Templates@1.0.0

Once the template package is installed:

# Create a standard application project
dotnet new lucifer-app -n <YourProjectName>

# Or create a LuciferCore Labs project (hands-on tutorial / lab)
dotnet new lucifer-labs-en -n <YourProjectName>   # English version
dotnet new lucifer-labs-vi -n <YourProjectName>   # Vietnamese version

# Run it
cd <YourProjectName>
dotnet run

Uninstall (always the same, regardless of how it was installed):

dotnet new uninstall LuciferCore.Templates

Project Structure

TestApp/
│   Program.cs              # Entry point
│
├───Assets
│   ├───config/.lucifercore # App configuration
│   └───wwwroot             # Static files served by the app
│
├───Core
│       AppServer.cs        # Server setup (port, socket options)
│       AppSession.cs       # Per-connection HTTP/WebSocket handling
│       Bootstrap.cs        # DI & service registration
│
├───Contract
│       IPayment.cs         # Example swappable interface
│
├───Database
│       AppDBContext.cs     # EF Core context (auto-registers [Table] entities)
│       DBConfig.cs         # Connection string builder
│
├───Handler
│       AuthHandler.cs      # /api/auth/* endpoints
│       HomeHandler.cs      # /api/ping endpoint
│
├───Middleware
│       LogMiddleware.cs    # Example middleware
│
└───Service
        AuthService.cs      # Business logic
        MomoPay.cs / PayPalPay.cs  # IPayment implementations

Configuration — .lucifercore

WWW = Assets/wwwroot
PORT = 23456

DBHost = localhost
DBPort = 1433
DBUser = your_username
DBPassword = your_password
DBName = your_database_name
DBTrustServerCertificate = true
DBConnectTimeout = 30
DBCommandTimeout = 30
DBMaxPoolSize = 100
DBAppName = LuciferCoreApp
Key Meaning
WWW Folder served as static content
PORT Listening port
DBHost/Port/User/Password/Name Database connection details
DBTrustServerCertificate Skip TLS cert validation (dev only)
DBConnectTimeout / DBCommandTimeout Timeouts (seconds)
DBMaxPoolSize Max DB connection pool size
DBAppName App name reported to the DB engine

Supported providers in DBConfig: SQL Server, PostgreSQL, MySQL, SQLite, Oracle, MongoDB, Redis.

Request Flow

Client → AppServer → AppSession → RouteHandler
       → Middleware ([Log] etc.) → Handler method
       → Service (business logic) → ResponseModel
       → session.SendResponseAsync()

Startup wiring happens once in Bootstrap.Initialize(): registers the DbContext, DB provider options, and default service implementations (e.g. IPayment → PayPalPay).

Common Tasks

New endpoint — add a class with [Handler("v1", "/api/x")], then a method with [HttpGet]/[HttpPost], injecting [Session] AppSession and [Data] RequestModel.

New middleware — create a [Middleware("Name")] class, and an attribute inheriting UseMiddlewareAttribute calling base("Name") (names must match).

New DB entity — add a class with [Table("Name")]; it's picked up automatically, no manual DbSet needed.

Swap a service — in Bootstrap.cs, change e.g. Lucifer.SetModelI<IPayment, MomoPay>().

License

LuciferCore uses dual licensing:

  • AGPL-3.0-only — open-source / evaluation use
  • Commercial License — required for closed-source or enterprise/SaaS products

👉 Commercial license: https://bufmod.lemonsqueezy.com/

Author

This package has 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
2.10.0 82 9/26/2026
2.9.0 82 9/24/2026
2.8.0 87 9/24/2026
2.7.0 84 9/23/2026
2.6.0 83 9/22/2026
2.5.0 89 9/15/2026
2.5.0-debug 91 9/15/2026
2.4.0 94 9/15/2026
2.3.0 98 9/13/2026
2.2.0 102 9/12/2026
2.1.0 104 9/12/2026
Loading failed