Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
23
This repository combines an Electron shell, a Go HTTP backend, and a Vite/React frontend. Use this guide to stay aligned with the existing workflows.
Sign in to like and favorite skills
This repository combines an Electron shell, a Go HTTP backend, and a Vite/React frontend. Use this guide to stay aligned with the existing workflows.
main.js boots Electron and points the renderer to the compiled frontend while delegating API traffic to the Go service on port 9090.backend/cmd/server contains the production entrypoint; shared domain, service, and infra logic live under backend/internal, with static uploads in backend/public.backend/tests/unit, backend/tests/integration (requires tagged build), and backend/tests/e2e.frontend/src hosts React components, state stores, and Tailwind styles; helper scripts reside in frontend/scripts, and production bundles land in frontend/dist.design/ and docs/, respectively.npm install && npm --prefix frontend install: install Electron shell and frontend dependencies.go run ./backend/cmd/server: start the API with environment variables like JWT_SECRET, SERVER_PORT, and database credentials preset.npm run dev:frontend: hot-reload the React app on Vite; point Electron to the Vite URL during UI work.npm start: launch the packaged Electron client (expects the backend available on http://localhost:9090).npm run build:frontend: produce production assets consumed by main.js.go test ./... (unit), go test -tags=integration ./backend/tests/integration, and go test -tags=e2e ./backend/tests/e2e for broader suites; capture logs in the per-suite logs/ folders.Go code must stay
gofmt-clean with idiomatic CamelCase exports and lower_snake package names; keep handlers thin and push logic into internal/service.
New TypeScript files follow the existing PascalCase component pattern under
frontend/src/**; prefer hooks over classes and keep Tailwind utility sets in index.css.
Run
npm --prefix frontend run lint before submitting UI work; it enforces TS strictness and the “no implicit any / no-js” policy.
Use structured logging via
logger helpers in the handler layer for errors, rather than in the service layer, which does not handle logging directly.
New Requirements:
.env file; if you need to add new environment variables, add them to the .env.example file instead.apply_patch <<'PATCH' or similar automated patch scripts).git diff or PR views that highlight line changes with + and -.backend/tests/unit; mimic existing table-driven tests.//go:build integration.feat: ..., fix: ..., chore: ...); keep subjects under ~72 characters and prefer imperative verbs..env and other secrets stay untracked; share configs through .env.example snippets or docs updates instead.MODEL_CREDENTIAL_MASTER_KEY, CAPTCHA_*, Redis, and SMTP credentials); validate them locally with .env files but do not commit them.backend/logs; rotate or truncate before pushing branches to avoid noisy diffs.internal/bootstrap to avoid breaking production deployments.