Skip to content

Latest commit

 

History

History
236 lines (192 loc) · 6.1 KB

File metadata and controls

236 lines (192 loc) · 6.1 KB

Microfinance Platform - Startup Checklist

Pre-Startup Checklist

✅ Environment Setup

  • Node.js v18+ installed
  • npm/yarn available
  • PostgreSQL database ready (Supabase)
  • Redis service ready (Upstash)
  • Cloudinary account configured
  • Email service configured (Brevo)

✅ Configuration Files

  • server/.env created from server/.env.example
  • Database URL configured
  • JWT secrets generated (32+ characters)
  • Redis configuration added
  • Cloudinary credentials added
  • Email SMTP settings added
  • Admin credentials configured

✅ Dependencies

  • Root dependencies installed: npm install
  • All workspace dependencies installed
  • No npm errors during installation

Database Setup Checklist

✅ Prisma Configuration

  • Prisma client generated: npm run db:generate -w server
  • Database schema pushed: npm run db:push -w server
  • No Prisma errors during generation
  • Database tables created successfully

✅ Database Verification

  • Can connect to database
  • All tables created (User, Customer, Loan, etc.)
  • Database relationships working
  • Seed data (if any) loaded

Service Startup Checklist

✅ Backend Server

  • Start server: npm run dev:server
  • Server starts without errors
  • Server running on port 5000
  • Database connection successful
  • Redis connection successful
  • All middleware loaded
  • All routes registered
  • Health endpoint accessible: GET http://localhost:5000/api/v1/health

✅ Web Application

  • Start web app: npm run dev:web
  • Web app starts without errors
  • Web app running on port 5173
  • Can access web app in browser
  • API calls to backend working
  • Static assets loading correctly
  • Hot reload working

✅ Mobile Application (Optional)

  • Start mobile app: npm run start -w apps/mobile
  • Expo Metro server starts
  • QR code generated
  • Can scan QR code with Expo Go
  • Mobile app loads on device
  • API calls to backend working

Functionality Verification Checklist

✅ Authentication

  • Can access login page
  • Can register new user
  • Can login with existing user
  • JWT tokens generated correctly
  • Protected routes working
  • Logout functionality working

✅ Admin Features

  • Can login as admin
  • Admin dashboard loads
  • Customer management working
  • Loan approval/rejection working
  • Reports generation working
  • User management working

✅ Customer Features

  • Can login as customer
  • Customer dashboard loads
  • Profile management working
  • Loan application working
  • EMI schedule visible
  • Document upload working

✅ API Endpoints

  • Auth endpoints: /api/v1/auth/*
  • Customer endpoints: /api/v1/customers/*
  • Loan endpoints: /api/v1/loans/*
  • EMI endpoints: /api/v1/emi/*
  • Repayment endpoints: /api/v1/repayments/*
  • Document endpoints: /api/v1/documents/*
  • Report endpoints: /api/v1/reports/*

Integration Testing Checklist

✅ File Uploads

  • Can upload profile photo
  • Can upload KYC documents
  • Files stored in Cloudinary
  • File URLs working correctly
  • File validation working

✅ Email Notifications

  • Registration emails sent
  • Loan status emails sent
  • Payment receipt emails sent
  • Email templates rendering correctly

✅ Background Jobs

  • Overdue check job running
  • Email notifications from jobs
  • Job logs visible
  • No job errors

Performance & Security Checklist

✅ Performance

  • Page load times acceptable
  • API response times acceptable
  • Database queries optimized
  • No memory leaks
  • No excessive logging

✅ Security

  • Environment variables not exposed
  • Passwords hashed
  • JWT secrets secure
  • Rate limiting working
  • Input validation working
  • CORS properly configured
  • Security headers present

Post-Startup Checklist

✅ Monitoring

  • Server logs monitored
  • Error tracking in place
  • Performance metrics collected
  • Database performance monitored

✅ Backup & Recovery

  • Database backup strategy
  • File backup strategy
  • Recovery procedure documented
  • Backup restoration tested

✅ Documentation

  • Running guide updated
  • Architecture documentation current
  • API documentation available
  • Deployment procedures documented

Troubleshooting Quick Reference

Common Issues & Solutions

Port Already in Use

# Find process using port
netstat -ano | findstr :5000
# Kill process
taskkill /PID <PID> /F

Database Connection Issues

  • Check DATABASE_URL in .env
  • Verify database is running
  • Test connection manually

Prisma Issues

# Regenerate client
npm run db:generate -w server

# Reset database (dev only)
npm run db:push -w server

Redis Connection Issues

  • Verify UPSTASH_REDIS_REST_URL
  • Check UPSTASH_REDIS_REST_TOKEN
  • Test Redis connection

Build Errors

# Clear node_modules
rm -rf node_modules package-lock.json
npm install

Success Criteria

The application is successfully running when:

  • ✅ All services start without errors
  • ✅ All database connections work
  • ✅ All API endpoints respond correctly
  • ✅ Web app loads and functions properly
  • ✅ Mobile app loads and functions properly
  • ✅ Authentication works for all user types
  • ✅ Core features (loans, payments, etc.) work
  • ✅ File uploads and email notifications work
  • ✅ Performance is acceptable
  • ✅ Security measures are in place

Next Steps

After successful startup:

  1. Testing: Perform thorough testing of all features
  2. Documentation: Update any missing documentation
  3. Deployment: Prepare for production deployment
  4. Monitoring: Set up production monitoring
  5. Backup: Implement backup strategies
  6. Security: Conduct security review

Support Contact

For issues during startup:

  1. Check this checklist
  2. Review logs for error messages
  3. Consult the running guide
  4. Check environment configuration
  5. Verify all prerequisites are met