Skip to content

Conversation

hongvincent
Copy link

This pull request introduces significant improvements to documentation, backend stability, and frontend-backend integration for the GitDiagram project. The main changes include the addition of comprehensive English and Korean README files, a push guide, enhanced backend CORS support for Codespaces, stricter Mermaid.js prompt enforcement, and updated frontend API routes to proxy requests through Next.js for improved reliability and compatibility.

Documentation Improvements:

  • Added detailed English (README.en.md) and Korean (README.ko.md) README files, including self-hosting instructions, tech stack, architecture, and troubleshooting tips. The main README.md now links to the English version and is rewritten in Korean for localization. [1] [2] [3]
  • Added a new Korean push guide (PUSH_GUIDE.md) describing how to initialize and push the project to a new repository, including frontend and backend startup instructions.

Backend Stability and Codespaces Support:

  • Expanded CORS origins in backend/app/main.py to support multiple localhost ports and dynamic Codespaces domains, improving development experience in cloud environments.

Mermaid.js Prompt Enforcement:

  • Updated prompts in backend/app/prompts.py to strictly enforce Mermaid v11.4.1 syntax and supported diagram types, preventing invalid or invented types and improving diagram stability. [1] [2] [3]

Frontend API Integration and SSR Stability:

  • Introduced Next.js API routes (src/app/api/generate/stream/route.ts and src/app/api/generate/cost/route.ts) to proxy backend requests for streaming and cost estimation, resolving mixed-content and local development issues. [1] [2]
  • Updated src/hooks/useDiagram.ts to use the new API routes for streaming, reset state before generation, and improve error handling. [1] [2] [3]
  • Added suppressHydrationWarning to <html> and <body> in src/app/layout.tsx to prevent hydration warnings from browser extensions and SSR mismatches.

Minor Code Quality Fixes:

  • Minor formatting fix in src/lib/fetch-backend.ts for readability.

Copy link

vercel bot commented Aug 22, 2025

@hongvincent is attempting to deploy a commit to the Ahmed Khaleel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hongvincent hongvincent changed the title some bug fixes Some bug fixes Aug 22, 2025
@hongvincent hongvincent changed the title Some bug fixes fix: Mermaid.js Prompt Enforcement Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant