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