This document describes how to deploy Fin-Trust to production hosting platforms.
The React frontend compiles to a static bundle using Vite and can be hosted on Vercel or Netlify.
Ensure the frontend/ folder is committed to your repository root.
- Log in to Vercel and import your repository.
- Select Vite as the Framework Preset.
- Configure directories:
- Root Directory:
frontend
- Root Directory:
- Expand Environment Variables and add:
VITE_API_URL: Your deployed backend API URL (e.g.https://fin-trust-backend.onrender.com/api)
- Click Deploy. Vercel will automatically run
npm run buildand provision an SSL certificate.
The backend runs as a continuous Node.js server. We recommend deploying to Render as a Web Service.
- Log in to Render and link your GitHub account.
- Click New + and select Web Service.
- Select your repository.
- Configure service parameters:
- Name:
fin-trust-backend - Root Directory:
backend - Runtime:
Node - Build Command:
npm install - Start Command:
npm start - Instance Type:
Free(or higher)
- Name:
Add the following key-value pairs in the Environment settings tab of your Render service:
| Variable | Recommended Value | Purpose |
|---|---|---|
NODE_ENV |
production |
Enables production mode rules and disables debug alerts. |
PORT |
5000 |
Port for the backend. Render automatically binds this. |
MONGO_URI |
mongodb+srv://... |
MongoDB connection string. |
JWT_SECRET |
your_long_random_secret_string |
Used to sign stateless user tokens. |
CLIENT_URL |
https://fintrustinternshipproject.vercel.app |
Target for CORS verification matches. |
BREVO_API_KEY |
xkeysib-... |
(Optional) Bypasses SMTP ports blocked by Render. |
EMAIL_USER |
anupkodase@gmail.com |
Email user login credentials (Gmail App password). |
EMAIL_PASS |
xxxx xxxx xxxx xxxx |
App password. |
GEMINI_API_KEY |
your_gemini_developer_key |
Used for generating trust score explanations. |
Many hosting providers (including Render and Heroku) block outbound SMTP ports (25, 465, 587) by default to prevent spam. This can cause standard Nodemailer configurations using Gmail/Outlook SMTP to timeout.
To resolve this issue, Fin-Trust implements two levels of HTTP-based email API delivery fallbacks that run over standard HTTPS port 443 (which is never blocked):
- Brevo (Sendinblue) API:
- If
BREVO_API_KEYis configured in the environment, the app automatically delivers verification emails via Brevo's HTTP client endpoint.
- If
- Resend API:
- If
RESEND_API_KEYis set, the app will fallback to the Resend HTTP API client.
- If
- SMTP Fallback:
- If neither API key is set, the app falls back to SMTP Nodemailer.