A two-sided marketplace connecting employers with verified blue-collar workers (plumbers, electricians, carpenters) in India. Built with Spring Boot + Flutter, in a single repo.
Status: Active development. Core auth, worker search, and job booking flow are built. See Roadmap for what's planned but not implemented yet.
Flutter App (Android/iOS)
│
│ REST API + WebSocket
▼
Spring Boot Backend (Java 17)
│
├── PostgreSQL (users, jobs, otps)
└── Redis (worker availability cache by pincode)
This is a single repo containing both the backend and the Flutter app.
shramik/
├── backend/ ← Spring Boot API
│ ├── src/main/java/com/shramik/
│ │ ├── controller/ ← HTTP endpoints (REST API)
│ │ ├── service/ ← Business logic
│ │ ├── entity/ ← Database tables (JPA)
│ │ ├── repository/ ← Database queries
│ │ ├── security/ ← JWT auth filter
│ │ ├── config/ ← Redis, WebSocket, Security config
│ │ ├── dto/ ← API request/response shapes
│ │ └── enums/ ← Skill types, job status, etc.
│ ├── Dockerfile
│ └── pom.xml
│
├── flutter_app/ ← Flutter mobile app
│ ├── lib/
│ │ ├── main.dart
│ │ ├── models/
│ │ ├── services/ ← API calls
│ │ ├── providers/ ← State management (Provider)
│ │ ├── screens/
│ │ │ ├── auth/ ← Login, OTP screens
│ │ │ ├── worker/ ← Worker dashboard, profile setup
│ │ │ ├── employer/ ← Home, search, booking screens
│ │ │ └── shared/ ← Job detail screen
│ │ └── utils/
│ └── pubspec.yaml
│
└── docker-compose.yml ← Runs backend + postgres + redis together
- Java 17+
- Flutter 3.16+
- Docker + Docker Compose
docker-compose up --buildThis starts PostgreSQL, Redis, and the Spring Boot API on port 8080.
cd flutter_app
flutter pub get
flutter runFor Android emulator,
10.0.2.2:8080points to your computer's localhost automatically. For a physical device, update the API base URL inlib/utils/app_constants.dartto your computer's local IP.
⚠️ OTP is currently mocked locally (OTP_MOCK=true) — no real SMS is sent yet. See Roadmap.
All protected routes require: Authorization: Bearer <token>
| Method | Endpoint | Body | Description |
|---|---|---|---|
| POST | /api/auth/send-otp |
{"phone":"9876543210"} |
Send OTP (mocked) |
| POST | /api/auth/verify-otp |
{"phone":"...","otp":"123456","role":"WORKER"} |
Verify OTP → JWT |
| Method | Endpoint | Description |
|---|---|---|
| PUT | /api/workers/profile |
Update worker profile |
| GET | /api/workers/{id} |
View worker profile |
| PATCH | /api/workers/availability?status=AVAILABLE_NOW |
Toggle availability |
| GET | /api/workers/search?skill=PLUMBER&pincode=201001 |
Search workers |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/jobs |
Create booking |
| PATCH | /api/jobs/{id}/status?status=ACCEPTED |
Accept/complete job |
| POST | /api/jobs/{id}/rate |
Rate worker |
| GET | /api/jobs/worker |
Worker's job history |
| GET | /api/jobs/employer |
Employer's job history |
Why Redis for worker availability?
Searching "plumbers near 201001" would otherwise hit PostgreSQL on every request. Redis caches search results per pincode with a 5-minute TTL, and a @CacheEvict clears the relevant pincode key whenever a worker updates their status. This avoids repeated DB load under concurrent search traffic.
Why WebSocket for job notifications? Polling the backend every few seconds for "any new jobs?" wastes requests and battery. STOMP over WebSocket lets the server push a notification the moment a job is created, so workers see new jobs instantly.
Why JWT over server sessions? Mobile clients don't use browser cookies. JWT is a signed token stored on-device; the server validates the signature without a DB lookup per request, which also makes the backend stateless and easier to scale horizontally later.
Why phone + OTP instead of passwords? Phone number is a universal identity in this user base, and OTP removes the "forgot password" support burden entirely. (Note: OTP delivery is currently mocked for local dev — see Roadmap.)
These are planned, not implemented. Listed here deliberately so the README doesn't overstate the current state of the project.
- Real SMS delivery for OTP (currently mocked —
OTP_MOCK=true) - Platform fee / payment processing logic
- CI/CD pipeline (GitHub Actions for test + deploy)
- Production deployment / hosting
- Real users / pilot testing outside personal use
Awaneet Mishra — @awaneetdecoder