iiitl / iiitl/PerOXO

refactor: move auth and websocket handlers out of lib.rs, clean up main.rs

Open
#12 3 comments 0 reactions 0 assignees View on GitHub
easy refactoring
Dominant language
Rust
Stars
0
Forks
6
PR merge metrics
No merged PRs in 30d

Description

lib.rs is doing too much. It currently owns:
- The `verify_token` auth helper (lines 32-61)
- The` ws_handler` websocket upgrade handler (lines 63-83)
- The `peroxo`_route router constructor (lines 85-92)
- Proto includes and all module declarations

`main.rs` has a commented-out MongoDb config line (line 16) and a commented-out builder call (line 21) left over from an earlier iteration.

Contributor guide

Open the contributing guide

Research direction

Start by reading lib.rs at the verify_token, ws_handler, and peroxo_route sections, then inspect main.rs lines 16 and 21 and the existing module and proto declarations. Organize these responsibilities outside lib.rs, remove the obsolete commented MongoDB and builder lines, and verify that the application structure and behavior remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication, backend, networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.