Skip to content

A modern, full-stack freelance marketplace platform specifically designed for connecting AI experts and developers with clients who need AI/ML services.

Notifications You must be signed in to change notification settings

Devansh-365/tsunagu

Repository files navigation

πŸ€– Tsunagu

-Connecting AI Talent with Opportunity

A modern, full-stack freelance marketplace platform specifically designed for connecting AI experts and developers with clients who need AI/ML services.

Next.js TypeScript Supabase Stripe License

Features β€’ Tech Stack β€’ Getting Started β€’ Documentation β€’ Contributing


πŸ“– Overview

Tsunagu (繋ぐ - "to connect") is a purpose-built platform for the AI/ML freelance marketplace, featuring:

  • 🎯 Two User Types: Clients (post AI/ML projects) and Freelancers (submit proposals)
  • πŸ’° Secure Payments: Milestone-based escrow system with Stripe Connect (50% upfront, 50% on completion)
  • πŸ” Smart Search: Full-text search with PostgreSQL for projects and freelancers
  • πŸ’¬ Real-time Messaging: Built-in messaging system for seamless communication
  • πŸ”” Notifications: Comprehensive in-app notification system
  • πŸ“Š Project Management: Complete workflow from posting to delivery

Platform Highlights

  • Payment Model: Fixed-price projects with milestone-based escrow
  • Platform Fee: 15% (configurable)
  • Core Flow: Project Posting β†’ Proposal Submission β†’ Hiring β†’ Escrow Payment β†’ Work Delivery β†’ Payout

✨ Features

πŸ” Authentication & Authorization

  • Email/password authentication via Supabase Auth
  • Role-based access control (Client, Freelancer, Admin)
  • Email verification and password reset flows
  • Server-side session management with protected routes

πŸš€ User Onboarding

  • Client Onboarding: Profile setup, company information, project goals, budget & timeline preferences
  • Freelancer Onboarding: Professional profile, skills, portfolio, work experience, hourly rate
  • Step-by-step guided process with progress tracking

πŸ“Š Project Management

  • Multi-step project posting form with category-based organization
  • Project statuses: Draft, Open, In Progress, Completed, Cancelled
  • Project listing and detailed views
  • Publish/unpublish and close project functionality
  • Freelancer hiring workflow

πŸ’Ό Proposal System

  • Freelancers submit proposals with cover letter, budget, and timeline
  • Proposal statuses: Submitted, Under Review, Shortlisted, Accepted, Rejected, Withdrawn
  • View tracking for client engagement
  • Auto-create conversation on proposal acceptance
  • Proposal statistics and analytics

πŸ” Browse & Search

  • Advanced Filtering:
    • Projects: Category, skills, budget range, full-text search
    • Freelancers: Skills, hourly rate, experience, location, full-text search
  • PostgreSQL Full-Text Search with GIN indexes
  • Typo tolerance and weighted ranking
  • Featured projects and top freelancers

πŸ’¬ Messaging System

  • One-on-one conversations between clients and freelancers
  • Unread message tracking
  • Real-time messaging infrastructure ready
  • Conversation search by participant name

πŸ”” Notification System

  • 7 notification categories with 35+ notification types
  • In-app notifications with customizable preferences
  • Unread count badges
  • Mark as read/archive functionality
  • Click-to-navigate with contextual action URLs

πŸ’³ Payment & Escrow (Stripe Connect)

  • Stripe Connect Integration: Standard accounts for freelancers
  • Escrow System:
    • 50% upfront payment held in platform account
    • 50% completion payment after deliverable approval
  • Platform Fee: 15% automatic deduction
  • Payment Intents for secure transactions
  • Automated transfers to freelancer accounts
  • Webhook handlers for payment events
  • Transaction history and ledger

πŸ‘€ User Profiles

  • Client profiles with company details and project preferences
  • Freelancer profiles with portfolio, work experience, and skills
  • Profile visibility and discovery settings

πŸ“¦ Deliverable Management

  • Freelancers submit project deliverables
  • Client review and approval workflow
  • Revision request system

πŸ› οΈ Tech Stack

Frontend

Backend & Database

  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth with Row Level Security (RLS)
  • Real-time: Supabase Realtime (infrastructure ready)
  • API: tRPC + Next.js API Routes

Payments & Infrastructure

  • Payments: Stripe Connect for escrow and payouts
  • Code Quality: Biome for linting and formatting
  • Package Manager: pnpm

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/tsunagu.git
    cd tsunagu
  2. Install dependencies

    pnpm install
  3. Set up environment variables

    cp .env.example .env

    Fill in your environment variables:

    # Supabase
    NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
    NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
    SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
    
    # Stripe
    STRIPE_SECRET_KEY=sk_test_...
    NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
    STRIPE_WEBHOOK_SECRET=whsec_...
    STRIPE_PLATFORM_FEE_PERCENTAGE=15
    
    # App
    NEXT_PUBLIC_URL=http://localhost:3000
    NEXT_PUBLIC_API_URL=http://localhost:3000/api
  4. Set up the database

    Run the migrations in the supabase/migrations/ folder in order (001-027) in your Supabase SQL Editor, or use the Supabase CLI:

    npx supabase db push
  5. Run the development server

    pnpm dev
  6. Open your browser

    Navigate to http://localhost:3000


