fix: pre-deployment sanitization for Render#155
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🚀 PR Received SuccessfullyHello @kunalverma2512, Thank you for taking the initiative to contribute to this project. Please ensure that your PR follows all project guidelines properly before requesting review.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR prepares the CodeLens backend server for production deployment on Render through environment configuration updates, security hardening for cross-domain cookies, Express reverse-proxy configuration, email service port flexibility, and comprehensive deployment documentation with environment template guidance. ChangesProduction Deployment Setup for Render
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📌 Pull Request Summary
📝 Description
Prepares the full server for production deployment
on Render.
Changes Made
sameSite: Nonein production) thatcaused all axios auth requests to return 401
trust proxyto Express for correct IP resolution behindRender's reverse proxy (fixes rate limiting for all users)
JWT_EXPIRES_IN→JWT_ACCESS_EXPIRES_INname mismatch thatcrashed the server on startup
integer with dynamic
secureflagstartscript topackage.jsonfor Render deploymentnodemontodevDependenciesCLIENT_URIreference, addedlocalhost comment
server/server-deploying.md— full 13-section deploymentguide documenting architecture, all services, env vars, and
troubleshooting
Motivation
APEX AI is the core differentiator of the CodeLens platform. It
provides real, data-backed insights by reading the user's actual
Codeforces and GitHub data — not generic advice. This PR brings that
feature from zero to fully functional and deployed. The deployment
fixes resolve a class of bugs (401 errors, rate limit failures, server
crashes) that historically appear only in production and are hard to
debug after the fact.
🚀 Type of Change
🧪 Testing
Verification
Test Details
conversation creation, listing, message streaming, context data
accuracy, and conversation deletion
activity by triggering a GitHub sync and creating a fresh conversation
word-by-word response rendering
small screens
streaming
vite buildin CI)📸 Screenshots / Demo (If Applicable)
APEX workspace chat — streaming response in dark B&W design
✅ Checklist
📚 Additional Notes
to protect the Gemini free-tier quota (1500 req/day shared).
show incomplete context — users should start a new conversation after
syncing GitHub data for accurate insights.
production callback URL is set (GitHub allows only one callback URL
per app). See
server-deploying.mdSection 7 for details.server-deploying.mddocuments every env variable, all services,architecture decisions, and common production errors with their fixes.
Summary by CodeRabbit
Documentation
Bug Fixes
Chores