Skip to content

Latest commit

 

History

History
231 lines (168 loc) · 5.06 KB

File metadata and controls

231 lines (168 loc) · 5.06 KB

🚀 Quick Deployment Steps

✅ Git Repository Initialized!

Your code is now ready to upload to GitHub. Follow these steps:


📤 STEP 1: Upload to GitHub

Option A: Using GitHub CLI (Easiest)

# Install GitHub CLI from: https://cli.github.com/
# Then run:

gh auth login
gh repo create loan-easy --public --source=. --remote=origin
git push -u origin master

Option B: Using GitHub Website

  1. Create Repository on GitHub:

    • Go to: https://github.com/new
    • Repository name: loan-easy
    • Description: AI-Powered Loan Approval System with Document Verification
    • Make it Public
    • DON'T initialize with README
    • Click "Create repository"
  2. Push Your Code:

    git remote add origin https://github.com/YOUR_USERNAME/loan-easy.git
    git branch -M main
    git push -u origin main

🌐 STEP 2: Deploy to Vercel

Method 1: Vercel Dashboard (Recommended)

  1. Go to: https://vercel.com/signup
  2. Sign up/Login with GitHub account
  3. Click "Add New..." → "Project"
  4. Import Git Repository
  5. Select loan-easy repository
  6. Click "Import"
  7. Configure:
    • Framework Preset: Other
    • Build Command: (leave empty)
    • Output Directory: (leave empty)
    • Install Command: pip install -r requirements.txt
  8. Click "Deploy"
  9. Wait 2-3 minutes ⏳
  10. Get your live URL: https://loan-easy-xyz.vercel.app 🎉

Method 2: Vercel CLI

# Install Vercel CLI
npm install -g vercel

# Login
vercel login

# Deploy
vercel --prod

⚠️ IMPORTANT: Database Configuration

Vercel uses serverless functions, so SQLite will reset on each deployment.

For Production: Use PostgreSQL

Option 1: Vercel Postgres (Easiest)

  1. In Vercel Dashboard → Your Project → Storage
  2. Click "Create Database" → Choose "Postgres"
  3. Copy connection string
  4. Add environment variable:
    • Name: DATABASE_URL
    • Value: postgresql://... (the connection string)

Option 2: Supabase (Free)

  1. Go to: https://supabase.com
  2. Create new project
  3. Go to Settings → Database → Connection String
  4. Copy the connection string
  5. In Vercel: Settings → Environment Variables
    • Name: DATABASE_URL
    • Value: postgresql://...

Update app_auth.py (after choosing database):

# Add at the top with other imports
import os

# Update database URI (around line 15):
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL') or 'sqlite:///loaneasy.db'

Then commit and push:

git add app_auth.py
git commit -m "Add PostgreSQL support for production"
git push origin main

🔐 STEP 3: Secure Your App

  1. Generate a secure secret key:

    python -c "import secrets; print(secrets.token_hex(32))"
  2. In Vercel Dashboard:

    • Go to: Settings → Environment Variables
    • Add: SECRET_KEY = your-generated-key-here
  3. Update app_auth.py:

    app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY') or 'loaneasy-secret-key-2025-secure'
  4. Commit and push:

    git add app_auth.py
    git commit -m "Add secure secret key from environment"
    git push origin main

✅ Verification Checklist

After deployment:

  • Application loads without errors
  • Can register new account
  • Can login successfully
  • Can create profile
  • Verification system works
  • Can apply for loan
  • Database persists data (if using PostgreSQL)
  • All pages accessible
  • Responsive design works on mobile

🎯 Your URLs

  • GitHub Repository: https://github.com/YOUR_USERNAME/loan-easy
  • Live Application: https://loan-easy-xyz.vercel.app

📱 Test Your Deployed App

  1. Visit your Vercel URL
  2. Register a new account
  3. Complete profile with:
    • PAN: ABCDE1234F
    • Aadhar: 123456789012
    • Bank IFSC: SBIN0001234
    • Account: 12345678901234
    • CIBIL: 750
  4. View verification results
  5. Apply for loan!

🔄 Update Your App

Whenever you make changes:

git add .
git commit -m "Description of changes"
git push origin main

Vercel will automatically rebuild and deploy! 🚀


🆘 Troubleshooting

Build Failed on Vercel

  • Check build logs in Vercel dashboard
  • Ensure all dependencies in requirements.txt
  • Verify Python version in runtime.txt

Database Resets

  • SQLite resets on serverless platforms
  • Solution: Migrate to PostgreSQL (see above)

500 Internal Server Error

  • Check Vercel function logs
  • Verify model files are in repository
  • Check environment variables

Can't Login After Deployment

  • Database might have reset
  • Create new account on deployed version
  • Use PostgreSQL for persistent data

📚 Need More Help?

See the complete guide: DEPLOYMENT_GUIDE.md


Current Status: ✅ Code committed to Git (46 files, 10,813 lines) ✅ Ready to push to GitHub ✅ Ready to deploy to Vercel ✅ Deployment files configured

Next Step: Choose Option A or B above to upload to GitHub! 🚀