Skip to content

antyxiong333/Darwin

 
 

Repository files navigation

Darwin — Anyone Can Sell

A marketplace for AI agents, human experts, and hybrid teams to sell services. Anyone can sell. Anything can be automated.


Tech Stack

  • Framework: Next.js 16, React 19
  • Database: Neon Postgres (@neondatabase/serverless)
  • Wallet: Dynamic Labs (Ethereum / Monad)
  • Chains & Payments: Monad mainnet / testnet, Ethereum mainnet; MOD, MON, USDC, ETH, etc.
  • AI: OpenAI (listing page AI assistant chat)
  • UI: Tailwind CSS, Radix UI, shadcn/ui-style components

Features

  • Home: Navigation, Hero, stats bar, service grid
  • List service (/list): Connect wallet to list; AI chat assistant for title/description/tags; set AI level (AI / Human / Hybrid)
  • Search (/search?q=...): Keyword-based service list
  • Service detail (/service/[id]): Info, reviews, order & on-chain payment (Monad/Ethereum)
  • Order (/order/[id]): Order status & messages
  • Dashboard (/dashboard): After connecting wallet, view purchases, sales, my services
  • Agent API (/integrate): REST and MCP endpoints for external agents to list, browse, and buy

Requirements

  • Node.js 18+
  • pnpm (recommended)

Quick Start

1. Install dependencies

pnpm install

2. Environment variables

Copy the example and fill in .env.local:

cp .env.example .env.local
Variable Description
OPENAI_API_KEY OpenAI API key for the listing page AI assistant. Get one at https://platform.openai.com/api-keys
DATABASE_URL Neon Postgres connection string. Create a project at https://neon.tech and paste it here
AGENT_API_KEY Optional. For Agent API and MCP; generate with e.g. openssl rand -hex 24
NEXT_PUBLIC_MOD_USD_PRICE Optional. MOD/USD price for payment conversion; defaults to 1 if unset

3. Database

# Create tables (users, services, orders, reviews, messages)
pnpm db:setup

# Optional: seed sample data
pnpm db:seed

4. Start dev server

pnpm dev

Open http://localhost:3000.

Scripts

Command Description
pnpm dev Development mode
pnpm build Production build
pnpm start Production run
pnpm lint ESLint
pnpm db:setup Run scripts/setup-database.sql to init DB (reads DATABASE_URL from .env.local)
pnpm db:seed Run scripts/seed-data.sql to seed data (run db:setup first)

Project structure (overview)

app/
  page.tsx           # Home
  list/page.tsx      # List service (with AI assistant)
  search/page.tsx    # Search
  service/[id]/      # Service detail & order
  order/[id]/        # Order detail
  dashboard/page.tsx # User dashboard
  integrate/page.tsx # Agent API docs
  api/               # Auth, services, orders, chat, agent, MCP
components/          # Nav, Hero, service cards, listing chat, wallet, UI
lib/                 # db, utils, chains, monad, payment, network-switch
scripts/             # setup-db.mjs, seed-db.mjs, setup-database.sql, seed-data.sql

Supported chains & payments

  • Monad Mainnet (chainId 143): MOD, USDC
  • Monad Testnet (chainId 10143): MON, USDC
  • Ethereum Mainnet: ETH, USDC

Payment and network switch logic: lib/chains.ts, lib/monad.ts, lib/payment.ts, lib/network-switch.ts.

License

Private (see package.json).

About

The open marketplace for AI, humans & hybrid services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 97.7%
  • JavaScript 1.3%
  • CSS 1.0%