Modern credit scoring system for gig economy workers with ML-powered risk assessment, loan management, and real-time performance tracking.
- Node.js >= 16.x
- Python >= 3.8
- npm >= 8.x
- PostgreSQL (Neon Cloud)
1οΈβ£ ML Service (Port 5001):
cd ml_service
pip install -r requirements.txt
python app.py2οΈβ£ Backend Server (Port 5000):
cd server
npm install
npm start3οΈβ£ Frontend Client (Port 5173):
cd client
npm install
npm run devπ Access the app: http://localhost:5173
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite + Tailwind CSS v4 |
| Backend | Node.js + Express 5 |
| Database | PostgreSQL (Neon Cloud) |
| ML Service | Python + Flask + scikit-learn |
| Authentication | JWT + bcrypt |
| Icons | Lucide React |
- Dashboard - Real-time credit score, performance metrics, earnings summary
- Credit Score - ML-powered credit scoring with detailed breakdown
- Earnings Tracking - Log daily work hours, ratings, and income
- Loan Eligibility - View max loan amount, interest rates, risk category
- Loan Applications - Apply for loans from multiple banks
- Profile Management - Update personal information
- Dashboard - Worker statistics, loan analytics, platform overview
- Worker Management - Search workers, view profiles, credit scores
- Loan Management - Review, approve/reject loan applications
- Performance Metrics - Track worker performance across the platform
- Sky Blue Theme - Modern gradient design with slate/sky color palette
- Dark Mode - Full dark mode support with smooth transitions
- Responsive - Mobile-first design, works on all screen sizes
- Accessibility - WCAG AA compliant, keyboard navigation
DU_Hacks/
βββ π client/ # React Frontend (Vite)
β βββ src/
β β βββ pages/ # Page components
β β β βββ LoginPage.jsx
β β β βββ RegisterPage.jsx
β β β βββ DashboardPage.jsx
β β β βββ EarningsPage.jsx
β β β βββ LoanEligibilityPage.jsx
β β β βββ LoanApplicationPage.jsx
β β β βββ ProfilePage.jsx
β β β βββ AdminDashboardPage.jsx
β β β βββ AdminWorkersPage.jsx
β β β βββ AdminLoansPage.jsx
β β βββ components/ # Reusable UI components
β β β βββ common/ # Button, Card, Input, Modal, etc.
β β β βββ worker/ # Worker-specific components
β β β βββ admin/ # Admin-specific components
β β βββ context/ # React Context (Auth, Theme)
β β βββ hooks/ # Custom hooks
β β βββ services/ # API service layer
β βββ package.json
β
βββ π server/ # Node.js Backend (Express)
β βββ index.js # Main server entry
β βββ db.js # PostgreSQL connection
β βββ auth.js # Authentication logic
β βββ middleware.js # Auth middleware
β βββ migrations/ # Database migrations
β βββ package.json
β
βββ π ml_service/ # Python ML Service (Flask)
β βββ app.py # Flask API server
β βββ requirements.txt # Python dependencies
β βββ README.md
β
βββ README.md # This file
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
User registration |
| POST | /api/auth/login |
User login |
| GET | /api/auth/me |
Get current user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/workers |
Get all workers |
| GET | /api/workers/:id |
Get worker by ID |
| PUT | /api/workers/:id |
Update worker |
| GET | /api/workers/:id/credit-score |
Get credit score |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/earnings/:workerId |
Get earnings history |
| POST | /api/earnings |
Add earnings record |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/loans |
Get all loans |
| POST | /api/loans |
Create loan application |
| PATCH | /api/loans/:id/status |
Update loan status |
| Method | Endpoint | Description |
|---|---|---|
| POST | /predict |
Get ML credit score prediction |
| GET | /health |
Health check |
The credit scoring system uses a Gradient Boosting Classifier trained on:
- Monthly Income
- Work Hours per Week
- Platform Rating (1-5)
- Completed Jobs Count
- Account Age (months)
- Debt-to-Income Ratio
- Credit Score (300-850)
- Risk Category (Low/Medium/High)
- Loan Eligibility (Max amount, Interest rate)
| Element | Color | Hex |
|---|---|---|
| Background | Slate 50 | #f8fafc |
| Cards | White | #ffffff |
| Primary | Sky 500 | #0ea5e9 |
| Text | Slate 900 | #0f172a |
| Element | Color | Hex |
|---|---|---|
| Background | Slate 950 | #020617 |
| Cards | Slate 800 | #1e293b |
| Primary | Sky 500 | #0ea5e9 |
| Text | Slate 100 | #f1f5f9 |
# Frontend tests
cd client
npm test
# Backend tests
cd server
npm testDATABASE_URL=postgresql://username:password@host/database
JWT_SECRET=your_jwt_secret_key
ML_SERVICE_URL=http://localhost:5001
PORT=5000VITE_API_URL=http://localhost:5000# Frontend
cd client && npm run build
# Output: client/dist/
# Backend
cd server && npm start
# ML Service
cd ml_service && python app.pyMIT License - See LICENSE file for details.
- Built for DU Hacks Hackathon 2026
- Powered by Neon PostgreSQL
- ML Model trained with scikit-learn
Built with β€οΈ for the gig economy workers