<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Angelo Pirola</title>
    <description>The latest articles on DEV Community by Angelo Pirola (@angelodotnet).</description>
    <link>https://dev.to/angelodotnet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1072918%2F4c8e5e98-77cf-4cb4-a7e9-17c9dafd6045.jpeg</url>
      <title>DEV Community: Angelo Pirola</title>
      <link>https://dev.to/angelodotnet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/angelodotnet"/>
    <language>en</language>
    <item>
      <title>Claude config: rules and guardrails for Claude ... (Update: 14/11/2026)</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Sat, 14 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/claude-config-rules-and-guardrails-for-claude-update-14112026-393</link>
      <guid>https://dev.to/angelodotnet/claude-config-rules-and-guardrails-for-claude-update-14112026-393</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is the follow-up to my &lt;a href="https://dev.to/angelodotnet/update-10112026-claude-config-rules-and-guardrails-for-claude-4a6p"&gt;10/11/2026 update&lt;/a&gt;. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you missed it: &lt;a href="https://github.com/AngeloDotNet/claude-config" rel="noopener noreferrer"&gt;&lt;code&gt;claude-config&lt;/code&gt;&lt;/a&gt; is a template repository of rule files for Claude Code on .NET + Angular projects, plus a personal plugin, &lt;code&gt;kit&lt;/code&gt;, that turns the most important rules into hooks and slash commands.&lt;/p&gt;

&lt;p&gt;In four days the plugin went from &lt;strong&gt;1.10.0 to 1.14.0&lt;/strong&gt;. Here is what actually changed, and why.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Before (10/11)&lt;/th&gt;
&lt;th&gt;Now (14/11)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Plugin&lt;/td&gt;
&lt;td&gt;1.10.0&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.14.0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slash commands&lt;/td&gt;
&lt;td&gt;a handful&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;21&lt;/strong&gt; (&lt;code&gt;/kit:...&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hooks&lt;/td&gt;
&lt;td&gt;fewer, stricter&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;13 checks&lt;/strong&gt;, fewer blocking ones&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rules&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;core.md&lt;/code&gt; 3.3x&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;core.md&lt;/code&gt; &lt;strong&gt;3.44&lt;/strong&gt;, &lt;code&gt;git.md&lt;/code&gt; &lt;strong&gt;1.9&lt;/strong&gt;, &lt;code&gt;lavoro.md&lt;/code&gt; &lt;strong&gt;1.3&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker module&lt;/td&gt;
&lt;td&gt;loaded with the rest&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;optional&lt;/strong&gt;, only on explicit request&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  1. Fewer blocks, more written rules
&lt;/h2&gt;

&lt;p&gt;The first lesson of using hooks for a few days: &lt;strong&gt;a hook should block what is dangerous, not what is merely stylistic.&lt;/strong&gt; I removed from &lt;code&gt;guard-commands&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the block on &lt;code&gt;git init&lt;/code&gt; (it stays a written rule: Claude never initialises a repository by itself);&lt;/li&gt;
&lt;li&gt;the checks on commit-message &lt;em&gt;shape&lt;/em&gt; (capital letter, trailing full stop, 72 characters). The hook now only verifies the &lt;code&gt;type(scope): description&lt;/code&gt; format.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;attesa-test&lt;/code&gt; (arbitrary waits in tests) and &lt;code&gt;nowarn&lt;/code&gt; became &lt;strong&gt;warnings&lt;/strong&gt; instead of blocks. A legitimate exception is still declared in the code with &lt;code&gt;kit-allow: &amp;lt;id&amp;gt; — &amp;lt;reason&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What stays blocked: &lt;code&gt;push --force&lt;/code&gt;, &lt;code&gt;reset --hard&lt;/code&gt;, &lt;code&gt;--no-verify&lt;/code&gt;, &lt;code&gt;clean -f&lt;/code&gt;, &lt;code&gt;rm -rf&lt;/code&gt;, &lt;code&gt;git add -A&lt;/code&gt;, real secrets in &lt;code&gt;appsettings*.json&lt;/code&gt;, and a few unsafe code patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A real release flow: tag, bump, GitHub release
&lt;/h2&gt;

&lt;p&gt;Tags and releases used to be "somebody should do this". Now they are rules &lt;strong&gt;and&lt;/strong&gt; a check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tag format is &lt;code&gt;X.Y.Z&lt;/code&gt; (no &lt;code&gt;v&lt;/code&gt; prefix), annotated, created &lt;strong&gt;only after&lt;/strong&gt; the merge on &lt;code&gt;main&lt;/code&gt;, pointing at the merge commit.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;guard-commands&lt;/code&gt; blocks the creation of a tag with a different name or from a branch other than &lt;code&gt;main&lt;/code&gt;. Listing and deleting tags still work.&lt;/li&gt;
&lt;li&gt;At the end of every completed plan, Claude &lt;strong&gt;proposes&lt;/strong&gt; the bump commit (SemVer version with the reason, version file, &lt;code&gt;### Release X.Y.Z&lt;/code&gt; entry in the changelog) on a &lt;code&gt;release/X.Y.Z&lt;/code&gt; branch. It never decides the version alone and never commits on &lt;code&gt;main&lt;/code&gt; or &lt;code&gt;develop&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Tag, tag push and &lt;code&gt;gh release&lt;/code&gt; each need an explicit yes. The user's yes cannot be verified by a hook, so this one is a written rule.&lt;/li&gt;
&lt;li&gt;Pull requests and releases through &lt;code&gt;gh&lt;/code&gt; work only if the project's &lt;code&gt;CLAUDE.md&lt;/code&gt; declares the GitHub CLI as installed. Claude asks that &lt;strong&gt;once per project&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Commit and PR skills: launching them is the green light
&lt;/h2&gt;

&lt;p&gt;Three skills cover the daily git loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/kit:commit-passo&lt;/code&gt;&lt;/strong&gt; creates the commits in sequence, with no intermediate confirmations, never on &lt;code&gt;main&lt;/code&gt;/&lt;code&gt;develop&lt;/code&gt; (it creates the working branch itself). It stops with a single question only in anomalous cases: possible secret, ambiguous type, a file with changes for different commits, red build or tests, failed hook.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/kit:pr-develop&lt;/code&gt;&lt;/strong&gt; opens the PR from &lt;code&gt;feature/*&lt;/code&gt; or &lt;code&gt;bugfix/*&lt;/code&gt; to &lt;code&gt;develop&lt;/code&gt;. It is the only skill Claude may launch on its own, and only after proposing it with one question at the end of &lt;code&gt;commit-passo&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/kit:pr-main&lt;/code&gt;&lt;/strong&gt; opens the PR to &lt;code&gt;main&lt;/code&gt;, checks whether &lt;code&gt;main&lt;/code&gt; is ahead of &lt;code&gt;develop&lt;/code&gt; first (merge commit, never squash, to avoid &lt;code&gt;add/add&lt;/code&gt; conflicts on the next PR), and after &lt;em&gt;your&lt;/em&gt; confirmed merge cleans up the merged working branches and aligns &lt;code&gt;main&lt;/code&gt; and &lt;code&gt;develop&lt;/code&gt; with &lt;code&gt;git pull --ff-only&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The merge itself is always yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Review skills that cannot edit files
&lt;/h2&gt;

&lt;p&gt;There are now 13 review-style skills (&lt;code&gt;/kit:review-regole&lt;/code&gt;, &lt;code&gt;/kit:consegna&lt;/code&gt;, &lt;code&gt;/kit:verifica&lt;/code&gt;, &lt;code&gt;/kit:sicurezza&lt;/code&gt;, &lt;code&gt;/kit:verifica-frontend&lt;/code&gt;, &lt;code&gt;/kit:qualita-test&lt;/code&gt;, &lt;code&gt;/kit:dati-efcore&lt;/code&gt;, &lt;code&gt;/kit:accessi-api&lt;/code&gt;, &lt;code&gt;/kit:gdpr-dati&lt;/code&gt;, &lt;code&gt;/kit:accessibilita-ui&lt;/code&gt;, &lt;code&gt;/kit:colori-tema&lt;/code&gt;, &lt;code&gt;/kit:localizzazione&lt;/code&gt;, ...). A review that silently "fixes" things defeats its purpose, so they now have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;disable-model-invocation&lt;/code&gt;: they run only when you type them;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;disallowed-tools&lt;/code&gt; for &lt;code&gt;Edit&lt;/code&gt; and &lt;code&gt;Write&lt;/code&gt;: they &lt;strong&gt;report, they don't modify&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two of them are new in this round, &lt;code&gt;/kit:verifica-frontend&lt;/code&gt; and &lt;code&gt;/kit:sicurezza&lt;/code&gt;, next to &lt;code&gt;/kit:verifica&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/kit:verifica&lt;/code&gt;&lt;/strong&gt; runs the .NET checks (restore, format, warning-free build, tests, vulnerable packages, EF model, compose, whitespace).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/kit:verifica-frontend&lt;/code&gt;&lt;/strong&gt; does the same for Angular (install, lint, Prettier, tests with coverage, production build, &lt;code&gt;npm audit&lt;/code&gt;, &lt;code&gt;any&lt;/code&gt;, hard-coded colours, missing translations).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/kit:sicurezza&lt;/code&gt;&lt;/strong&gt; checks the security items of the delivery checklist (threat model, hostile-input tests, fail closed, resource abuse, logs and alerts, &lt;code&gt;SECURITY.md&lt;/code&gt;), runs &lt;code&gt;/security-review&lt;/code&gt; and merges the results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every skill also declares a &lt;code&gt;model&lt;/code&gt; (Haiku for mechanical ones, Sonnet for the rest) and opens its answer with a &lt;strong&gt;"Model in use"&lt;/strong&gt; line, so you can see the effect. A caveat I verified only by hand: the documentation does not confirm that the model override applies to skills with &lt;code&gt;disable-model-invocation: true&lt;/code&gt; launched via &lt;code&gt;/name&lt;/code&gt;. It works on my machine; check yours.&lt;/p&gt;

&lt;p&gt;Also renamed: &lt;code&gt;/kit:code-review&lt;/code&gt; is now &lt;strong&gt;&lt;code&gt;/kit:review-regole&lt;/code&gt;&lt;/strong&gt;, to stop clashing with the built-in &lt;code&gt;/code-review&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Rules: smaller, clearer, labelled
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MUST / PREFER everywhere.&lt;/strong&gt; In &lt;code&gt;backend.md&lt;/code&gt; and &lt;code&gt;frontend.md&lt;/code&gt; every rule now says whether it is binding (MUST) or a default you can override with a stated reason (PREFER), with &lt;em&gt;Rule / Reason / Exception&lt;/em&gt; kept separate. Mixed entries were split (for example OpenAPI: the MUST part, "UI only in Development", is separated from the PREFER part, which UI to use).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;docker.md&lt;/code&gt; is optional.&lt;/strong&gt; It lives in &lt;code&gt;rules-optional/&lt;/code&gt; and is activated only if you explicitly ask ("create a Dockerfile"). Not every project ships with Docker, so the rules shouldn't assume it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/clear&lt;/code&gt; or &lt;code&gt;/compact&lt;/code&gt;?&lt;/strong&gt; &lt;code&gt;lavoro.md&lt;/code&gt; now has the criterion: &lt;code&gt;/clear&lt;/code&gt; when the restart state is already on files (&lt;code&gt;PIANO.md&lt;/code&gt;, &lt;code&gt;CHECKLIST.md&lt;/code&gt;, uncommitted changes) or the next job is unrelated; &lt;code&gt;/compact&lt;/code&gt; when the work continues and the files don't yet hold everything. Claude suggests one; it can't run either.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verified sources.&lt;/strong&gt; The ICU plugin licences and versions for Angular i18n were read from the npm registry (MIT), instead of being marked "unverified".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation follows the work.&lt;/strong&gt; &lt;code&gt;/kit:aggiorna-docs&lt;/code&gt; and &lt;code&gt;/kit:buonasera&lt;/code&gt; update README, CHANGELOG and, if the project has one, the documentation wiki, without asking. Claude asks once whether a wiki exists and stores the answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Updating
&lt;/h2&gt;

&lt;p&gt;Plugin (once per machine):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude plugin marketplace add AngeloDotNet/claude-config
claude plugin install kit@claude-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Already have the rules in a project? Open Claude Code there and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/kit:aggiorna-regole
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It compares your files with the template, shows the differences, asks for one confirmation, keeps &lt;code&gt;.bak&lt;/code&gt; copies, removes modules that no longer exist in the template and realigns the rules-related lines of your &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;New project: &lt;em&gt;"Start a new project"&lt;/em&gt; (or &lt;code&gt;/kit:avvia-progetto&lt;/code&gt;). Existing project without rules: &lt;code&gt;/kit:copia-regole&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The hooks read the code &lt;strong&gt;line by line&lt;/strong&gt;. Multi-line constructs can slip through, so human review is still needed.&lt;/li&gt;
&lt;li&gt;129 plugin tests pass, but they test the hooks, not the quality of what Claude writes.&lt;/li&gt;
&lt;li&gt;The hook cannot verify that &lt;em&gt;you&lt;/em&gt; said yes before a tag or a release. That is why those steps remain written rules.&lt;/li&gt;
&lt;li&gt;The rules themselves are in Italian; code, identifiers and commit messages are in English.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repository: &lt;a href="https://github.com/AngeloDotNet/claude-config" rel="noopener noreferrer"&gt;github.com/AngeloDotNet/claude-config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: &lt;a href="http://wiki.aepserver.it/claude-config/intro" rel="noopener noreferrer"&gt;wiki.aepserver.it/claude-config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;License: MIT&lt;/li&gt;
&lt;li&gt;Previous update: &lt;a href="https://dev.to/angelodotnet/update-10112026-claude-config-rules-and-guardrails-for-claude-4a6p"&gt;10/11/2026&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feedback and issues are welcome: which rule felt too strict, and which hook should exist and doesn't?&lt;/p&gt;

</description>
      <category>angular</category>
      <category>claude</category>
      <category>dotnet</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Claude config: rules and guardrails for Claude ... (Update: 10/11/2026)</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Tue, 10 Nov 2026 05:30:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/update-10112026-claude-config-rules-and-guardrails-for-claude-4a6p</link>
      <guid>https://dev.to/angelodotnet/update-10112026-claude-config-rules-and-guardrails-for-claude-4a6p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is the follow-up to my &lt;a href="https://dev.to/angelodotnet/claude-config-rules-and-guardrails-for-claude-code-on-net-angular-projects-3o0p"&gt;09/11/2026&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The plugin is now called &lt;code&gt;kit&lt;/code&gt; (it was &lt;code&gt;kit-config&lt;/code&gt;), it is at version 1.10.0, the copy script &lt;code&gt;copia-regole.bat&lt;/code&gt; has been replaced by skills, and the security rules are split into three files. The sections below reflect the current state of the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When I started using Claude Code on my .NET and Angular projects, I kept giving the same instructions again and again: ask one question at a time, do not commit without asking, do not use MediatR, do not run &lt;code&gt;git init&lt;/code&gt; in a folder that is not a repository, write a plan before writing code. Instructions in a chat disappear with the session, so I moved them into files.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;claude-config&lt;/code&gt; is the result: a template of rules for Claude Code, plus a personal plugin (&lt;code&gt;kit&lt;/code&gt;) that turns the most important rules into hooks that block or remind. The rules are written in Italian. Code, identifiers and commit messages that come from them stay in English.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is in the repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.claude/rules/&lt;/code&gt;: the rule modules. You copy them into each project, and Claude Code loads them on its own.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.claude/rules-optional/&lt;/code&gt;: modules that are not loaded until you move them into &lt;code&gt;rules/&lt;/code&gt; (feature workflow, email, infrastructure).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt;: a template with the project fields to fill in (architecture, database, ORM, multi-tenancy, ASVS level, and so on). Each choice is asked once and recorded, never assumed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;_template/&lt;/code&gt;: the project start guide and the CI helper for &lt;code&gt;kit-allow&lt;/code&gt; exceptions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plugins/kit/&lt;/code&gt;: the plugin with hooks, skills and tests.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CHANGELOG.md&lt;/code&gt;: a dated log of every change to the rules, with the reason, the files and the verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rules that do most of the work
&lt;/h2&gt;

&lt;p&gt;The rules are split by when they apply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always loaded at start:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;core.md&lt;/code&gt;: the shared rules. One question at a time, when in doubt. The frontend/backend contract (ProblemDetails, translation keys instead of text, UTC dates). The stack, tests (xUnit, Vitest, Playwright, 80% coverage on new code), documentation, and the delivery checklist.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git.md&lt;/code&gt;: git flow with &lt;code&gt;develop&lt;/code&gt; mandatory. Local commits only with confirmation. Conventional Commits in English. Squash for PRs into &lt;code&gt;develop&lt;/code&gt;, merge commits for anything that touches &lt;code&gt;main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;security.md&lt;/code&gt;: the security principles. Fail closed, supply chain, threat model for sensitive features, the operational checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Loaded when you touch matching files (&lt;code&gt;paths:&lt;/code&gt; in the header):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;frontend.md&lt;/code&gt; and &lt;code&gt;security-frontend.md&lt;/code&gt; (&lt;code&gt;*.ts&lt;/code&gt;, &lt;code&gt;*.html&lt;/code&gt;, &lt;code&gt;*.css&lt;/code&gt;, &lt;code&gt;*.scss&lt;/code&gt;): Angular, PrimeNG, no legacy NgModule, no &lt;code&gt;any&lt;/code&gt;, CSP and frontend security.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;backend.md&lt;/code&gt;, &lt;code&gt;backend-architecture.md&lt;/code&gt;, &lt;code&gt;backend-app.md&lt;/code&gt;, &lt;code&gt;security-backend.md&lt;/code&gt; (&lt;code&gt;*.cs&lt;/code&gt;, &lt;code&gt;*.csproj&lt;/code&gt;, &lt;code&gt;*.props&lt;/code&gt;): .NET 10, EF Core, the choice between vertical slice and clean architecture, authentication and authorization, uploads, rate limiting, log events.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docker.md&lt;/code&gt; (Dockerfile, compose files, &lt;code&gt;docker/**&lt;/code&gt;): multi-stage builds, one compose file per environment, no database inside compose.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every project imports only what it needs. A Git-only project keeps just &lt;code&gt;core.md&lt;/code&gt; and &lt;code&gt;git.md&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Some rules I care about most
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One question at a time.&lt;/strong&gt; When a decision is not clear, Claude asks one question, waits, and only then continues. This is the first rule in &lt;code&gt;core.md&lt;/code&gt;, and the plugin enforces it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan before code.&lt;/strong&gt; For any non-trivial work, Claude writes &lt;code&gt;PIANO.md&lt;/code&gt; in the project root with the steps and their status boxes. A step is ticked only after build and tests pass. The plan is deleted when it is finished, and the history stays in the changelog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checks the plugin cannot make.&lt;/strong&gt; Some rules need a human review, such as the row-level security and passkey details in &lt;code&gt;security-backend.md&lt;/code&gt;. Those are marked "verify at first use" instead of being stated as fact.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The plugin: kit
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;kit&lt;/code&gt; adds hooks that enforce the rules during a session:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Question limit:&lt;/strong&gt; &lt;code&gt;AskUserQuestion&lt;/code&gt; accepts one question per call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command guard:&lt;/strong&gt; blocks &lt;code&gt;git init&lt;/code&gt;, &lt;code&gt;git push --force&lt;/code&gt;, deleting remote branches, &lt;code&gt;git reset --hard&lt;/code&gt;, &lt;code&gt;git clean -f&lt;/code&gt;, &lt;code&gt;--no-verify&lt;/code&gt;, and &lt;code&gt;rm -rf&lt;/code&gt;. Pushes and tags are always allowed. &lt;code&gt;gh pr create/merge&lt;/code&gt; and &lt;code&gt;gh release&lt;/code&gt; are allowed only when the project declares the GitHub CLI installed in its &lt;code&gt;CLAUDE.md&lt;/code&gt;. Read-only commands (&lt;code&gt;git status&lt;/code&gt;, &lt;code&gt;git log&lt;/code&gt;, &lt;code&gt;gh pr view&lt;/code&gt;) are always allowed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write guard:&lt;/strong&gt; blocks real secrets in &lt;code&gt;appsettings*.json&lt;/code&gt;, compose files and written files, and unsafe patterns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write check:&lt;/strong&gt; after a write, checks the plan (build and test results recorded before a step is ticked), code quality, and C# practice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session start and close:&lt;/strong&gt; reminds the one-question rule on each prompt, reports rules that changed since the last session, and reminds about the open plan at the end.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hooks are configured in &lt;code&gt;plugins/kit/hooks/hooks.json&lt;/code&gt; and run through four event scripts for the most part. Each check has a test under &lt;code&gt;plugins/kit/tests/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Sixteen commands run only when you ask for them:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/kit:buongiorno&lt;/code&gt;, &lt;code&gt;/kit:buonasera&lt;/code&gt;, &lt;code&gt;/kit:avvia-progetto&lt;/code&gt;, &lt;code&gt;/kit:copia-regole&lt;/code&gt;, &lt;code&gt;/kit:aggiorna-regole&lt;/code&gt;, &lt;code&gt;/kit:consegna&lt;/code&gt;, &lt;code&gt;/kit:review-regole&lt;/code&gt;, &lt;code&gt;/kit:aggiorna-docs&lt;/code&gt;, &lt;code&gt;/kit:verifica&lt;/code&gt;, &lt;code&gt;/kit:qualita-test&lt;/code&gt;, &lt;code&gt;/kit:dati-efcore&lt;/code&gt;, &lt;code&gt;/kit:accessi-api&lt;/code&gt;, &lt;code&gt;/kit:gdpr-dati&lt;/code&gt;, &lt;code&gt;/kit:accessibilita-ui&lt;/code&gt;, &lt;code&gt;/kit:colori-tema&lt;/code&gt;, &lt;code&gt;/kit:localizzazione&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install it once per machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;claude plugin marketplace add AngeloDotNet/claude-config
claude plugin install kit@claude-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you installed the earlier &lt;code&gt;kit-config&lt;/code&gt; name, install &lt;code&gt;kit&lt;/code&gt;, remove &lt;code&gt;kit-config&lt;/code&gt;, and restart Claude Code: hooks load at session start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using it in a project
&lt;/h2&gt;

&lt;p&gt;There are three cases.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;New project.&lt;/strong&gt; Copy the rules and the &lt;code&gt;CLAUDE.md&lt;/code&gt; template, fill in the fields, then ask Claude to start the project (&lt;code&gt;/kit:avvia-progetto&lt;/code&gt;). It asks the setup questions and records the answers in &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Existing project without rules.&lt;/strong&gt; Use &lt;code&gt;/kit:copia-regole&lt;/code&gt;. It copies the rules you choose, one file at a time. If the project only needs branch and commit rules, choose &lt;strong&gt;Git only&lt;/strong&gt;: you get &lt;code&gt;core.md&lt;/code&gt; and &lt;code&gt;git.md&lt;/code&gt;, and nothing else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Existing project with rules.&lt;/strong&gt; Use &lt;code&gt;/kit:aggiorna-regole&lt;/code&gt; to bring it to the latest template, with a confirmation for each file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Architecture, ORM, database, multi-tenancy and ASVS level are never assumed: Claude asks, and the answer goes into &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The hooks read the code line by line. A public member written across several lines, or with complex attributes, can slip past them. The review of the code is still needed.&lt;/li&gt;
&lt;li&gt;Row-level security on PostgreSQL and passkey support in ASP.NET Core Identity are written in the rules as things to check at first use. They are not verified yet against the .NET 10 release.&lt;/li&gt;
&lt;li&gt;The changelog marks which details are not checked against a source. Read the notes before relying on a rule.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repository: &lt;a href="https://github.com/AngeloDotNet/claude-config" rel="noopener noreferrer"&gt;https://github.com/AngeloDotNet/claude-config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: &lt;a href="http://wiki.aepserver.it/claude-config" rel="noopener noreferrer"&gt;http://wiki.aepserver.it/claude-config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;License: MIT&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>claudecode</category>
      <category>dotnet</category>
      <category>angular</category>
      <category>ai</category>
    </item>
    <item>
      <title>Claude config: rules and guardrails for Claude Code on .NET + Angular projects</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Wed, 04 Nov 2026 23:25:03 +0000</pubDate>
      <link>https://dev.to/angelodotnet/claude-config-rules-and-guardrails-for-claude-code-on-net-angular-projects-3o0p</link>
      <guid>https://dev.to/angelodotnet/claude-config-rules-and-guardrails-for-claude-code-on-net-angular-projects-3o0p</guid>
      <description>&lt;p&gt;I work on .NET and Angular projects with Claude Code, and I kept rewriting the same setup instructions for each new project. To stop doing that, I built &lt;strong&gt;claude-config&lt;/strong&gt;: a public template of rules, plus a small Claude Code plugin that enforces the most important of them.&lt;/p&gt;

&lt;p&gt;This is my own opinionated approach, not a universal standard. Treat the rules as a starting point, and check the details against the documentation of the versions you use.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is in the repository
&lt;/h2&gt;

&lt;p&gt;Claude Code loads &lt;code&gt;.claude/rules/&lt;/code&gt; automatically, so the rules are &lt;strong&gt;copied into each project&lt;/strong&gt;, not installed globally.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Module&lt;/th&gt;
&lt;th&gt;When it loads&lt;/th&gt;
&lt;th&gt;What it covers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;core.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;always&lt;/td&gt;
&lt;td&gt;stack, tests, observability, Docker scope, interaction rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;always&lt;/td&gt;
&lt;td&gt;branches, commits, release&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;security.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;always&lt;/td&gt;
&lt;td&gt;authentication, secrets, input validation, CSP, supply chain, OWASP Top 10 2025, ASVS 5.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;frontend.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;on &lt;code&gt;*.ts&lt;/code&gt;, &lt;code&gt;*.html&lt;/code&gt;, &lt;code&gt;*.css&lt;/code&gt;, &lt;code&gt;*.scss&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Angular&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;backend.md&lt;/code&gt;, &lt;code&gt;backend-architecture.md&lt;/code&gt;, &lt;code&gt;backend-app.md&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;on C# and project files&lt;/td&gt;
&lt;td&gt;.NET&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docker.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dockerfiles and Compose files&lt;/td&gt;
&lt;td&gt;containers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Optional modules (email, infrastructure, feature workflow) live in &lt;code&gt;.claude/rules-optional/&lt;/code&gt; and are enabled per project. The rules are written in Italian; code, identifiers and commit messages stay in English.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules that do most of the work
&lt;/h2&gt;

&lt;p&gt;Five rules in &lt;code&gt;core.md&lt;/code&gt; carry most of the weight:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ask one question at a time&lt;/strong&gt; and wait for the answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local commits only by default.&lt;/strong&gt; Pushes, pull requests, tags and releases need an explicit approval, recorded per project in &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write a plan file&lt;/strong&gt; before any substantial work, then execute it step by step. A step is ticked only after build and tests pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the documentation of the installed version&lt;/strong&gt; of fast-moving libraries, instead of relying on memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build and test before declaring work done&lt;/strong&gt;, and report any error as it is.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The plugin: &lt;code&gt;kit&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Written rules are advisory, so the plugin turns the most important ones into hooks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a one-question reminder on every prompt, and a check that allows only one question per &lt;code&gt;AskUserQuestion&lt;/code&gt; call;&lt;/li&gt;
&lt;li&gt;a shell-command guard that always blocks &lt;code&gt;git init&lt;/code&gt;, force pushes, deleting remote branches, &lt;code&gt;git reset --hard&lt;/code&gt;, &lt;code&gt;git clean -f&lt;/code&gt;, &lt;code&gt;--no-verify&lt;/code&gt; and forced recursive deletes. Pushes, tag creation, &lt;code&gt;gh pr create/merge&lt;/code&gt; and &lt;code&gt;gh release&lt;/code&gt; stay blocked until the project approves them. Read-only commands such as &lt;code&gt;git status&lt;/code&gt;, &lt;code&gt;git log&lt;/code&gt; and &lt;code&gt;gh pr view&lt;/code&gt; remain allowed;&lt;/li&gt;
&lt;li&gt;a guard on secrets and on unsafe patterns in the files Claude writes;&lt;/li&gt;
&lt;li&gt;quality checks on Docker, dependencies and frontend code;&lt;/li&gt;
&lt;li&gt;a session-start hook that supplies the plan and the rules to re-read;&lt;/li&gt;
&lt;li&gt;a watcher that detects rule changes during a session, and drift from the template.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The plugin was renamed from &lt;code&gt;kit-config&lt;/code&gt; to &lt;code&gt;kit&lt;/code&gt; in November 2026, so that its commands can be exposed under the &lt;code&gt;/kit:&lt;/code&gt; prefix. Install it once per machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;claude plugin marketplace add AngeloDotNet/claude-config
claude plugin install kit@claude-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you installed the earlier &lt;code&gt;kit-config&lt;/code&gt; plugin, install &lt;code&gt;kit&lt;/code&gt; as above, remove &lt;code&gt;kit-config&lt;/code&gt;, and restart Claude Code, because hooks are loaded when the session starts.&lt;/p&gt;

&lt;p&gt;The current version is &lt;strong&gt;1.8.0&lt;/strong&gt;. The version changes only at a release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using it in a project
&lt;/h2&gt;

&lt;p&gt;There are three situations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;New project:&lt;/strong&gt; copy the rules and the &lt;code&gt;CLAUDE.md&lt;/code&gt; template, fill in the project fields, then ask Claude to start the project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Existing project without rules:&lt;/strong&gt; use the "Git only" mode, which keeps only the &lt;code&gt;core&lt;/code&gt; and &lt;code&gt;git&lt;/code&gt; modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Existing project with rules:&lt;/strong&gt; update them to the latest template version.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Project-specific choices (architecture, ORM, database, multi-tenancy, ASVS level) are asked for and recorded once in &lt;code&gt;CLAUDE.md&lt;/code&gt;. They are not assumed. The &lt;code&gt;copia-regole.bat&lt;/code&gt; script copies the rules and root files, and it can update the rules already present.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;p&gt;Some details are not verified yet, for example the PostgreSQL row-level security syntax and the passkey support in ASP.NET Core Identity on .NET 10. The notes in the template's changelog say which ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repository: &lt;a href="https://github.com/AngeloDotNet/claude-config" rel="noopener noreferrer"&gt;https://github.com/AngeloDotNet/claude-config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Documentation: &lt;a href="http://docs-claude-config.aepserver.it/" rel="noopener noreferrer"&gt;http://docs-claude-config.aepserver.it/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;License: MIT&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>claude</category>
      <category>dotnet</category>
      <category>angular</category>
      <category>productivity</category>
    </item>
    <item>
      <title>TinyLocalization: database-backend translations for .NET, without redeploying</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Tue, 03 Nov 2026 22:45:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/tinylocalization-database-backed-translations-for-net-without-redeploying-2nd1</link>
      <guid>https://dev.to/angelodotnet/tinylocalization-database-backed-translations-for-net-without-redeploying-2nd1</guid>
      <description>&lt;p&gt;Every .NET developer has been there. A customer finds a typo in the Italian translation, and fixing it means editing a &lt;code&gt;.resx&lt;/code&gt; file, rebuilding, and redeploying the whole application. For one word.&lt;/p&gt;

&lt;p&gt;I wanted translations to behave like data, not like code. So I built &lt;strong&gt;TinyLocalization&lt;/strong&gt;, a small open-source library that stores your translations in a database and plugs into the standard &lt;code&gt;Microsoft.Extensions.Localization&lt;/code&gt; abstractions.&lt;/p&gt;

&lt;p&gt;The repository is here: &lt;a href="https://github.com/AngeloDotNet/TinyDatabaseLocalization" rel="noopener noreferrer"&gt;AngeloDotNet/TinyDatabaseLocalization&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;The idea is deliberately simple: you keep using &lt;code&gt;IStringLocalizer&lt;/code&gt;, but the strings come from a database table instead of resource files. You can add, fix or remove a translation at runtime, and the change is live without a redeploy.&lt;/p&gt;

&lt;p&gt;Main features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standard API:&lt;/strong&gt; works with &lt;code&gt;IStringLocalizer&lt;/code&gt;, &lt;code&gt;IStringLocalizer&amp;lt;T&amp;gt;&lt;/code&gt; and &lt;code&gt;IStringLocalizerFactory&lt;/code&gt;, so existing code does not need to change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Culture fallback:&lt;/strong&gt; current culture, then parent cultures, then an optional global fallback, then the invariant culture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Format arguments:&lt;/strong&gt; &lt;code&gt;localizer["Hello {0}", name]&lt;/code&gt; works as you would expect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Four database providers:&lt;/strong&gt; SQLite, SQL Server, PostgreSQL and MySQL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FusionCache under the hood:&lt;/strong&gt; fail-safe, timeouts, eager refresh and stampede protection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional Redis:&lt;/strong&gt; as a second-level cache and as a backplane for multi-instance invalidation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One simple table:&lt;/strong&gt; &lt;code&gt;Translations&lt;/code&gt;, unique on &lt;code&gt;(Resource, Key, Culture)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;p&gt;The library targets &lt;strong&gt;.NET 10&lt;/strong&gt; and is built on &lt;strong&gt;Entity Framework Core&lt;/strong&gt;. Caching is handled by &lt;strong&gt;FusionCache&lt;/strong&gt;, which I picked over a hand-rolled &lt;code&gt;IMemoryCache&lt;/code&gt; wrapper for one reason: caching translations looks trivial until you meet cache stampedes, slow databases and multi-node invalidation. FusionCache already solved those problems, so I did not have to.&lt;/p&gt;

&lt;p&gt;Tests are written with xUnit v3 and run against a real SQLite database and a real FusionCache instance, not mocks. Run them with &lt;code&gt;dotnet test&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a lookup works
&lt;/h2&gt;

&lt;p&gt;This is the part I like most, because it is short:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;EfStringLocalizer&lt;/code&gt; builds the culture chain, for example &lt;code&gt;it-IT → it → global fallback → invariant&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For each culture, it asks FusionCache for the snapshot of that &lt;code&gt;(resource, culture)&lt;/code&gt; pair.&lt;/li&gt;
&lt;li&gt;On a cache miss, &lt;code&gt;LocalizationDbContext&lt;/code&gt; runs &lt;strong&gt;one query&lt;/strong&gt; that loads all keys of that resource and culture, and caches the result.&lt;/li&gt;
&lt;li&gt;The first culture in the chain that contains the key wins.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two details make a real difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loading the whole resource/culture in one query means you do not hit the database once per string.&lt;/li&gt;
&lt;li&gt;Empty cultures are cached too (negative caching). If you have no &lt;code&gt;fr&lt;/code&gt; translations, you do not query for &lt;code&gt;fr&lt;/code&gt; on every request.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Install the package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet add package TinyLocalization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register the services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AddLocalizationDbContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LocalizationDbContext&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DatabaseType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DatabaseType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SQLite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ConnectionString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Data Source=localization.db"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AddDefaultFusionCache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AddDatabaseLocalization&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GlobalFallbackCulture&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then configure request localization in your pipeline as you normally would, and use the localizer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HomeController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;IStringLocalizer&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HomeController&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;localizer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;IActionResult&lt;/span&gt; &lt;span class="nc"&gt;Index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;ViewData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Title"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localizer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Welcome"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;ViewData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Greeting"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;localizer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Hello {0}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Identity&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Name&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s2"&gt;"guest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resource name for &lt;code&gt;IStringLocalizer&amp;lt;T&amp;gt;&lt;/code&gt; is the full name of &lt;code&gt;T&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A fair warning about the schema: the library ships &lt;strong&gt;no migrations&lt;/strong&gt;. For a quick start, &lt;code&gt;EnsureCreated()&lt;/code&gt; is fine. For production, create migrations in your own project and point the &lt;code&gt;MigrationsAssembly&lt;/code&gt; option at them. I preferred this to forcing my migration history into your database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing translations at runtime
&lt;/h2&gt;

&lt;p&gt;Translations are edited through &lt;code&gt;ILocalizationManager&lt;/code&gt;, which writes to the database and invalidates the cache in one go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;manager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;AddOrUpdateAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Translation&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Resource&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"MyApp.Controllers.HomeController"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Welcome"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Culture&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"it"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Benvenuto"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;manager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;RemoveAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"MyApp.Controllers.HomeController"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Welcome"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"it"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;manager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;InvalidateResourceAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"MyApp.Controllers.HomeController"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An empty culture string means the invariant culture. Concurrent inserts of the same translation are resolved as updates, so two admins saving the same key at the same time will not crash anything.&lt;/p&gt;

&lt;p&gt;One thing to remember: if you edit rows &lt;strong&gt;directly in the database&lt;/strong&gt;, the application will not see the change until the cache entry expires (10 minutes by default) or you call &lt;code&gt;InvalidateResourceAsync&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scaling out with Redis
&lt;/h2&gt;

&lt;p&gt;With a single instance, the in-memory cache is enough. With several instances behind a load balancer, you want an edit on node A to reach node B immediately. For that, use &lt;code&gt;AddDistributedFusionCache&lt;/code&gt; (or &lt;code&gt;AddDistributedLogsFusionCache&lt;/code&gt; if you want control over FusionCache log levels) and set &lt;code&gt;RedisCacheConnectionString&lt;/code&gt; and &lt;code&gt;RedisBackplaneConnectionString&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you need to tell other systems that translations changed, implement &lt;code&gt;ICacheInvalidationPublisher&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sensible defaults
&lt;/h2&gt;

&lt;p&gt;Everything is configurable, but the defaults are meant to be safe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cache duration: 10 minutes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FallbackToParentCultures&lt;/code&gt;: enabled&lt;/li&gt;
&lt;li&gt;Missing key: returns the key itself (or an empty string if you set &lt;code&gt;ReturnKeyIfNotFound = false&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Fail-safe: enabled, with a 120-minute maximum stale duration, so a database outage does not take your UI strings down with it&lt;/li&gt;
&lt;li&gt;Factory timeouts: 100 ms soft, 1500 ms hard&lt;/li&gt;
&lt;li&gt;Malformed format strings stored in the database are returned unchanged instead of throwing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last one comes from experience: a typo in a translated string should never become a 500 error.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is missing
&lt;/h2&gt;

&lt;p&gt;The project is young, so let me be honest about the gaps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No admin UI for editing translations. You build your own on top of &lt;code&gt;ILocalizationManager&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;No migrations shipped, as explained above.&lt;/li&gt;
&lt;li&gt;No import/export tooling from existing &lt;code&gt;.resx&lt;/code&gt; files yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If one of these matters to you, open an issue. Priorities follow real needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;TinyLocalization will not replace &lt;code&gt;.resx&lt;/code&gt; for every project, and that is fine. If your translations change often, are edited by non-developers, or must be fixed without a deploy, keeping them in a database with a solid cache in front is a very practical option, and you keep the standard .NET localization API.&lt;/p&gt;

&lt;p&gt;The project is MIT licensed. If you want to try it, star it, or contribute, fork the repo, branch from &lt;code&gt;develop&lt;/code&gt;, add or update tests, and open a pull request against &lt;code&gt;develop&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A special thanks to Jody Donetti, the author of &lt;a href="https://github.com/ZiggyCreatures/FusionCache" rel="noopener noreferrer"&gt;FusionCache&lt;/a&gt;. A big part of this library's resilience is his work.&lt;/p&gt;

&lt;p&gt;And you, where do you keep your translations: &lt;code&gt;.resx&lt;/code&gt;, JSON, or a database?&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>sqlserver</category>
      <category>localization</category>
      <category>fusioncache</category>
    </item>
    <item>
      <title>SagreEventi: an offline-first app for Italian food festivals</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Tue, 27 Oct 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/sagreeventi-an-offline-first-app-for-italian-food-festivals-5fn5</link>
      <guid>https://dev.to/angelodotnet/sagreeventi-an-offline-first-app-for-italian-food-festivals-5fn5</guid>
      <description>&lt;p&gt;October in Italy means chestnuts and new wine. Every weekend there is a &lt;em&gt;sagra&lt;/em&gt; (a local food festival) somewhere, but finding them means jumping between town websites, social media groups and word of mouth. That is how &lt;strong&gt;SagreEventi&lt;/strong&gt; was born: a place where people who go to these festivals can report them and browse them, without creating an account.&lt;/p&gt;

&lt;p&gt;The code is open source (MIT license) on &lt;a href="https://github.com/AngeloDotNet/sagreeventi" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this article I walk through what the app does, the main technical choices and the points where I stopped to think.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;The idea is deliberately simple. Anyone can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;browse&lt;/strong&gt; events: a home page with the upcoming events hanging from a festival bunting, a searchable catalog and a month-by-month agenda;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;filter and sort&lt;/strong&gt; by free text (accent-insensitive), city and period (in progress, upcoming, finished), in a grid or list view;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;report&lt;/strong&gt; a new event (name, city, dates, description) with a validated form;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;take it with them&lt;/strong&gt;: add the event to their calendar (&lt;code&gt;.ics&lt;/code&gt;), open the city on a map, share it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Users with the &lt;code&gt;Admin&lt;/code&gt; or &lt;code&gt;Editor&lt;/code&gt; role sign in with email and password (ASP.NET Core Identity, bearer tokens) and can edit existing events and moderate reports. Public registration is disabled: users are created by the seed at start-up.&lt;/p&gt;

&lt;p&gt;What it does &lt;strong&gt;not&lt;/strong&gt; do: it does not sell tickets and does not handle bookings. Keeping payments and ticketing out of scope simplified the project a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;API&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ASP.NET Core (.NET 10) with Minimal API&lt;/li&gt;
&lt;li&gt;Entity Framework Core + SQL Server&lt;/li&gt;
&lt;li&gt;ASP.NET Core Identity with roles&lt;/li&gt;
&lt;li&gt;Rate limiting, native OpenAPI, FusionCache&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Client&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Angular 21 (standalone components, signals, zoneless)&lt;/li&gt;
&lt;li&gt;PrimeNG 21 with a custom Aura preset, PrimeIcons&lt;/li&gt;
&lt;li&gt;Just Angular, PrimeNG and RxJS: no state library, no CSS framework&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A note on method: the API is a handful of endpoints, so a new client is a weekend of work. There is a single contract and it can serve several clients. The project started with a Blazor WebAssembly client, which I later removed in favor of Angular + PrimeNG.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Angular 21 and not 22?
&lt;/h3&gt;

&lt;p&gt;This choice is worth explaining. The latest PrimeNG release published under the MIT license is 21.1.x, which supports Angular 21. PrimeNG 22 adds Angular 22 support but introduces a license key (with a free Community tier that requires registration). To stay fully free and officially compatible, I pinned the client to Angular 21 and PrimeNG &lt;code&gt;^21.1.10&lt;/code&gt;. Before upgrading, it is worth rereading PrimeTek's current terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Moderation: trust reporters a little less
&lt;/h2&gt;

&lt;p&gt;If anyone can add events, you need a filter. Every report has a state: &lt;code&gt;InAttesa&lt;/code&gt; (pending, the default for anonymous users), &lt;code&gt;Approvato&lt;/code&gt; (approved) or &lt;code&gt;Rifiutato&lt;/code&gt; (rejected).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GetEventi&lt;/code&gt; returns &lt;strong&gt;only&lt;/strong&gt; approved events.&lt;/li&gt;
&lt;li&gt;Neither the client nor the server trusts the state sent by a client: the &lt;code&gt;stato&lt;/code&gt; field is output only.&lt;/li&gt;
&lt;li&gt;Whoever reports an event sees it as &lt;em&gt;pending&lt;/em&gt; on their own device (the «Le mie» section). If the event is rejected, the reporter is not notified: it keeps showing as pending. The rejection reason is a note visible only to &lt;code&gt;Admin&lt;/code&gt; and &lt;code&gt;Editor&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Events reported by &lt;code&gt;Admin&lt;/code&gt;/&lt;code&gt;Editor&lt;/code&gt; are published immediately.&lt;/li&gt;
&lt;li&gt;From &lt;code&gt;/gestione/revisione&lt;/code&gt; you can approve or reject reports in bulk (up to 100 at a time) and withdraw an event that was already approved.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A detail I like: the API has no &lt;code&gt;DELETE&lt;/code&gt;. A withdrawn event becomes a rejected, concluded event, and clients use that to delete their local copy at the next sync. A background service automatically concludes events whose end date has passed (the interval is configurable with &lt;code&gt;Eventi:ScadenzaIntervalloMinuti&lt;/code&gt;), and a concluded event can no longer be edited by anyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Offline-first and sync
&lt;/h2&gt;

&lt;p&gt;At festivals, especially in the countryside, mobile coverage is often a gamble. That is why the Angular client keeps a local copy of the events (in &lt;code&gt;localStorage&lt;/code&gt;) and reconciles it with SQL Server using a three-step protocol:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Push:&lt;/strong&gt; events created or edited on the device (marked as &lt;em&gt;pending&lt;/em&gt;) are sent with &lt;code&gt;PUT /api/Eventi/UpdateEventi&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pull:&lt;/strong&gt; changes made by others are fetched with &lt;code&gt;GET /api/Eventi/GetEventi?since=&amp;lt;cursor&amp;gt;&lt;/code&gt;, where the cursor is the latest modification time returned by the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge:&lt;/strong&gt; server data replaces local data, unless the local copy is pending and newer. Concluded events are removed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A sync runs at start-up, when the browser comes back online and when you press the button in the top bar, which also shows how many changes are waiting.&lt;/p&gt;

&lt;p&gt;An event looks like this (JSON, camelCase):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0b1e9e8e-5c0f-4a5e-8d0e-6b1a2f6c9a11"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"nomeEvento"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Sagra della castagna"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cittaEvento"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Soriano nel Cimino"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"dataInizioEvento"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-24T00:00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"dataFineEvento"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-26T00:00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"descrizioneEvento"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Caldarroste, vino novello e musica dal vivo."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"eventoConcluso"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"dataOraUltimaModifica"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-22T18:30:00.000Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"stato"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Approvato"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server sets &lt;code&gt;dataOraUltimaModifica&lt;/code&gt; on every write: the value sent by the client is only used to decide which version is newer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security: public APIs, but not defenseless
&lt;/h2&gt;

&lt;p&gt;Anonymous write endpoints call for a few precautions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Per-IP rate limiting&lt;/strong&gt; on writes and login, with a maximum of 20 events per request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Changes to existing events only with an &lt;code&gt;Admin&lt;/code&gt;/&lt;code&gt;Editor&lt;/code&gt; token:&lt;/strong&gt; anyone else gets &lt;code&gt;403&lt;/code&gt;. New events in the same request are still inserted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Length limits on fields&lt;/strong&gt; (name 200, city 100, description 4000, and so on): longer values get &lt;code&gt;400&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;X-Forwarded-*&lt;/code&gt; headers&lt;/strong&gt; are trusted only from the Docker network, and nginx overwrites &lt;code&gt;X-Forwarded-For&lt;/code&gt;, so the per-IP limits cannot be dodged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CORS&lt;/strong&gt; limited to the origins listed in &lt;code&gt;Cors:Origins&lt;/code&gt;, and a restricted &lt;code&gt;AllowedHosts&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The integration test suite (xUnit with in-memory SQLite) covers events, moderation, users, login, rate limits, forwarded headers, CORS and malicious input.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker in one command
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;docker-compose.yml&lt;/code&gt; starts four containers on a private network:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sqlserver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;SQL Server 2022, data in the &lt;code&gt;sqldata&lt;/code&gt; volume&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;api&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The API on port 8080 (internal only), non-root user, health check on &lt;code&gt;/healthz&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;web&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The built Angular client, served by an unprivileged nginx&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;proxy&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A dedicated nginx: the only public entry point (80/443), terminates HTTPS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The client and the API share one origin, so production needs no CORS and &lt;code&gt;apiBaseUrl&lt;/code&gt; stays empty in &lt;code&gt;config.json&lt;/code&gt;: a single build runs in every environment.&lt;/p&gt;

&lt;p&gt;To try it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env     &lt;span class="c"&gt;# fill in the variables&lt;/span&gt;
&lt;span class="c"&gt;# create deploy/certs/fullchain.pem and privkey.pem (a self-signed certificate is fine for a trial)&lt;/span&gt;
docker compose up &lt;span class="nt"&gt;--build&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;code&gt;https://localhost&lt;/code&gt; and sign in with &lt;code&gt;ADMIN_EMAIL&lt;/code&gt; / &lt;code&gt;ADMIN_PASSWORD&lt;/code&gt; from the &lt;code&gt;.env&lt;/code&gt; file. EF Core migrations run at start-up and the &lt;code&gt;Admin&lt;/code&gt; user is created.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A fair warning:&lt;/strong&gt; the Docker files are written but &lt;strong&gt;not yet tried&lt;/strong&gt; on a real Docker host. The manual checks to run are in the repository's &lt;code&gt;TEST-MANUALI.md&lt;/code&gt; file. The compose file is meant for trials and small deployments: for production you need real certificates, a managed or backed-up SQL Server and a secret store instead of &lt;code&gt;.env&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Running it locally (without Docker)
&lt;/h2&gt;

&lt;p&gt;You need the .NET 10 SDK, a SQL Server instance and Node.js (&lt;code&gt;^20.19&lt;/code&gt;, &lt;code&gt;^22.12&lt;/code&gt; or &lt;code&gt;^24&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/AngeloDotNet/sagreeventi.git
&lt;span class="nb"&gt;cd &lt;/span&gt;sagreeventi/src/SagreEventi.Web.Server
dotnet run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The connection string and the first users go in &lt;code&gt;appsettings.local.json&lt;/code&gt; (git-ignored). Then the client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;src/SagreEventi.Web.Angular
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://localhost:4200&lt;/code&gt;: in development, requests to &lt;code&gt;/api&lt;/code&gt; are forwarded to &lt;code&gt;https://localhost:5001&lt;/code&gt;, so there is nothing else to configure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is missing (and what comes next)
&lt;/h2&gt;

&lt;p&gt;The roadmap is as honest as the rest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;try the Docker stack on a real host and tick off the manual checks;&lt;/li&gt;
&lt;li&gt;an installable offline app shell (service worker);&lt;/li&gt;
&lt;li&gt;server-side search and pagination once the catalog grows;&lt;/li&gt;
&lt;li&gt;automated tests for the Angular client's sync logic (the API already has its own);&lt;/li&gt;
&lt;li&gt;geolocation: events near you.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;SagreEventi is a small project, but it brings together quite a few concrete topics: public APIs with moderation, offline sync, roles, rate limiting, deployment behind a reverse proxy. If you need inspiration for an app with a .NET API and an Angular client, the repository can be a good starting point.&lt;/p&gt;

&lt;p&gt;If the project is useful to you, a ⭐ on &lt;a href="https://github.com/AngeloDotNet/sagreeventi" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; helps others find it. Issues and pull requests are welcome (starting from the &lt;code&gt;develop&lt;/code&gt; branch).&lt;/p&gt;

&lt;p&gt;And you, how do you handle offline sync in your apps? Let me know in the comments.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>angular</category>
      <category>primeng</category>
      <category>sqlserver</category>
    </item>
    <item>
      <title>Hacktoberfest 2025</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Sat, 11 Oct 2025 07:00:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/hacktoberfest-2025-5549</link>
      <guid>https://dev.to/angelodotnet/hacktoberfest-2025-5549</guid>
      <description>&lt;p&gt;Hacktoberfest 2025: One Brick at a Time! I'm thrilled to have helped make open source a better place with Hacktoberfest. &lt;/p&gt;

&lt;p&gt;Every pull request, no matter how small, is a step toward a more collaborative and innovative future.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F915pcp8iyexfh96rn2e2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F915pcp8iyexfh96rn2e2.png" alt=" " width="603" height="753"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>programming</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>How to easily integrate and extend authentication in ASP.NET Core projects, using ASP.NET Core Identity</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Fri, 01 Aug 2025 07:23:02 +0000</pubDate>
      <link>https://dev.to/angelodotnet/how-to-easily-integrate-and-extend-authentication-in-aspnet-core-projects-using-aspnet-core-130p</link>
      <guid>https://dev.to/angelodotnet/how-to-easily-integrate-and-extend-authentication-in-aspnet-core-projects-using-aspnet-core-130p</guid>
      <description>&lt;p&gt;A few weeks ago, we ported the project shown in this &lt;a href="https://dev.to/angelodotnet/how-to-manage-roles-permissions-and-more-using-jwt-token-and-aspnet-core-identity-11k0"&gt;post&lt;/a&gt; to make it more dynamic and easier to implement and maintain.&lt;/p&gt;

&lt;p&gt;📢 A new GitHub repository has been created, available &lt;a href="https://github.com/AngeloDotNet/MinimalApi.Identity" rel="noopener noreferrer"&gt;here&lt;/a&gt;, and still under development/implementation. &lt;/p&gt;

&lt;p&gt;⚠️ Important&lt;br&gt;
This library is still under development of new implementations and in the process of creating the related documentation.&lt;/p&gt;

&lt;p&gt;🧩 Features&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimal API&lt;/strong&gt;: Built using .NET 8 Minimal API for a lightweight and efficient implementation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entity Framework Core&lt;/strong&gt;: Uses EF Core for data access, making it easy to integrate with your existing database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modular&lt;/strong&gt;: The library is designed to be modular, allowing you to add or remove features as needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic&lt;/strong&gt;: Supports dynamic management of users, roles, claims, forms, licensing and policies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible Configuration&lt;/strong&gt;: Easily configurable via &lt;code&gt;appsettings.json&lt;/code&gt; to suit your application's needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbox Pattern&lt;/strong&gt;: Implement the &lt;a href="https://microservices.io/patterns/data/transactional-outbox.html" rel="noopener noreferrer"&gt;transactional outbox pattern&lt;/a&gt; for reliable email sending.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows for modular management of the original library available in this GitHub &lt;a href="https://github.com/AngeloDotNet/Packages.MinimalApi.Identity" rel="noopener noreferrer"&gt;repository&lt;/a&gt; based on the project's needs, without having to configure everything immediately.&lt;/p&gt;

&lt;p&gt;Contributions are also welcome. &lt;/p&gt;

&lt;p&gt;Please report issues and pull requests on the repository, and don't forget to ⭐ on GitHub if you find this project useful to show your support and help others discover it!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>webapi</category>
      <category>csharp</category>
      <category>microservices</category>
    </item>
    <item>
      <title>How can dynamically add separate API endpoints</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Thu, 05 Jun 2025 05:30:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/how-can-dynamically-add-separate-api-endpoints-4h56</link>
      <guid>https://dev.to/angelodotnet/how-can-dynamically-add-separate-api-endpoints-4h56</guid>
      <description>&lt;p&gt;The example in the github repository below shows a simple implementation on how you can add API endpoints (and their dependencies, via dependency injection) by linking external class library projects or adding their Nuget packages (if the class libraries are released as a Nuget package).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/AngeloDotNet/NET8-SampleDynamicallyAddAPIEndpoints" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Comments and/or suggestions are always welcome.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>webapi</category>
      <category>csharp</category>
      <category>development</category>
    </item>
    <item>
      <title>How to connect two microservices with RabbitMQ and Rebus</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Mon, 26 May 2025 05:30:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/how-to-connect-two-microservices-with-rabbitmq-and-rebus-278</link>
      <guid>https://dev.to/angelodotnet/how-to-connect-two-microservices-with-rabbitmq-and-rebus-278</guid>
      <description>&lt;p&gt;The example in the github repository below shows a simple implementation of two microservices (.NET 8 Web Api) communicating with each other via RabbitMQ and Rebus.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/AngeloDotNet/NET8-SampleRabbitMQRebus" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Comments and/or suggestions are always welcome.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>rebus</category>
      <category>webapi</category>
    </item>
    <item>
      <title>How to manage users, roles, and claims, using jwt token and asp.net core identity</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Thu, 06 Mar 2025 06:30:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/how-to-manage-roles-permissions-and-more-using-jwt-token-and-aspnet-core-identity-11k0</link>
      <guid>https://dev.to/angelodotnet/how-to-manage-roles-permissions-and-more-using-jwt-token-and-aspnet-core-identity-11k0</guid>
      <description>&lt;p&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; We recommend reading the updated article available at this &lt;a href="https://dev.to/angelodotnet/alternative-how-to-manage-users-roles-and-claims-using-jwt-token-and-aspnet-core-identity-c0i"&gt;link&lt;/a&gt;. Thank you.&lt;/p&gt;




&lt;p&gt;After seeing how to protect minimal APIs with JWT tokens and Asp.Net Core Identity, in &lt;a href="https://dev.to/angelodotnet/how-to-secure-minimal-api-microservices-with-aspnet-core-identity-2o68"&gt;this article&lt;/a&gt;, I want to share a next step, which I found myself facing for personal needs, that is how to make the management of JWT token claims dynamic in order to manage roles, claims, modules and licenses.&lt;/p&gt;

&lt;p&gt;To obtain a working example that uses this implementation, I created this &lt;a href="https://github.com/AngeloDotNet/Packages.MinimalApi.Identity/tree/main/IdentityManager.API" rel="noopener noreferrer"&gt;project&lt;/a&gt; (wrapper extender of ASP.NET Core Identity) that uses a SQL server database and allows this dynamic management.&lt;/p&gt;

&lt;p&gt;The implementation explained above is available as a Nuget package, available at this &lt;a href="https://www.nuget.org/packages/MinimalApi.Identity.API" rel="noopener noreferrer"&gt;link&lt;/a&gt;, while the code is available in this &lt;a href="https://github.com/AngeloDotNet/Packages.MinimalApi.Identity" rel="noopener noreferrer"&gt;repository&lt;/a&gt;, which will be enriched with additional features and documentation in the coming weeks.&lt;/p&gt;

&lt;p&gt;The project is constantly evolving. Contributions are welcome. Feel free to file issues and pull requests on the repository and don't forget that if you find this project useful, put a ⭐ on GitHub to show your support and help others discover it!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>api</category>
      <category>identity</category>
    </item>
    <item>
      <title>How to use SignalR in a Blazor WebAssembly and Web API project</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Thu, 13 Feb 2025 06:30:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/how-to-use-signalr-in-a-blazor-webassembly-and-web-api-project-27cp</link>
      <guid>https://dev.to/angelodotnet/how-to-use-signalr-in-a-blazor-webassembly-and-web-api-project-27cp</guid>
      <description>&lt;p&gt;This post was born from a personal need during the development of a notification system in a festival management application, which I am currently developing (the source can be found in this &lt;a href="https://github.com/AngeloDotNet/GSWCloudApp" rel="noopener noreferrer"&gt;repository&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;There will be a need to implement a notification service in the client part (frontend), but the notifications will have to be generated automatically by the backend part.&lt;/p&gt;

&lt;p&gt;Faced with this need in the short term, I created this example &lt;a href="https://github.com/AngeloDotNet/Sample-API-SendNotify-BlazorWasm" rel="noopener noreferrer"&gt;repository&lt;/a&gt;, which contains two client projects (client and client2), and a server project (server).&lt;/p&gt;

&lt;p&gt;By starting the server and client projects, you can have a demo of signalR generates notifications in a razor page, with the help of Mudblazor these notifications have a different color based on the severity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg79sgorym1lc76bwuqvu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg79sgorym1lc76bwuqvu.png" width="351" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, it was chosen to use the "notify-client" endpoints generating the notification in grey and "notify-client-info" generating the notification in light blue.&lt;/p&gt;

&lt;p&gt;To generate these notifications you can use swagger of the backend project, testing the endpoints that contain the nomenclature "notify-client"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwm1tuf3nt98rye2qi002.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwm1tuf3nt98rye2qi002.png" width="799" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead, by starting the server and client projects, you can have a demo of signalR that generates notifications in a Razor page, with the help of Mudblazor the notifications will all have the same color, in this case gray and in the backend part the endpoint to use will be the one called "notify-client2", alternatively you can use the button on the frontend "Send notification"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7foxuann9rc7skiajsnl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7foxuann9rc7skiajsnl.png" width="338" height="110"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you like my open source works don't forget to "follow me" on GitHub and/or click the repository's starred button.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>blazor</category>
      <category>webassembly</category>
      <category>csharp</category>
    </item>
    <item>
      <title>How to secure minimal api microservices with asp.net core identity</title>
      <dc:creator>Angelo Pirola</dc:creator>
      <pubDate>Fri, 03 Jan 2025 13:00:00 +0000</pubDate>
      <link>https://dev.to/angelodotnet/how-to-secure-minimal-api-microservices-with-aspnet-core-identity-2o68</link>
      <guid>https://dev.to/angelodotnet/how-to-secure-minimal-api-microservices-with-aspnet-core-identity-2o68</guid>
      <description>&lt;p&gt;The project "MinimalApi.AuthJWTIdentity" demonstrates how to configure authentication and authorization using .NET Identity and JWT tokens shared between two microservices (web APIs). &lt;/p&gt;

&lt;p&gt;Here is a detailed summary of the project:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; To provide an example of configuring authentication and authorization using .NET Identity and JWT tokens for two microservices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope:&lt;/strong&gt; The example includes minimal configuration and excludes advanced features like token refresh, role management, and claims. However, these features can be added with additional configuration.&lt;br&gt;
Project Structure&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservice01:&lt;/strong&gt; Contains the Program.cs and appsettings.json files for its configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservice02:&lt;/strong&gt; Similar structure to Microservice01 with its own &lt;br&gt;
Program.cs and appsettings.json.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MicroserviceAuth:&lt;/strong&gt; Manages authentication and contains the main logic for user registration and login.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main Files:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;README.md:&lt;/strong&gt; Describes the project and its purpose.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Program.cs of Microservice01:&lt;/strong&gt; Sets up the microservice, adds authentication and authorization, and defines a secure endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Program.cs of Microservice02:&lt;/strong&gt; Similar to Microservice01 with its own setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Program.cs of MicroserviceAuth:&lt;/strong&gt; Manages user registration, login, and JWT token generation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuration Files:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;appsettings.json of Microservice01:&lt;/strong&gt; Contains JWT settings and logging configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;appsettings.json of Microservice02:&lt;/strong&gt; Similar to Microservice01 with its own configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;appsettings.json of MicroserviceAuth:&lt;/strong&gt; Contains JWT settings and logging configuration for the authentication service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setup and Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each microservice has its own Program.cs file that sets up the web application, adds authentication and authorization services, and defines endpoints.&lt;/p&gt;

&lt;p&gt;The appsettings.json files in each microservice contain the JWT token settings and logging configuration.&lt;/p&gt;

&lt;p&gt;The MicroserviceAuth service handles user registration and login, generating JWT tokens for authenticated users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Components&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication and Authorization:&lt;/strong&gt; Implemented using .NET Identity and JWT tokens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices:&lt;/strong&gt; Each microservice has its own setup and configuration, sharing the JWT token settings across the services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Endpoints:&lt;/strong&gt; Secure endpoints are defined in each microservice, requiring authentication to access.&lt;/p&gt;

&lt;p&gt;This project provides a foundational example of using .NET Identity and JWT for securing microservices, with the potential for extending functionality with additional configuration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/AngeloDotNet/MinimalApi.AuthJWTIdentity" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Comments and/or suggestions are always welcome.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>jwt</category>
      <category>identity</category>
    </item>
  </channel>
</rss>
