Refactor/backend - #54
Merged
Merged
Conversation
…d transcript repos Replace the monolithic SummarizerRepository with three focused repositories: SummarizerSessionRepository, AudioChunkRepository, and TranscriptRepository. Update service constructors and logic (summarizer, transcription, normalization, summarization, user, meeting) to use the new repos and adjusted method names, update workers and main wiring accordingly, and remove the old summarizer repository file. This refactor separates concerns for session, chunk, and transcript operations and updates cleanup/status flows to use the new repository interfaces.
- Create internal/handlers/dto package with five files: meeting.go, user.go, livekit.go, lobby.go, summarizer.go - Move all HTTP DTOs and mapper functions from internal/types into dto - Update handlers (livekit, lobby, meeting, user) to import from dto - Update services (user, summarizer) to import from dto - Delete internal/types package
- Break routes.go into auth.go, user.go, meeting.go, livekit.go, lobby.go (same package, single SetupRoutes entry point delegates to each) - Remove POST /lobby/respond (HTTP fallback) — lobby approval is handled exclusively over WebSocket; delete RespondToRequest handler, LobbyRespondRequest DTO, and related route/middleware wiring - Remove frontend createUser / updateUser from userAdminService — these called POST /users and PATCH /users/:id which never existed in the backend; drop unused CreateUserRequest, UpdateUserRequest, and UserUpdateResponse types
Replace the boolean fetch lock with a shared fetch promise in userFetcher so concurrent requests return the same promise instead of erroring. This keeps the existing logging and error handling but clears the promise once complete. Update authActions to remove early returns that depended on the old lock, allowing token storage and initialization to proceed even if a user fetch is in progress.
|
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.
This pull request refactors the backend codebase to improve modularity and clarity by reorganizing DTOs, updating service dependencies, and cleaning up handler logic. The most important changes include moving DTOs to a dedicated package, updating handler imports and usages, restructuring service initialization for summarization, and removing redundant lobby request handling logic.
DTO and Handler Refactoring
internal/typesare now moved to a newinternal/handlers/dtopackage, and all handler files are updated to import and use DTOs from this new location. This improves code organization and separation of concerns. [1] [2] [3] [4] [5] [6] [7] [8] [9]LiveKitHandler,LobbyHandler,MeetingHandler,UserHandler) now consistently uses DTOs from thedtopackage instead of the oldtypespackage, including request parsing and response formatting. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]Service and Repository Initialization
main.gois updated to use new repositories (SummarizerSessionRepository,AudioChunkRepository,TranscriptRepository) and to restructure service dependencies for summarization, normalization, and transcription. This enables more granular data management and improves dependency clarity.Lobby Handler Cleanup
LobbyRespondRequestDTO and the corresponding HTTP fallback handler method for approving/rejecting lobby requests are removed, simplifying the lobby join flow and reducing redundant code. [1] [2]File Renaming and Package Changes
types/*.gotohandlers/dto/*.goand their package declarations are updated accordingly, reflecting the new organizational structure. [1] [2] [3] [4] [5]Dependency Chain Updates