Skip to content

Rewrite README to match the actual code - #1

Merged
sultanmaliki merged 1 commit into
mainfrom
docs/rewrite-readme
Sep 26, 2026
Merged

sultanmaliki merged 1 commit into
mainfrom
docs/rewrite-readme

Conversation

@sultanmaliki

Copy link
Copy Markdown
Owner

Summary

README.md was the only markdown file in the repo, and it had drifted from the implementation. This rewrites it against the current backend and frontend source. It is a docs-only change.

What was wrong and is now fixed

  • API docs: POST /api/query request/response shapes were wrong (it does not accept sourceType/connectionString and does not return usage/raw). /api/query/demo, the health check, both rate limiters, upload/execute payloads (UUID file ids, imported_csv/imported_json tables, structured mongo payload, Neo4j credentials) are now documented as implemented.
  • Supported databases: separates languages that are only generated (CQL, Redis, Elasticsearch, DynamoDB, GraphQL) from those that can be executed (SQLite/CSV/JSON/SQL files, PostgreSQL, MySQL/MariaDB, MongoDB find, Neo4j).
  • Configuration: lists only the env vars the code reads; removes TOKEN_EXPIRY and TEST_*, which are never used. Notes that there is no .env.example.
  • Models: adds the alias table and the Auto routing heuristics.
  • Conversation memory: chat context is the last three completed exchanges; utils/conversationMemory.js is not called by any route.
  • Security: adds notes on the unauthenticated /api/db/* routes, open CORS, the default JWT secret and the unused xss dependency. The old README both claimed CORS was restricted and said it was open.
  • Other: Windows note for the POSIX-style npm scripts, Docker caveats, corrected project structure/tech stack/contributing, and a Mermaid architecture diagram in place of the misaligned ASCII one (rendered and checked).

Not changed (noticed while reviewing, out of scope)

  • .github/workflows/node.js.yml runs npm ci/npm test at the repo root, but there is no root package.json (and package-lock.json is git-ignored), so the workflow cannot pass as written.
  • /api/db/* has no auth middleware, and utils/conversationMemory.js is unused.

Test plan

  • Every claim cross-checked against querycraft-backend/ and querycraft-frontend/src/
  • Mermaid diagram renders without errors
  • Internal anchor links match the headings

🤖 Generated with Claude Code

The README had drifted from the implementation. This rewrites it against
the current backend and frontend source:

- Correct the POST /api/query request/response shapes and document
  /api/query/demo, the health check and both rate limiters accurately.
- Document /api/db/upload and /api/db/execute as implemented (UUID file
  ids, imported_csv/imported_json tables, structured `mongo` payload,
  Neo4j credentials, default 1000-row limit).
- Separate query languages that can be generated from those that can be
  executed (Cassandra, DynamoDB, Elasticsearch, Redis and GraphQL are
  generation-only).
- Replace the environment variable list with the variables the code
  actually reads; drop TOKEN_EXPIRY and TEST_* which are never used.
- Add the model alias table and the Auto routing heuristics.
- Describe chat context as the last three completed exchanges and note
  that utils/conversationMemory.js is not wired into any route.
- Add honest security notes (unauthenticated /api/db routes, open CORS,
  default JWT secret, unused xss dependency) and known limitations.
- Add a Windows note for the POSIX-style npm scripts, Docker caveats,
  and a Mermaid architecture diagram in place of the ASCII one.
- Fix project structure, tech stack and contributing sections.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sultanmaliki
sultanmaliki merged commit 9265835 into main Sep 26, 2026
0 of 3 checks passed
@sultanmaliki
sultanmaliki deleted the docs/rewrite-readme branch September 26, 2026 02:48
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