-
Notifications
You must be signed in to change notification settings - Fork 5
LVT-72: Refactor endpoints into routes #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LVT-72: Refactor endpoints into routes #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the backend API from a monolithic src/index.ts file into a modular route-based structure, improving code organization and maintainability. The refactor introduces TypeScript path aliases for cleaner imports and separates application setup from server initialization.
Key Changes
- Reorganized all API endpoints into dedicated route modules grouped by domain (manager, slack, analysis)
- Introduced TypeScript path aliases (
@/src/*) to replace relative imports throughout the codebase - Split application setup (
src/app.ts) from server initialization (src/server.ts)
Reviewed changes
Copilot reviewed 142 out of 146 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Added path aliases configuration for @/src/* imports |
package.json |
Updated entry points from index.ts/js to server.ts/js |
src/app.ts |
New file: Express app configuration and middleware setup |
src/server.ts |
New file: Server initialization with scheduled jobs and migrations |
src/routes/ |
New route modules organizing endpoints by domain (manager, slack, analysis) |
src/routes/index.ts |
Main router combining all sub-routers with /v1 prefix |
| Various handler files | Updated all imports to use new path alias pattern |
src/index.ts |
Removed (replaced by app.ts and server.ts) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 99 out of 102 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ttps://github.com/HighlanderRobotics/lovat-server into jackshim415/lvt-72-refactor-endpoints-into-routes
Implements routers to replace index.ts. Improves readability and maintainability. Also removed files that we weren't using to declutter the project.