Thanks for your interest! GitDiary is a small project with a clear scope, so before opening a large PR please skim the docs and the sections below.
-
Read
docs/prd.mdanddocs/tech-design.mdbefore proposing architectural changes. The tech design lists the layer rules that the codebase enforces by convention:UI (Components/Pages) → Store → Repository → GitHub APIThe UI must not call
GitHubApiClientdirectly — always go throughDiaryStore. -
Zero warnings.
TreatWarningsAsErrorsis on. Any new code must build clean withdotnet build --nologo -clp:NoSummary. -
Result<T>for control flow. New code should returnResult<T>for fallible operations and avoid exceptions for expected failure modes. -
Preserve token safety. The GitHub PAT lives only in
localStorageundergitdiary_tokenand is transmitted only tohttps://api.github.com. Any change that logs, transmits, or otherwise handles the token must redact it (Bearer …,gh?_…patterns) — seeGitHubApiClient.Redact().
Prerequisites: .NET 10 SDK.
cd src/GitDiary.Client
dotnet build # 0 warnings enforced
dotnet run # http://localhost:5016
# or, for hot reload:
dotnet watch runPublish a static build:
dotnet publish -c Release -o publish
# → publish/wwwroot/- Nullable enabled, implicit usings enabled.
- All async methods suffixed
Async. - PascalCase for all public members.
sealedon service/class declarations.- No Bootstrap, no heavy UI kits — custom CSS in
wwwroot/css/app.css. IJSRuntimeforlocalStorageaccess; avoid JS interop for non-storage concerns.
- Keep PRs small and single-purpose.
- Explain the why in the description, not just the what.
- Include a screenshot or short video for UI changes.
- If you're adding a new i18n key, update all five locale files
(
en,zh-CN,zh-TW,ja,ko) — even if you can only provide a reasonable fallback for languages you don't speak. A best-effort translation is preferable to an English string leaking through.
Please do not open a public issue for a suspected vulnerability. See
SECURITY.md for the disclosure process.
Include:
- Browser + version.
- Steps to reproduce.
- Console errors if any (
console.erroroutput — GitDiary logs redacted diagnostics there). - Whether it reproduces with a fresh
localStorage.