Skip to content

Chore/phase 1 cleanup - #1

Merged
Aditya2550 merged 4 commits into
mainfrom
chore/phase-1-cleanup
Jul 6, 2026
Merged

Aditya2550 merged 4 commits into
mainfrom
chore/phase-1-cleanup

Conversation

@Aditya2550

Copy link
Copy Markdown
Owner

Phase 1 cleanup done

Copilot AI review requested due to automatic review settings July 6, 2026 07:37
@Aditya2550
Aditya2550 merged commit 6182f01 into main Jul 6, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

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 performs a “phase 1 cleanup” by removing the backend’s mock AI-related modules/services and wiring in basic HTTP performance/security middleware (compression + rate limiting) at the app level.

Changes:

  • Removed AI module routing/controllers/models and related mock services (smart approval path + risk scoring).
  • Removed an old SQL migration (001_init_users.sql) in favor of the newer schema approach.
  • Added compression and express-rate-limit to the backend and enabled them in backend/src/app.js.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
backend/src/services/smartApproval.service.js Removes mock smart-approval path helper.
backend/src/services/riskScoring.service.js Removes mock expense risk scoring helper.
backend/src/services/ocr.service.js Removes mock OCR receipt parsing service implementation.
backend/src/routes/index.js Removes /ai route registration.
backend/src/modules/ai/ai.routes.js Deletes AI routing module.
backend/src/modules/ai/ai.model.js Deletes AI model stub.
backend/src/modules/ai/ai.controller.js Deletes AI controller.
backend/src/db/migrations/001_init_users.sql Deletes legacy user/company schema migration.
backend/src/app.js Adds compression + rate limiting middleware.
backend/package.json Adds compression and express-rate-limit dependencies.
backend/package-lock.json Locks new dependency tree for added middleware packages.
Files not reviewed (1)
  • backend/package-lock.json: Generated file
Comments suppressed due to low confidence (1)

backend/src/services/ocr.service.js:1

  • parseReceiptWithOcr is still imported and used by the expenses module (e.g., backend/src/modules/expenses/expenses.controller.js), but this PR removes the implementation from ocr.service.js. That will cause a runtime/module resolution (or missing export) failure when starting the backend or calling /expenses/ocr. Either keep this service (even as a stub) or remove/update the expenses OCR endpoint and its import.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/src/app.js
Comment on lines +4 to +5
import compression from "compression";
import rateLimit from "express-rate-limit";
@Aditya2550
Aditya2550 deleted the chore/phase-1-cleanup branch July 6, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants