Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
do not fear, 6k of these lines are just package-lock.json on server since i guess npm install was never run on it. and the rest are pretty simple changes that should not break anything (most are just unit tests and the others are logs and validation)
so, this adds and changes unit tests (since some were like 3k lines of garbage), and i made a makefile so instead of having to run everything one by one you can just run "make test" from the root, and it will test everything. there are more commands for if you just want to test the go files or just the server files or whatever, you can find those with "make help"
next, there's now structured logging throughout the backend (central service, rtc service, server), with log levels, context, tracking, and metadata. an example structure looks like this:
{
"timestamp": "2026-03-08T12:34:56.789Z",
"level": "INFO",
"service": "central-service",
"message": "Request processed",
"correlation_id": "req-123",
"user_id": "user-456",
"room_id": "room-789",
"status_code": 200,
"duration_ms": 45.23,
"metadata": {...}
}
last, we now have rate limiting so that ryan's server hopefully does not explode if someone gets stuck on two sum and tries to submit it 10k times within 20 seconds. thats about it, i think i also added some input validation stuff so we shouldn't be getting zipbombed n shit but yea.