Bookmarks: let people save posts privately
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- express, mongodb, nodejs, react, typescript
- Ambito
- api, full-stack
Direzione di ricerca
Start with apps/api/src/models/Like.ts as the template for the new Bookmark model, then read apps/api/src/controllers/postController.ts to see how likedSet fills likedByMe. The web side is useToggleLike and patchPost in apps/web/src/hooks/usePosts.ts, with the button in PostCard.tsx. Done means the PUT/DELETE toggle is idempotent, the list hides deleted and banned-author posts, a test shows one user cannot read another's bookmarks, and typecheck and lint pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Difficulty: Intermediate · Estimated size: 1 to 2 days
Context
People can like and comment on posts, but there is no private way to keep a post to read or use later.
Problem or goal
Add bookmarks. A bookmark is private: only the person who saved it can see it, and the post's author is never told.
Suggested approach
- API: a
Bookmarkmodel (user,post,createdAt) with a unique index onuser + post, and a TTL-free index onuser + _idfor paging. - API:
PUT /api/posts/:id/bookmarkandDELETE /api/posts/:id/bookmark(idempotent, so saving twice is not an error) andGET /api/bookmarkswith the same cursor paging as the feeds. - Shared: add
bookmarkedByMe: booleantoPostDTOand fill it the waylikedByMeis filled. - Web: a bookmark icon button on the post card (with
aria-pressed), a/bookmarkspage linked from the left menu, and an empty state. - Docs: add a row to
docs/LIMITS.mdif you add a rate limit.
Where to look
apps/api/src/models/Like.ts(a good template)apps/api/src/controllers/postController.ts(likes andlikedSet)apps/web/src/hooks/usePosts.ts(useToggleLikeandpatchPost)apps/web/src/components/PostCard.tsx
Acceptance criteria
- Saving and unsaving works, survives a refresh and updates every list that shows the post.
- Deleted posts and posts by banned authors do not appear in the list.
- Another person can never read your bookmarks (add a test).
- Paid posts stay locked in the list until bought.
- New API tests and no typecheck or lint errors.
Out of scope
Folders or collections of bookmarks.
How to work on it
- Comment here to claim it, so two people do not do the same work.
- Fork the repo and branch from
main(feat/short-nameorfix/short-name). Setup steps are in docs/DEVELOPMENT.md. - Keep the change focused and add tests for backend logic.
- Run
npm run typecheck,npm testandnpm run lintandnpm run formatbefore opening the pull request. - 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
- Lingua principale
- TypeScript
- Stelle
- 6
- Fork
- 6
- Merge medio
- 1h 59m
- PR unite (30g)
- 59
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Haseeb-MernStack/commune
-
enhancement good first issue web
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Haseeb-MernStack/commune#141 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Haseeb-MernStack/commune#138 ·
I maintainer di solito rispondono entro 1 giorno
-
api good first issue tests
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
Haseeb-MernStack/commune#132 ·
I maintainer di solito rispondono entro 1 giorno
-
ci good first issue tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Haseeb-MernStack/commune#133 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility good first issue web
Difficoltà 2/5 Mezza giornata Idoneità per principianti 74/100
Haseeb-MernStack/commune#117 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Haseeb-MernStack/commune
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
agent-canvas bug oh-gpt-fleet priority:medium ready-for-dev UI/UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue javascript test
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
writerslogic/scrivener-mcp#272 ·
I maintainer di solito rispondono entro 1 giorno
-
bug triaged tui ux wontfix
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno