TradeLink is a full-stack web application designed for homeowners to post service requests and for tradespeople to browse and manage them. (Example: "Need a plumber for a leaking tap in Colombo 07"). This project was built as a technical assessment for the Full-Stack Developer Intern role at GlobalTNA.
- Frontend: Next.js 14+ (App Router)
- Backend: Node.js & Express.js
- Database: MongoDB Atlas
- ODM: Mongoose
- Styling: Tailwind CSS
The project is divided into two main directories:
/backend: The Express.js REST API./frontend: The Next.js web application.
- Node.js (v18 or higher)
- npm or yarn
Create a .env file in the backend directory:
MONGO_URI=your_mongodb_atlas_connection_string
PORT=5000Create a .env.local file in the frontend directory:
NEXT_PUBLIC_API_URL=http://127.0.0.1:5000Install dependencies for both parts:
# Backend
cd backend
npm install
# Frontend
cd ../frontend
npm installcd backend
npm run devTo populate the database with professional Sri Lankan themed sample jobs:
cd backend
npm run seedcd frontend
npm run devOpen http://localhost:3000 to view the app.
GET /api/jobs- List all jobs (Supports filters:category,status,search)GET /api/jobs/:id- Get job detailsPOST /api/jobs- Create a new job requestPATCH /api/jobs/:id- Update job statusDELETE /api/jobs/:id- Remove a job posting
- Premium UI: Modern glassmorphism design with responsive layouts.
- Real-time Search: Debounced keyword search across titles and descriptions.
- Fail-safe Mode: Backend includes a mock-data fallback if the database connection is slow.
- Validation: Strict input validation on both client and server sides.
Built by Nethshan Dulmin for the GlobalTNA Technical Assessment.