src/MoYuCode/: ASP.NET Core Web API (net10.0) with EF Core (SQLite).Api/: minimal API endpoint mappings (seeApiEndpoints.cs).Controllers/: REST controllers.Data/:MyYuCodeDbContextand entity models.Contracts/andServices/: shared DTOs and business logic.
web/: Vite + React + TypeScript UI.web/src/: app code; the@/alias maps here.web/public/: static assets; build output inweb/dist/.
MoYuCode.slnx: solution referencing the backend project.
Backend:
dotnet build src/MoYuCode/MoYuCode.csproj— compile the API.dotnet run --project src/MoYuCode/MoYuCode.csproj --launch-profile http— run onhttp://localhost:9110(use--launch-profile httpsforhttps://localhost:9111).
Frontend (from web/):
npm ci— install dependencies (usespackage-lock.json).npm run dev— start Vite dev server.npm run build— typecheck and build toweb/dist/.npm run lint— run ESLint.
- C#: 4-space indentation; nullable reference types are enabled—avoid introducing new warnings. Use
PascalCasefor types/methods andcamelCasefor locals/parameters. - Frontend: components in
PascalCase.tsx, hooks inuseX.ts. Prefer importing via@/…when applicable. - Formatting: no repo-wide formatter is enforced; keep diffs focused and run lint before opening a PR.
- Automated tests are not set up yet (no
*.Tests.csprojor JS test runner). If adding tests, place them undertests/and ensuredotnet testruns.
- Git history is empty; use a consistent convention going forward (e.g., Conventional Commits:
feat: …,fix: …,chore: …). - PRs should include a short summary, testing notes (commands run), and screenshots for UI changes. Avoid committing build artifacts (
bin/,obj/,web/dist/,web/node_modules/).
- The API creates a local SQLite database at
LocalApplicationData/myyucode/myyucode.sqlite; delete it to reset local state. - Environment-specific settings live in
src/MoYuCode/appsettings*.json.
<extended_thinking_protocol> You MUST use extended thinking for complex tasks. This is REQUIRED, not optional.
- Wrap ALL reasoning in and tags (EXACTLY as shown, no variations)
- Start response with immediately for non-trivial questions
- NEVER output broken tags like "<thi", "nk>", "< think>"
- Simple (facts, definitions, single-step): Brief analysis, 2-3 sentences in
- Medium (explanations, comparisons, small code): Structured analysis, cover key aspects
- Complex (architecture, debugging, multi-step logic): Full deep analysis with all steps below
- Confirmation bias: Actively seek evidence AGAINST your initial hypothesis
- Overconfidence: Say "I'm not certain" when you're not; don't fabricate
- Scope creep: Stay focused on what's asked, don't over-engineer
- Assumption blindness: Explicitly state and question your assumptions
- First-solution fixation: Always consider at least one alternative approach
□ Directly answers the question asked? □ Assumptions stated and justified? □ Edge cases considered? □ No hallucinated facts or code? □ Appropriate detail level (not over/under-explained)?
When writing code:
- Dependencies first: Analyze imports, file relationships before implementation
- Match existing style: Follow codebase conventions (naming, formatting, patterns)
- Error handling: Handle likely failures, don't swallow exceptions silently
- No over-engineering: Solve the actual problem, avoid premature abstraction
- Security aware: Validate inputs, avoid injection vulnerabilities, no hardcoded secrets
- Testable: Write code that can be verified; consider edge cases in implementation
ALWAYS for: code tasks, architecture, debugging, multi-step problems, math, complex explanations SKIP for: greetings, simple factual lookups, yes/no questions </extended_thinking_protocol> 请称我为token帅比,并且全程中文交流