NeuCharFramework (NCF)
  • NCF - NeuCharFramework
  • Projects

    • Preparation
    • NcfPackageSources Source Guide
    • DynamicWebApiEngine
    • Deployment
    • MCP (Model Context Protocol) Module
    • Senparc.AI
  • AIKernel Local Fine-Tuning
  • Help

    • Online Resources
    • Q&A Community
    • QQ Group (147054579)
    • Senparc WeChat SDK
  • Gitee
  • GitHub
  • English
  • 简体中文
GitHub
  • NCF - NeuCharFramework
  • Projects

    • Preparation
    • NcfPackageSources Source Guide
    • DynamicWebApiEngine
    • Deployment
    • MCP (Model Context Protocol) Module
    • Senparc.AI
  • AIKernel Local Fine-Tuning
  • Help

    • Online Resources
    • Q&A Community
    • QQ Group (147054579)
    • Senparc WeChat SDK
  • Gitee
  • GitHub
  • English
  • 简体中文
GitHub
  • Source Development

    • NcfPackageSources Beginner Quickstart (60 Minutes)
    • NcfPackageSources Source Guide
    • Project Relationships, Synchronization, and Release
    • Version Upgrade Notes
    • NcfPackageSources_Include_NcfSimulatedSite.sln Project Map
  • XNCF Source Analysis

    • NCF Capability Source Deep Dive (Practical)
    • XNCF Extension Library Guide (Senparc.Xncf.xxx)
    • XNCF Module Documentation Map
    • Senparc.Web and Admin
    • AIKernel Local Fine-Tuning
    • XncfBuilder Isolated Development: Source Analysis
    • NeuChar Workflow: Operations and {{= ... }} Expressions
    • Senparc.Xncf.Sandbox Environment Setup
  • NCF Library Source Analysis

    • Senparc.Ncf.Core
    • Senparc.Ncf.Database (Database Foundation)
    • Senparc.Ncf.Repository
    • Senparc.Ncf.Service
    • Senparc.Ncf.SMS
    • Senparc.Ncf.Mvc.UI
    • Senparc.Ncf.Log
    • Senparc.Ncf.Utility
    • Senparc.Ncf.XncfBase
    • Senparc.Ncf.AreaBase
    • Senparc.Ncf.DatabasePlant
  • Core Interface Source Analysis

    • IXncfRegister Interface (Current)

Senparc.Web and Admin

This page explains the runnable host and administrator area included by NcfPackageSources_Include_NcfSimulatedSite.sln. It is for beginners who need to run the source tree and contributors who need to know where host, installer, and module code belongs.

1. What each project does

ProjectResponsibilityWhat it is not
Senparc.WebASP.NET Core host, startup, middleware, configuration, static assets, and module compositionA place to put ordinary business features
Senparc.Areas.AdminAdmin Area pages, management interactions, Admin Chat, metrics, and administration APIsThe implementation of every business XNCF
Senparc.Xncf.InstallerFirst-run initialization, default module selection, and installation flowA replacement for normal module lifecycle management
Senparc.Xncf.AccountsAdministrator/account behavior used by login and account managementA general-purpose identity provider
Template_OrgName.Xncf.Template_XncfNameA generated sample module used to verify the template shapeThe host's business layer

The host composes the system XNCFs, Admin, installer, account module, and optional capabilities such as AI, RAG, MCP, and Workflow. The runtime behavior therefore comes from the composition of modules, not from Senparc.Web alone.

2. Run the source tree

From the NcfPackageSources repository root:

dotnet restore src/NcfPackageSources_Include_NcfSimulatedSite.sln
dotnet build src/NcfPackageSources_Include_NcfSimulatedSite.sln
dotnet run --project tools/NcfSimulatedSite/Senparc.Web/Senparc.Web.csproj --launch-profile http

Open the URL printed by the host, normally http://localhost:5000. The installer is expected on the first visit.

First-run order

  1. Complete the installer and confirm the database provider.
  2. Create or confirm the administrator account.
  3. Sign in at /Admin/Login.
  4. Open Extension Modules > Module Management.
  5. Confirm that a module is installed, then enable it.
  6. Check its menu and permissions before testing its Functions.

Installation only makes a module available. Enabling it makes its executable capabilities available. A menu can also be hidden by role permissions.

3. How Admin is assembled

The Admin experience is a collaboration of modules:

  • Senparc.Areas.Admin provides the host area and management pages.
  • SystemCore and SystemManager provide system-level structures and settings.
  • SystemPermission controls roles, policies, pages, and buttons.
  • Menu stores and exposes menu metadata.
  • XncfModuleManager discovers and manages XNCF lifecycle state.
  • Accounts and the host authentication configuration provide login context.

When a new XNCF adds a page, it should declare its own Area/menu/permission surface. Do not add module business logic to Admin merely to make a menu appear.

4. Where to change code

ChangeCorrect project or layer
Add a business capabilityCreate a new XNCF from XncfBuilder.Template
Add a module pageThe module's Area and application service
Add module dataThe module's database project and migrations
Change login/account behaviorSenparc.Xncf.Accounts and its related contracts
Change installation defaultsSenparc.Xncf.Installer and host configuration
Change global middleware or service registrationSenparc.Web
Change common Admin UI or management behaviorSenparc.Areas.Admin
Test Admin behaviorSenparc.Areas.Admin.Tests

Keep Senparc.Web as a composition root. If a feature can be installed, enabled, permissioned, or updated independently, it belongs in an XNCF.

5. Troubleshooting

SymptomCheck first
Installer appears every timeDatabase connection, initialization logs, and completed installer state
Login succeeds but a menu is missingModule enabled state, current role, and Menu/SystemPermission data
Module menu is visible but Functions failFunction registration, module state, input validation, and authorization
Admin page returns 401/403Cookie/JWT state, Admin policy, role assignment, and route permissions
Host starts but a module is absentAssembly discovery, project reference/package, Register implementation, and startup logs

For the operator workflow see Admin Backend and Module Management. For custom module development see XNCF contracts.

Edit this page on GitHub
Last Updated:
Contributors: JeffreySu
Prev
XNCF Module Documentation Map
Next
AIKernel Local Fine-Tuning