Write an API reference for the public endpoints

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
express, node.js, openapi, typescript
Domain
api, documentation

Research direction

Start at apps/api/src/routes/index.ts to enumerate the routes, then read packages/shared/src/index.ts for the Zod schema names and docs/LIMITS.md for rate limits. Create docs/API.md or openapi.yaml, grouped by area, and list method, path, auth requirement, request schema, responses and limits for each route. Done means every router entry appears or is explicitly excluded, examples use fake data, the README links the document, and npm run typecheck, npm test, npm run lint and npm run format pass.

Written by the indexing model from the issue text.

Description

api documentation help wanted

Difficulty: Intermediate · Estimated size: 1 to 2 days

Context

The API has about 70 routes (apps/api/src/routes/index.ts), validated by Zod schemas in packages/shared. There is no reference, so integrators and contributors must read the code.

Problem or goal

Document the endpoints so people can use or test them without reading the source.

Suggested approach

  • Create docs/API.md (or an openapi.yaml) grouped by area: auth, users, posts, comments, communities, messages, notifications, payments, admin.
  • For each route list the method, path, whether sign-in is required, the request body (link to the schema name), the main responses and the rate limits (see docs/LIMITS.md).
  • If you choose OpenAPI, the document should validate with a standard linter. You may generate the schemas from the Zod ones, but only if it does not add heavy dependencies to the production build.

Where to look

  • apps/api/src/routes/index.ts
  • packages/shared/src/index.ts
  • docs/LIMITS.md

Acceptance criteria

  • Every route in the router appears in the document, or the PR says which are left out and why.
  • Examples use fake data only.
  • The document is linked from the README.

Out of scope

A hosted interactive API explorer.

How to work on it

  1. Comment here to claim it, so two people do not do the same work.
  2. Fork the repo and branch from main (feat/short-name or fix/short-name). Setup steps are in docs/DEVELOPMENT.md.
  3. Keep the change focused and add tests for backend logic.
  4. Run npm run typecheck, npm test and npm run lint and npm run format before opening the pull request.
  5. Use a Conventional Commits title (for example feat(web): add bookmarks). More in CONTRIBUTING.md.

Stuck? Ask in this issue. Questions are welcome.


Generated by Claude Code

Dominant language
TypeScript
Stars
6
Forks
6
Avg merge
1h 59m
Merged PRs (30d)
59

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Haseeb-MernStack/commune

All issues in Haseeb-MernStack/commune

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.