TrustLance is a production-grade, secure freelance marketplace featuring integrated application-level escrow-style payment protection, dispute resolution boards, and a network social directory.
The application is built using Next.js (App Router), TypeScript, Tailwind CSS, Prisma ORM (with PostgreSQL), NextAuth.js, Razorpay payment gateway integrations, and SendGrid mail systems.
TrustLance operates with three primary, distinct user roles:
- Capabilities:
- Create and fund projects by depositing escrow balances (milestones).
- Review submitted proposals from freelancers.
- Select and assign freelancers to start a contract.
- Access private workspaces for real-time project messaging.
- Request modifications or approve deliverables to release escrow funds.
- Escalate unresolved disputes to system administrators.
- Submit bidirectional reputation ratings and reviews upon completion.
- Capabilities:
- Search and browse open projects in the marketplace directory.
- Submit proposals with optional counter-offer pricing.
- Access private contract workspaces upon selection.
- Upload files and links to submit milestones.
- Raise disputes if work is rejected or funds are withheld.
- Rate and review clients after project release.
- Build professional networks via bidirectional connection requests.
- Capabilities:
- Adjudicate active disputes (options: release to freelancer, refund to client, or split).
- Monitor aggregate statistics (total users, active escrows, total value locked).
- Inspect profile flag/violation reports.
- Audit system-wide action histories via database audit logs.
The platform uses a high-contrast Indigo-based theme, featuring a strict black-and-white color layout to ensure visual clarity.
- **Background **:
#000000(True Black) - Surface:
#FFFFFF/#111111(Near Black) - Surface Elevated:
#FFFFFF/#1a1a1a(Dark Gray) - Accent Primary:
#4F46E5(Indigo) /#6366F1(Light Indigo) - Typography: Inter / Sans-serif system default, using strict font and spacing scales.
- Icons: Lucide-React exclusively.
- Framework: Next.js 16.2.10 (App Router)
- Database: PostgreSQL hosted on Neon, managed via Prisma ORM
- Authentication: NextAuth.js (Session-based, with credentials and Google OAuth provider support)
- Payment Gateway: Razorpay (Checkout & Orders API, verified with signature checking and webhook handlers)
- File Storage: AWS S3 (Presigned URLs for secure file uploads)
- Emailing Service: SendGrid (Transactional emails for onboarding, milestones, payments, and disputes)
- Testing: Jest + ts-jest
The database contains pre-configured test overrides with pre-completed user profiles.
| Role | Description | Profile Details | |
|---|---|---|---|
| Admin | thusharyyy@gmail.com |
System administrator account | Pre-completed profile |
| Client | thushar2410612@ssn.edu.in |
Client test account | Pre-completed business profile |
| Freelancer | thushar.tl.dev@gmail.com |
Freelancer test account | Pre-completed skills/bio profile |
- Initialize database schema:
npx prisma db push
- Populate the database seed overrides:
npx prisma db seed
Follow these steps to run the application locally:
- Clone & Install Dependencies:
npm install
- Environment Configuration:
Create a
.envfile in the root directory based on.env.example:Provide valid keys for Database, NextAuth, SendGrid, Razorpay, and AWS S3.cp .env.example .env
- Run Dev Server:
Open http://localhost:3000 to view the homepage.
npm run dev
To deploy this project to Vercel:
- Import the repository in the Vercel Dashboard.
- In the Build and Output Settings, keep all commands at their default values. The build command will automatically run:
(which triggers
npm run build
prisma generate && next buildas configured inpackage.json). - Add the following Environment Variables under the project settings:
DATABASE_URL(Neon PostgreSQL database URL)NEXTAUTH_SECRET(Random secret key)NEXTAUTH_URL(Your production Vercel domain, e.g.,https://your-project.vercel.app)GOOGLE_CLIENT_ID&GOOGLE_CLIENT_SECRET(For OAuth)RAZORPAY_KEY_ID&RAZORPAY_KEY_SECRETRAZORPAY_WEBHOOK_SECRETAWS_ACCESS_KEY_ID&AWS_SECRET_ACCESS_KEYAWS_REGION&AWS_S3_BUCKET_NAMESENDGRID_API_KEYEMAIL_FROM_ADDRESS&EMAIL_FROM_NAME
Ensure all checks pass before submitting pull requests:
- Lint Checking:
npm run lint
- Testing Suites:
npm test