How 450gowsik/daycraft works
DayCraft is a bilingual local-labor marketplace. Workers register and verify their identity, discover nearby or recommended jobs, apply, and communicate; employers post jobs and manage applicants, while admins oversee platform activity. The React SPA calls an Express API whose domain routes and controllers coordinate MongoDB-backed records, matching, and marketplace services. The graph includes documented chat, notification, payment, and chatbot capabilities even where their implementation was not sampled; those links use README or API registration evidence rather than inferred internal calls.
Main entry points: app.js Express API · App.jsx React application · auth.controller.js Authentication · User.js User identity
Components 29
Web experience
- React application
frontend/src/App.jsx - Bilingual UI
frontend/src/context/LanguageContext.jsx - Job discovery
frontend/src/pages/Home.jsx - Job details
frontend/src/pages/JobDetails.jsx - Job posting
frontend/src/pages/PostJob.jsx - Registration
frontend/src/pages/auth/Register.jsx
Identity and profiles
- Authentication
backend/src/controllers/auth.controller.js - OTP verification
backend/src/controllers/otp.controller.js - Access control
backend/src/middleware/auth.js - Refresh tokens
backend/src/services/refreshTokenService.js - JWT utilities
backend/src/utils/jwt.js
Hiring marketplace
- Job management
backend/src/controllers/job.controller.js - Applications
backend/src/controllers/application.controller.js - Job matching
backend/src/services/matchingService.js
Platform services
- Express API
backend/src/app.js - Chat and notifications
backend/src/controllers - Payments
backend/src/controllers/paymentController.js - Administration
backend/src/controllers/adminController.js - AI chatbot
backend/src/services/groqService.js - Chatbot data queries
backend/src/services/dbQueryService.js - Email delivery
backend/src/services/emailService.js - SMS delivery
backend/src/services/smsService.js
Persistence
- User identity
backend/src/models/User.js - Worker profiles
backend/src/models/Worker.js - Employer profiles
backend/src/models/Employer.js - Job records
backend/src/models/Job.js - Application records
backend/src/models/Application.js - MongoDB
backend/src/config/db.js
Other components
- Marketplace users
Connections 40
- Marketplace users → React application: uses
- React application → Job discovery: routes to
frontend/src/App.jsx - React application → Job details: routes to
frontend/src/App.jsx - React application → Job posting: routes to
frontend/src/App.jsx - React application → Registration: routes to
frontend/src/App.jsx - React application → Bilingual UI: shares state
frontend/src/main.jsx - React application → Express API: calls REST API
- Express API → Authentication: routes requests
backend/src/app.js - Express API → Job management: routes requests
backend/src/app.js - Express API → Applications: routes requests
backend/src/app.js - Express API → Chat and notifications: routes requests
backend/src/app.js - Express API → Payments: routes requests
backend/src/app.js - Express API → Administration: routes requests
backend/src/app.js - Express API → AI chatbot: routes requests
backend/src/app.js - Authentication → User identity: creates and reads
backend/src/controllers/auth.controller.js - Authentication → Worker profiles: manages profile
backend/src/controllers/auth.controller.js - Authentication → Employer profiles: manages profile
backend/src/controllers/auth.controller.js - Authentication → Refresh tokens: uses tokens
backend/src/controllers/auth.controller.js - Authentication → Email delivery: sends email
backend/src/controllers/auth.controller.js - Authentication → JWT utilities: creates tokens
backend/src/controllers/auth.controller.js - OTP verification → User identity: checks identity
backend/src/controllers/otp.controller.js - OTP verification → SMS delivery: sends codes
backend/src/controllers/otp.controller.js - OTP verification → Email delivery: sends codes
backend/src/controllers/otp.controller.js - Access control → JWT utilities: verifies tokens
backend/src/middleware/auth.js - Access control → User identity: loads user
backend/src/middleware/auth.js - Job management → Job records: reads and writes
backend/src/controllers/job.controller.js - Job management → User identity: loads worker
backend/src/controllers/job.controller.js - Job management → Job matching: requests recommendations
backend/src/controllers/job.controller.js - Job management → Chat and notifications: creates notifications
backend/src/controllers/job.controller.js - Applications → Application records: reads and writes
backend/src/controllers/application.controller.js - Applications → Job records: loads job
backend/src/controllers/application.controller.js - Applications → User identity: loads worker
backend/src/controllers/application.controller.js - Applications → Chat and notifications: notifies users
backend/src/controllers/application.controller.js - AI chatbot → Chatbot data queries: requests live data
backend/src/services/groqService.js - Chatbot data queries → Worker profiles: queries
backend/src/services/dbQueryService.js - Chatbot data queries → Job records: queries
backend/src/services/dbQueryService.js - Chatbot data queries → User identity: queries
backend/src/services/dbQueryService.js - Chatbot data queries → Employer profiles: queries
backend/src/services/dbQueryService.js - Express API → MongoDB: connects to
backend/src/app.js - Payments → MongoDB: persists payment data