πŸ“ Project Structure

tsunagu/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                      # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ [locale]/            # Internationalized routes
β”‚   β”‚   β”‚   β”œβ”€β”€ (auth)/          # Authentication pages
β”‚   β”‚   β”‚   β”œβ”€β”€ (public)/        # Public pages (homepage, browse)
β”‚   β”‚   β”‚   └── (protected)/     # Protected pages (dashboard, projects)
β”‚   β”‚   └── api/                 # API routes (Stripe, payments, webhooks)
β”‚   β”‚
β”‚   β”œβ”€β”€ features/                # Feature-based modules
β”‚   β”‚   β”œβ”€β”€ auth/               # Authentication
β”‚   β”‚   β”œβ”€β”€ onboarding/         # User onboarding
β”‚   β”‚   β”œβ”€β”€ projects/           # Project management
β”‚   β”‚   β”œβ”€β”€ proposals/          # Proposal system
β”‚   β”‚   β”œβ”€β”€ browse/             # Browse & search
β”‚   β”‚   β”œβ”€β”€ messaging/          # Messaging system
β”‚   β”‚   β”œβ”€β”€ notifications/      # Notification system
β”‚   β”‚   β”œβ”€β”€ payment/            # Payment UI
β”‚   β”‚   └── profiles/           # User profiles
β”‚   β”‚
β”‚   β”œβ”€β”€ components/             # Shared UI components
β”‚   β”‚   β”œβ”€β”€ ui/                 # shadcn/ui components
β”‚   β”‚   β”œβ”€β”€ layouts/            # Layout components
β”‚   β”‚   └── search/             # Search components
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/                    # Utility libraries
β”‚   β”‚   β”œβ”€β”€ supabase/          # Supabase clients (server, client, admin)
β”‚   β”‚   └── stripe/            # Stripe configuration
β”‚   β”‚
β”‚   └── server/                # Server-side code (tRPC)
β”‚
β”œβ”€β”€ supabase/
β”‚   └── migrations/            # Database migrations (001-027)
β”‚
β”œβ”€β”€ public/                    # Static assets
└── email-templates/          # Email templates

πŸ“š Documentation

Core Documentation

Database Schema

The platform uses 15 core tables:

User Management: users, client_profiles, freelancer_profiles Projects: projects, proposals, project_deliverables Messaging: conversations, conversation_participants, messages Notifications: notifications, notification_preferences Payments: stripe_accounts, payment_intents, transfers, payment_transactions

See CODEBASE_DOCUMENTATION.md for detailed schema documentation.


πŸ§ͺ Development

Available Scripts

pnpm dev          # Start development server (with Turbopack)
pnpm build        # Build for production
pnpm start        # Start production server
pnpm check        # Run Biome linter
pnpm check:write  # Auto-fix linting issues
pnpm typecheck    # TypeScript type checking

Code Quality

This project uses Biome for fast, unified linting and formatting.

# Check code quality
pnpm check

# Auto-fix issues
pnpm check:write

# Unsafe auto-fix (use with caution)
pnpm check:unsafe

πŸ—ΊοΈ Roadmap

βœ… Completed Features

  • Authentication & authorization system
  • User onboarding flows (client & freelancer)
  • Project posting and management
  • Proposal submission and review
  • Browse and advanced search
  • Messaging system
  • Notification system
  • Stripe Connect integration (backend complete)

🚧 In Progress

  • Stripe payment UI (frontend)
  • Real-time message updates
  • File attachments (projects, messages, deliverables)

πŸ“‹ Planned

  • Email notifications (Resend/SendGrid)
  • Reviews & ratings system
  • Admin dashboard
  • Advanced analytics
  • Mobile responsiveness improvements
  • Enhanced search with AI-powered matching

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Contribution Guidelines

  • Follow the existing code style (enforced by Biome)
  • Write descriptive commit messages
  • Update documentation for new features
  • Add tests where applicable
  • Ensure pnpm check and pnpm typecheck pass

πŸ› Bug Reports & Feature Requests

If you encounter any bugs or have feature suggestions, please open an issue with:

  • Clear description of the issue/feature
  • Steps to reproduce (for bugs)
  • Expected vs actual behavior
  • Screenshots (if applicable)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

Built with these amazing open-source technologies:


πŸ“ž Support


⭐ Star this repository if you find it helpful!

Made with ❀️ by the Tsunagu community

About

A modern, full-stack freelance marketplace platform specifically designed for connecting AI experts and developers with clients who need AI/ML services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published