How madeshwar-a/freelancer-marketplace works
Workly is a two-sided freelancer marketplace: clients post projects, freelancers browse and bid, clients review and decide on proposals, and users communicate by chat. The Express server serves the browser UI and REST API; controllers implement the marketplace actions over a database layer, while a separately handled WebSocket path supports live messaging. The README documents the broader frontend and PostgreSQL option; sampled source confirms the server, controller, routing, and database relationships shown here.
Main entry points: server.js Express server · db.js Database adapter · projects.js Project routes · auth.js Authentication and roles
Components 21
Browser experience
- Marketplace UI
public - Browser behavior
public/script.js
API and access
- Express server
server.js - Auth routes
routes/auth.js - Project routes
routes/projects.js - Proposal routes
routes/proposals.js - User routes
routes/users.js - Message routes
routes/messages.js - Authentication and roles
middleware/auth.js - Request validation
middleware/validate.js
Marketplace workflows
- Account and sessions
controllers/authController.js - Project listings
controllers/projectController.js - Bids and decisions
controllers/proposalController.js - User profiles
controllers/userController.js
Messaging
- Chat history
controllers/messageController.js - Live chat delivery
server.js
Persistence
- Database adapter
config/db.js - Database schema
config/init-db.js - Demo data
config/seed-demo.js - Marketplace database
.marketplace.db
Other components
- Clients and freelancers
Connections 34
- Clients and freelancers → Marketplace UI: uses
README.md - Marketplace UI → Browser behavior: loads
README.md - Browser behavior → Express server: requests API
README.md - Express server → Auth routes: mounts
server.js - Express server → Project routes: mounts
server.js - Express server → Proposal routes: mounts
server.js - Express server → User routes: mounts
server.js - Express server → Message routes: mounts
server.js - Auth routes → Account and sessions: dispatches
routes/auth.js - Auth routes → Authentication and roles: checks session
routes/auth.js - Auth routes → Request validation: validates signup
routes/auth.js - Project routes → Project listings: dispatches
routes/projects.js - Project routes → Bids and decisions: updates status
routes/projects.js - Project routes → Authentication and roles: checks roles
routes/projects.js - Project routes → Request validation: validates projects
routes/projects.js - Proposal routes → Bids and decisions: dispatches
routes/proposals.js - Proposal routes → Authentication and roles: checks session
routes/proposals.js - User routes → User profiles: dispatches
routes/users.js - User routes → Authentication and roles: checks session
routes/users.js - Message routes → Chat history: dispatches
routes/messages.js - Message routes → Authentication and roles: checks session
routes/messages.js - Account and sessions → Database adapter: queries users
controllers/authController.js - Project listings → Database adapter: queries projects
controllers/projectController.js - Bids and decisions → Database adapter: queries bids
controllers/proposalController.js - User profiles → Database adapter: queries profiles
controllers/userController.js - Chat history → Database adapter: reads messages
controllers/messageController.js - Express server → Database adapter: checks health
server.js - Express server → Database schema: initializes
server.js - Express server → Demo data: seeds demo
server.js - Database schema → Database adapter: executes schema
config/init-db.js - Demo data → Database adapter: writes demo data
config/seed-demo.js - Database adapter → Marketplace database: reads and writes
- Express server → Live chat delivery: handles upgrades
server.js - Clients and freelancers → Live chat delivery: sends chat
README.md