Skip to content

About

😃 .NET and FreeSql CMS with separate frontend and backend, Docker, OAuth2, DevOps, Gitee sync, code generation, and a Juejin-style blog | 基于 .NET 和 FreeSql 的 CMS,支持前后端分离、Docker、OAuth2、DevOps、Gitee 同步、代码生成及掘金风格专栏

Topics

Resources

Stars

833 stars

Watchers

22 watching

Forks

Repository files navigation

English | 简体中文



Lin CMS By .NET

😃 A simple and practical CMS implemented by ASP.NET Core

Project overview

Publish .NET IDE Rider

This project began as a personal interest after seeing Python and Node.js versions of Lin CMS and the community's lin-cms-tp5.

This is an ASP.NET Core implementation of the Lin CMS backend, paired with a Vue.js frontend. It includes permissions, dictionary items, articles, comments and likes, notifications, tags, and other Juejin-style features.

What is Lin CMS?

Lin CMS is a content management system framework distilled from the Lin team’s project experience. It helps developers build CMS applications more efficiently. For the frontend, visit the frontend repository.

Source repositories

Online documentation (in progress)

Online demos

Demo sign-in details are listed in the Chinese README.

Frontend

  • The original open-source frontend is extended with articles, tags, comments, user and tag following, and technology channels. A plugin mechanism was planned but is not yet available. See the module design for details.

Lin CMS features

Lin CMS has several distinctive design goals:

Lin CMS separates the frontend and backend

Lin provides both backend services and a corresponding frontend.

Traditional websites often render pages on the server using template technologies such as Razor.

Server-side rendering can support SEO well, but SEO is less important for an internal CMS administration system.

A practical question is who should implement server-rendered pages: frontend developers may not know server-side template languages, while backend developers may not specialize in page development. Separating the layers lets frontend developers use Vue, JavaScript, and CSS, while backend developers focus on the API.

The project also favors the experience provided by a single-page application.

Common CMS features are built in

Lin includes common CMS capabilities such as user management, permissions, and logging, allowing developers to focus on their application’s business features.

For more information, see the Lin CMS documentation.

Prerequisites

JWT signing key (required)

In production, set Authentication:JwtBearer:SecurityKey in appsettings.Production.json, or provide Authentication__JwtBearer__SecurityKey through a protected environment variable or secret manager. Use a unique cryptographically random key of at least 64 characters for each deployment; do not commit it to Git. If absent in development or testing, the application generates a key and writes it to appsettings.json in the working directory. In production it writes to appsettings.Production.json and reuses it on later starts. The application refuses to start if the key is too short or still uses the repository’s old default. PowerShell can generate a key and set an environment variable for the current process:

$jwtKeyBytes = New-Object byte[] 64
[System.Security.Cryptography.RandomNumberGenerator]::Fill($jwtKeyBytes)
$env:Authentication__JwtBearer__SecurityKey = [Convert]::ToBase64String($jwtKeyBytes)

Persist the generated value in appsettings.Production.json or a secret manager. All instances in one deployment must share the same key; do not regenerate it on every restart. If the configuration file is tracked by Git, revert the locally generated change or exclude it from deployment changes to avoid committing the key. When using run.sh, provide JWT_SIGNING_KEY from a protected deployment environment; the script passes it to the container. If omitted, the app uses the mounted appsettings.Production.json and writes a local key file if configuration is still missing. Deployments that used the publicly known default key must rotate it and restart every instance. Existing access tokens will become invalid and users must sign in again. JWT validation also checks the user’s current status and loads current roles and groups from the database. Disabled or deleted accounts cannot continue using old tokens.

Because Lin separates frontend and backend, familiarity with C# and Vue is required.

C# backend

The backend is built on .NET. Familiarity with MVC, Web API, filters, or .NET Framework MVC will help you get started.

Technologies

Practices

  • DDD(Domain-Driven Design)Domain-driven design
  • Logging (logging)
  • DevOps(CI/CD,automated builds)
  • Database Migrations(automated database migrations)
  • Authentication(authentication)
  • Authorization(authorization)
  • Separation of Concerns(separation of concerns)
  • Repository Pattern(repository pattern)
  • SOLID Principles(single responsibility)
  • Clean Code(clean code)

Layers

  • src
    • LinCms.Web:API(ASP.NET Core)
    • LinCms.Application:application services
    • LinCms.Application.Contracts:DTO,data transfer objects,application service interfaces
    • LinCms.Infrastructure:infrastructure and persistence
    • LinCms.Core:application core: entities, common operations, AOP extensions, pagination, dependency interfaces, time extensions, current-user information, exceptions, and value objects
  • test

Frontend

Frontend development requires familiarity with Vue, ES6, axios, Element UI, webpack, Vuex, Vue Router, and related tools.

Community

QQ group

  • .NET Core搬砖队(lin-cms-dotnetcore) QQ group number: 762828442

WeChat public account

Search WeChat for: dotNET搬砖队

Changelog

https://github.com/luoyunchong/lin-cms-dotnetcore/wiki/Changelog-English

About

😃 .NET and FreeSql CMS with separate frontend and backend, Docker, OAuth2, DevOps, Gitee sync, code generation, and a Juejin-style blog | 基于 .NET 和 FreeSql 的 CMS,支持前后端分离、Docker、OAuth2、DevOps、Gitee 同步、代码生成及掘金风格专栏

Topics

Resources

Stars

833 stars

Watchers

22 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址