cd server
npm start✅ Server running on http://localhost:3000
cd ml_service
python app.py✅ ML Service running on http://localhost:5001
cd client
npm run dev✅ Frontend running on http://localhost:5173
Worker Account
- Username:
worker1 - Password:
w123
Admin Account
- Username:
banker1 - Password:
b123
Demo Account
- Username:
demo_worker - Password:
demo123
| Component | Status | Port |
|---|---|---|
| Frontend (React) | ✅ Running | 5173 |
| Backend (Express) | ✅ Running | 3000 |
| ML Service (Flask) | ✅ Running | 5001 |
| Database (PostgreSQL) | ✅ Connected | (Neon) |
| Authentication | ✅ Enabled | JWT |
- ✅ Register & Login securely
- ✅ Submit risk assessment
- ✅ Get instant credit score
- ✅ Apply for loans
- ✅ Track application status
- ✅ View all workers
- ✅ Review assessments
- ✅ Approve/reject loans
- ✅ View analytics
- ✅ Manage user roles
- ✅ ML-powered risk scoring
- ✅ Secure JWT authentication
- ✅ Bcrypt password hashing
- ✅ Role-based access control
- ✅ Dark mode support
- ✅ Mobile responsive
- FINAL_COMPLETION_REPORT.md - Complete project status
- AUTHENTICATION_IMPLEMENTATION.md - Auth API docs
- AUTH_COMPLETE_SUMMARY.md - Architecture overview
- FULL_STATUS_REPORT.md - Detailed status
- README.md - Project overview
curl -X POST http://localhost:3000/api/login \
-H "Content-Type: application/json" \
-d '{"username":"worker1","password":"w123"}'curl -X GET http://localhost:3000/api/user/profile \
-H "Authorization: Bearer {YOUR_TOKEN}"curl -X POST http://localhost:3000/api/assess-risk \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {YOUR_TOKEN}" \
-d '{
"worker_name":"John Doe",
"upi_earnings":500,
"delivery_frequency":20,
"work_consistency":6,
"existing_debt":0
}'# Check database contents
node server/check_db_data.js
# Update schema
node server/migrate_users_table.js
# Seed test users
node server/update_auth_users.js# Build for production
cd client && npm run build
# Run tests
npm run test# Check health
curl http://localhost:3000/api/health
# Install dependencies
npm installCreate .env file in server directory:
DATABASE_URL=postgresql://user:password@host/database
JWT_SECRET=your-secret-key-here
NODE_ENV=developmentFrontend: React 19 + Vite + Tailwind CSS
Backend: Express.js + PostgreSQL + JWT Auth
ML: Flask + scikit-learn Random Forest
Database: Neon PostgreSQL (Cloud)
The system is 100% complete and production-ready:
- ✅ User authentication (register/login)
- ✅ Password security (bcryptjs)
- ✅ JWT tokens (7-day expiration)
- ✅ Role-based access control
- ✅ ML risk scoring
- ✅ Database persistence
- ✅ Professional UI
- ✅ Error handling
- ✅ Input validation
- ✅ Documentation
Backend won't start?
- Check
npm installis complete - Verify
.envhas DATABASE_URL - Check port 3000 is available
ML service error?
- Ensure Python installed
- Check
pip install -r requirements.txt - Verify port 5001 is available
Frontend won't load?
- Check backend is running
- Clear browser cache
- Ensure port 5173 is available
Login fails?
- Verify credentials are correct
- Check backend is running
- Check database is connected
Navigate to http://localhost:5173 and start using CrediGig!
Need help? Check the documentation files in the root directory.
CrediGig v1.0.0 - Production Ready 🚀