Skip to content

Add login rate limiting, fan profile routes, bookmarks, and activity stream API - #975

Merged
xeeenab merged 2 commits into
InChordSync:mainfrom
limxiy:feature/login-rate-limit-fan-bookmarks-activity
Aug 30, 2026
Merged

Add login rate limiting, fan profile routes, bookmarks, and activity stream API#975
xeeenab merged 2 commits into
InChordSync:mainfrom
limxiy:feature/login-rate-limit-fan-bookmarks-activity

Conversation

@limxiy

@limxiy limxiy commented Aug 29, 2026

Copy link
Copy Markdown

Summary

Closes #832,
Closes #831,
Closes #830,
Closes #829

This PR builds out the missing HTTP surface for the fans and activity modules and adds brute-force protection to login.

Login rate limiting (#832)

The login endpoint had no throttling, leaving brute-force password guessing unmitigated. Added per-account (email) and per-IP rate limiters, both returning 429 once the threshold is exceeded. A test asserts the 429 behaviour.

Fan profile routes (#830)

The fans module had a repository/service/types but no controller or routes. Added GET/PATCH /api/fans/me for fan profile read and update, backed by the existing fanService, with integration tests.

Fan bookmarks (#831)

The bookmark types existed but had no backend. Implemented a persisted Bookmark model plus repository/service/controller with create, list, and delete endpoints under /api/fans/me/bookmarks. The endpoints are documented in the OpenAPI spec for mobile/web (SavedCreatorsScreen) consumption, with integration tests.

Activity stream API (#829)

The ActivityStreamService had unit tests but no HTTP surface. Exposed it via GET /api/activity/stream with optional creatorId, page, and pageSize pagination (with metadata).

Changes

  • GET/PATCH /api/fans/me, GET/POST /api/fans/me/bookmarks, DELETE /api/fans/me/bookmarks/:creatorId
  • New Bookmark Prisma model, repository, service, and controller
  • GET /api/activity/stream controller + route with pagination
  • Login per-account/per-IP rate limiters in the auth module
  • OpenAPI docs for the new endpoints
  • Tests for login rate limiting, fan routes, and activity stream

…stream API

- Add per-account and per-IP rate limiting to the login endpoint to
  mitigate brute-force password guessing, with a test asserting 429.
- Add a dedicated fan controller and routes for fan profile read/update,
  and implement the bookmark repository/service/controller backed by a new
  persisted Bookmark model (create, list, delete) for mobile/web saved
  creators, with integration tests.
- Expose the activity stream service via an HTTP endpoint with pagination.
- Document the new fan, bookmark, and activity endpoints in the OpenAPI spec.

Closes InChordSync#832
Closes InChordSync#831
Closes InChordSync#830
Closes InChordSync#829
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@limxiy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@xeeenab
xeeenab merged commit 08546fd into InChordSync:main Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants