fix: resolve Node server boot crashes, missing routes, and prediction stats - #926
Open
onkar0127 wants to merge 3 commits into
Open
fix: resolve Node server boot crashes, missing routes, and prediction stats#926onkar0127 wants to merge 3 commits into
onkar0127 wants to merge 3 commits into
Conversation
|
@onkar0127 is attempting to deploy a commit to the Aditya Sharma's projects Team on Vercel. A member of the Team first needs to authorize it. |
onkar0127
force-pushed
the
fix/server-startup-and-missing-files
branch
from
July 18, 2026 17:01
9e38f21 to
7756356
Compare
Contributor
Author
|
@Userunknown84 let me know about this PR!! |
onkar0127
force-pushed
the
fix/server-startup-and-missing-files
branch
from
July 19, 2026 05:04
95bc336 to
7756356
Compare
Userunknown84
requested changes
Jul 19, 2026
Userunknown84
left a comment
Owner
There was a problem hiding this comment.
Some code delete i comment on it.
…ix /trends route and restore tests configuration
| } | ||
| }); | ||
|
|
||
| router.get('/',protect,async(req,res) => { |
Userunknown84
requested changes
Jul 20, 2026
Userunknown84
left a comment
Owner
There was a problem hiding this comment.
Few things i coment on it please check rest code is fine i see .
Userunknown84
requested changes
Jul 21, 2026
Userunknown84
left a comment
Owner
There was a problem hiding this comment.
Merge conflict and some code delete so kindly fix then i will merge
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.
RESOLVE #836
PR Description:
Problem Summary
Following recent merges, the Node.js Express server was failing to boot and crashed immediately on startup. In addition, there were multiple missing routes and engine scripts that caused 404/500 errors on dashboard pages, along with a database query lookup bug on the
/statsendpoint.This PR cleans up Express route initialization order, stubs the missing visual routes and poisoning defense python components, aligns CLI arguments across Python detectors, and fixes database lookup models.
Key Changes
1. Core Express Initialization & Server Boot Fixes
backend/server.jsappinstance before mounting any middleware or custom routers, resolving the fatalReferenceError: app is not defined.logStartupTimedefinition.saltingRoutesrouter under/api/salting.2. Added Missing Router & Scripts
backend/routes/visualRoutes.js,backend/llm_poisoning_defense.pyvisualRoutes.jsto prevent the import crash whenrequire('./routes/visualRoutes')is resolved on server boot.llm_poisoning_defense.pyto handle command execution (--commandand--paramsargs) for the newly introduced poisoning defense endpoints (/validate,/detect,/train,/status).3. Restructured Python CLI Support
backend/text_salting_detector.py,backend/visual_detector.py,backend/routes/saltingRoutes.jssaltingRoutes.js(pointing to.jsinstead of.py).4. Fixed Stats Endpoint Crash
backend/routes/predictionRoutes.jsPredictionmodel in the/statsendpoint with the correctHistorycollection lookup, and mappeduserIdto the correct schema parameteruser.Verification and Testing
node --check backend/server.jspasses with zero errors).python -m py_compilepasses with zero errors).test_crypto_utils.py(3 Passed)test_sqlite_concurrency.py(1 Passed)test_spam_words.py(4 Passed)