BCards/.claude/napkin.md
Ricardo Carneiro b9714598b5
All checks were successful
BCards Multi-Tenant Deployment Pipeline / Run Tests (push) Successful in 10s
BCards Multi-Tenant Deployment Pipeline / PR Validation (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Run Tests (pull_request) Successful in 5s
BCards Multi-Tenant Deployment Pipeline / PR Validation (pull_request) Successful in 1s
BCards Multi-Tenant Deployment Pipeline / Build and Push Image (push) Successful in 9m22s
BCards Multi-Tenant Deployment Pipeline / Build and Push Image (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy bcards.site (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy spicylinks.site (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy luslinks.site (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy to Release Swarm (ARM) (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Cleanup Old Resources (pull_request) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy bcards.site (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy spicylinks.site (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deploy luslinks.site (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deployment Summary (pull_request) Successful in 0s
BCards Multi-Tenant Deployment Pipeline / Deploy to Release Swarm (ARM) (push) Successful in 2m11s
BCards Multi-Tenant Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Multi-Tenant Deployment Pipeline / Deployment Summary (push) Successful in 1s
feat: multitenant
2026-03-29 18:36:07 -03:00

2.7 KiB

Napkin Runbook

Curation Rules

  • Re-prioritize on every read.
  • Keep recurring, high-value notes only.
  • Max 10 items per category.
  • Each item includes date + "Do instead".

Execution & Validation (Highest Priority)

  1. [2026-03-20] Use clean-build.sh after VS 2022 updates Do instead: run ./clean-build.sh before debugging OAuth or NuGet issues.

  2. [2026-03-20] Google OAuth fails in Edge browser Do instead: test OAuth in Vivaldi or Chrome; clear browser data for localhost:49178.

Razor View Editing

  1. [2026-03-20] replace_all corrupts @inject namespace if brand name appears in it Do instead: run replace_all BEFORE adding @inject, or use namespace-specific strings to avoid replacing C# namespace occurrences.

Shell & Command Reliability

  1. [2026-03-20] Windows environment — use Unix shell syntax Do instead: use forward slashes and bash syntax (not PowerShell) in all shell commands.

Domain Behavior Guardrails

  1. [2026-03-20] PageStatus enum has explicit numeric values Do instead: always reference by name (e.g., PageStatus.Creating), never by magic number. Values: Creating=6, PendingModeration=4, Rejected=5, Active=0, Inactive=3, Expired=1, PendingPayment=2.

  2. [2026-03-20] Preview tokens expire in 4 hours Do instead: generate fresh tokens via POST /Admin/GeneratePreviewToken/{id} before accessing non-Active pages.

  3. [2026-03-20] Non-Active pages require preview token for access Do instead: always append ?preview={token} when testing Creating/PendingModeration/Rejected pages.

  4. [2026-03-20] Plans source of truth is appsettings.json ["Plans"] section Do instead: read plan limits/features from config, not README (README has outdated values). Plans: Trial(free,1p,3l), Basic(R$12.90,3p,8l), Professional(R$25.90,5p,20l,DECOY), Premium(R$29.90,15p,∞l,PDF), PremiumAffiliate(R$34.90,15p,∞l,links produto). Annual variants save 2 months.

  5. [2026-03-20] MaxLinks=-1 means unlimited (Premium and PremiumAffiliate) Do instead: check if (maxLinks == -1) return true; before comparing counts.

  6. [2026-03-20] Subscription model stores plan limits at time of purchase Do instead: read limits from Subscription entity (MaxLinks, AllowCustomThemes etc.), not from current plan config — they may diverge after plan changes.

User Directives

  1. [2026-03-20] Project targets Brazilian/Spanish markets Do instead: use pt-BR or es as default locale in UI text; keep pricing in BRL (R$).

  2. [2026-03-20] appsettings.json contains live credentials committed to git Do instead: be aware that MongoDB, OAuth, SendGrid secrets are in the repo. Never log or expose them further. Do not add more secrets to appsettings.json.