Feat/issues 346 347 348 349#352
Merged
Merged
Conversation
76e5735 to
a60883a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Close issues #346, #347, #348, #349
Summary
This PR delivers four assigned tasks in one branch:
Changes
1) SSE connection protections and metrics (#346)
Backend:
MAX_SSE_CONNECTIONS(default10000)429withRetry-After: 60when per-IP limit is exceeded503when global capacity is reachedFiles:
backend/src/services/sse.service.tsbackend/src/controllers/sse.controller.tsbackend/src/routes/v1/events.routes.tsbackend/src/routes/adminRoutes.tsbackend/tests/sse.service.test.ts2) User summary endpoint with cache (#349)
Backend:
GET /v1/users/{address}/summarytotalStreamsCreatedtotalStreamedOut(sum of outgoing withdrawn)totalStreamedIn(sum of incoming withdrawn)currentClaimable(sum of claimable across active incoming streams)activeOutgoingCountactiveIncomingCountFiles:
backend/src/controllers/stream.controller.tsbackend/src/routes/v1/user.routes.tsbackend/tests/stream.test.ts3) Stream creation wizard templates (#347)
Frontend:
localStorageFiles:
frontend/components/stream-creation/StreamCreationWizard.tsxfrontend/components/stream-creation/TemplateStep.tsx4) Architecture + onboarding docs (#348)
Docs:
docs/ARCHITECTURE.mdwith:contract -> worker -> Prisma/Postgres -> SSE -> frontend)docs/DEVELOPMENT.mdwith:README.mdFiles:
docs/ARCHITECTURE.mddocs/DEVELOPMENT.mdREADME.mdAdditional fix included
backend/src/routes/v1/index.tsand mounted both admin route groups safely.Verification
Attempted local checks:
backend npm testfrontend npm run lintCould not complete in this environment because dependencies could not be installed under Node
v23.8.0and Prisma requires Node20.19+,22.12+, or24+.Commits
feat(backend): add SSE limits and user summary statsfeat(frontend): add stream creation template stepdocs: add architecture and onboarding guidesIssue closure
Closes #346
Closes #347
Closes #348
Closes #349