Solving the Triple Constraint of Scope, Time & Cost with intelligent AI-driven project management.
Project Triangle is a full-stack, AI-enhanced freelance project management platform built on the MERN stack. It addresses the classic Project Management Triangle β balancing Scope, Time, and Cost β using Google Gemini AI for intelligent scoping, Socket.io for real-time collaboration, and Twilio for SMS and voice notifications. Clients can post projects, freelancers can bid, and both parties can track progress through a live visual dashboard.
- β¨ Features
- ποΈ Project Structure
- π οΈ Tech Stack
- π€ Google Gemini AI Integration
- π¬ Real-Time Features β Socket.io
- π² Twilio Integration
- βοΈ Installation
- π Environment Configuration
- ποΈ Database Setup
- π Usage
- π API Overview
- π£οΈ Roadmap
- π€ Contributing
- π License
| Feature | Description | Status |
|---|---|---|
| π€ AI Scope Generator | Gemini automatically breaks project descriptions into milestones, timelines, and budget estimates | β Active |
| π¬ Real-Time Chat | Instant client-freelancer messaging powered by Socket.io | β Active |
| π Triple Constraint Tracker | Live visual monitoring of Scope, Time, and Cost against project targets | β Active |
| π JWT Authentication | Secure role-based login for clients and freelancers | β Active |
| π AI Project Summarizer | Gemini-generated summaries of long project discussions and timelines | β Active |
| π Bidding System | Freelancers submit competitive proposals with cost estimates and portfolios | β Active |
| π² Twilio Notifications | SMS and voice call alerts for bid updates, milestone completions, and deadlines | β Active |
| π± Responsive UI | Fully optimized dashboard for desktop and mobile browsers | β Active |
Final_Project_Triangle/
β
βββ backend/ # Node.js + Express β REST API & AI logic
β βββ controllers/ # Route handlers (projects, bids, chat, AI)
β βββ models/ # MySQL schema models
β βββ middleware/ # JWT authentication & request validation
β βββ routes/ # API route definitions
β βββ config/ # DB connection & environment setup
β βββ server.js # Express + Socket.io server entry point
β
βββ client/ # React (Vite) β primary frontend app
β βββ src/
β βββ components/ # Reusable UI (Chat, Dashboard, Navbar, Bid cards)
β βββ pages/ # Home, Project View, Freelancer Profile, Login
β βββ context/ # Auth context & global state management
β βββ main.jsx # App entry point
β
βββ project-triangle-frontend/ # Alternate / staging frontend build
β
βββ node_modules/ # Root-level Node dependencies
β
βββ Dump20251007 (2).sql # MySQL database dump β import to seed DB
βββ package.json # Root dependencies (Tailwind, Twilio)
βββ .gitignore
βββ README.md
Frontend
- React.js with Vite β fast, modern UI build tool
- Tailwind CSS v4 β utility-first styling
- Socket.io Client β real-time bidirectional communication
Backend
- Node.js + Express.js β RESTful API server
- Socket.io β real-time event-driven messaging
- JWT β stateless authentication and authorization
- Twilio β SMS and voice call notifications
Database
- MySQL β relational database for users, projects, bids, and messages
- SQL dump file included:
Dump20251007 (2).sql
AI
- Google Gemini API β AI scoping, summarization, and project review
Gemini is the intelligence engine behind Project Triangle's most powerful features. It is called entirely from the backend (Express API routes) β keeping the API key secure and off the client.
AI Scope Generator β A client describes their project in plain language. Gemini analyzes it and generates a structured breakdown: deliverables, recommended milestones, estimated timeline, and a realistic budget range.
AI Project Summarizer β On long-running projects, Gemini reads through the chat history and milestone logs and generates a concise plain-language progress summary for both parties.
Scope Compliance Review β When a freelancer marks a milestone as complete, Gemini compares the deliverables against the original project scope and flags any discrepancies.
Client submits project description
β
βΌ
Express API route receives request
β
βΌ
Prompt built with project context
β
βΌ
Gemini API called (server-side only)
β
βΌ
Structured JSON response parsed
β
βΌ
Milestones, timeline & budget saved to MySQL
β
βΌ
Dashboard updated with AI-generated plan
- Visit https://ai.google.dev/ and sign in with your Google account
- Click "Get API Key" β "Create API Key in new project"
- Copy the key and add it to your
backend/.envfile asGEMINI_API_KEY
β οΈ Always call Gemini from your Express backend routes β never expose the API key in React/frontend code.
Project Triangle uses Socket.io for instant, bidirectional communication between clients and freelancers without page refreshes.
Real-time events include:
- Live chat messages between client and freelancer
- Instant bid notifications when a new proposal arrives
- Milestone status updates reflected immediately on both sides
- Dashboard constraint meters (Scope/Time/Cost) updating in real time
The Socket.io server runs alongside Express on the same port using http.createServer().
Twilio handles all out-of-app communications so users never miss critical project updates.
| Notification | Trigger | Channel |
|---|---|---|
| New bid received | Freelancer submits a proposal | SMS |
| Bid accepted / rejected | Client responds to proposal | SMS |
| Milestone completed | Freelancer marks deliverable done | SMS |
| Deadline approaching | 24 hours before a milestone due date | SMS + Voice Call |
| Payment released | Client approves milestone | SMS |
- Create a free account at https://www.twilio.com/
- Get your Account SID, Auth Token, and a Twilio Phone Number from the console
- Add these to your
backend/.env(see Environment Configuration)
- Node.js 18 or higher
- MySQL 8.0 or higher
- A Google Gemini API key (free tier)
- A Twilio account (free trial)
git clone https://github.com/Lucky-939/Final_Project_Triangle.git
cd Final_Project_Trianglecd backend
npm installcd ../client
npm installCreate .env files for both backend and frontend (see Environment Configuration below).
mysql -u your_mysql_user -p your_database_name < "Dump20251007 (2).sql"In one terminal (backend):
cd backend
npm run devIn another terminal (frontend):
cd client
npm run dev- Backend API:
http://localhost:5000 - Frontend Dashboard:
http://localhost:5173
# ββ Server βββββββββββββββββββββββββββββββββββββββββββ
PORT=5000
NODE_ENV=development
# ββ MySQL Database ββββββββββββββββββββββββββββββββββββ
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_mysql_username
DB_PASSWORD=your_mysql_password
DB_NAME=project_triangle
# ββ Authentication ββββββββββββββββββββββββββββββββββββ
JWT_SECRET=your_super_secret_jwt_key_here
JWT_EXPIRES_IN=7d
# ββ Google Gemini AI ββββββββββββββββββββββββββββββββββ
GEMINI_API_KEY=your_google_gemini_api_key_here
# ββ Twilio (SMS & Voice) ββββββββββββββββββββββββββββββ
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1XXXXXXXXXX# ββ Backend API URL βββββββββββββββββββββββββββββββββββ
VITE_API_URL=http://localhost:5000/api
# ββ Socket.io Server ββββββββββββββββββββββββββββββββββ
VITE_SOCKET_URL=http://localhost:5000
β οΈ Add both.envfiles to.gitignore. Never commit credentials to GitHub.
π‘ Generate a strong JWT secret with:
node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
A complete MySQL dump is included in the repository (Dump20251007 (2).sql). Import it to get the full schema with sample data:
# Create the database first
mysql -u root -p -e "CREATE DATABASE project_triangle;"
# Import the dump
mysql -u root -p project_triangle < "Dump20251007 (2).sql"Core tables include: users, projects, bids, milestones, messages, notifications
Once both servers are running:
- Register as a Client or Freelancer on the sign-up page
- Clients β Post a new project; Gemini AI will auto-generate a scope breakdown, milestones, and budget estimate
- Freelancers β Browse open projects and submit competitive proposals with custom bids
- Clients β Review proposals and accept the best fit; the freelancer gets an SMS notification via Twilio
- Both parties β Use the real-time chat to collaborate; the Triple Constraint dashboard tracks Scope, Time, and Cost live
- Freelancers β Mark milestones complete; Gemini reviews the deliverables against the original scope
- Clients β Approve completed milestones; payment release triggers an SMS confirmation
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/register |
Register a new user | No |
POST |
/api/auth/login |
Login and get JWT token | No |
GET |
/api/projects |
List all open projects | Yes |
POST |
/api/projects |
Create a new project | Yes (Client) |
GET |
/api/projects/:id |
Get project details | Yes |
POST |
/api/projects/:id/bids |
Submit a bid on a project | Yes (Freelancer) |
PUT |
/api/bids/:id/accept |
Accept a freelancer's bid | Yes (Client) |
POST |
/api/ai/scope |
Generate AI project scope | Yes |
POST |
/api/ai/summary |
Generate AI project summary | Yes |
GET |
/api/chat/:projectId |
Get chat history | Yes |
POST |
/api/milestones/:id/complete |
Mark milestone complete | Yes (Freelancer) |
Planned features for upcoming releases:
- Stripe integration β automated milestone-based payment releases
- GitHub sync β pull repository commits directly into project milestones
- AI-powered freelancer ranking β Gemini scores proposals based on relevance and past ratings
- Voice commands β use Gemini for voice-activated project updates
- Email notifications alongside Twilio SMS
- Admin panel β platform-wide user and project management
- Deployed production version (Render + PlanetScale)
Contributions are welcome! Here's how to get involved:
# 1. Fork the repository on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR-USERNAME/Final_Project_Triangle.git
# 3. Create a feature branch
git checkout -b feature/your-feature-name
# 4. Make your changes and commit
git add .
git commit -m "feat: describe your change here"
# 5. Push and open a Pull Request
git push origin feature/your-feature-name- Keep backend and frontend concerns separated in their respective folders
- Comment Gemini prompt logic clearly β it helps collaborators tune AI output
- Test API routes with Postman or Thunder Client before submitting a PR
- For major changes, open an issue first to discuss the approach
Open an issue with:
- A clear description and steps to reproduce
- Expected vs. actual behaviour
- Relevant error logs or screenshots
This project is licensed under the MIT License β see the LICENSE file for details.
Made with β€οΈ by Lucky-939 β Reimagining freelance project management with AI.