Skip to content

fayerman-source/reverse-auction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Reverse Auction (Dutch Auction) for Startup Equity & M&A

React TypeScript Security Hardened Supabase License: MIT

Reverse Auction

A professional, real-time Dutch auction platform built for high-stakes transactions.

Built for startup M&A, equity dispute resolution, and cap table clean-up. No spreadsheets, no back-and-forth emails β€” just one transparent session with a documented outcome.

πŸš€ Key Use Cases

  • Co-founder Buyouts: Resolve equity disputes with a transparent price-discovery mechanism.
  • Cap Table Clean-up: Efficiently handle secondary share sales among investors.
  • Startup M&A: Streamline asset sales or pro-rata allocations in oversubscribed rounds.
  • B2B Procurement: Enable supplier bid-down on contracts with real-time feedback.

Status

βœ… Go for live usage (latest QA pass found no launch blockers).

See:

  • SECURITY_HARDENING_AUDIT.md (Security-first architecture)
  • LAUNCH_RUNBOOK.md (Operational readiness)

Overview

This app runs a descending-price (Dutch) auction where participants accept the current price to win. It is designed to be "operator-friendly" with both technical and non-technical configuration paths.

Current Remote Architecture

Remote mode is powered by Supabase Realtime.

  • Room metadata: rooms
  • Participant claims: room_participants
  • Room state: auction_rooms (includes last event, status, and full state snapshot)
  • Event log: auction_events
  • Room snapshots: full state (price, history, config, participants) persisted for late-joiner sync and authoritative state recovery

Features

  • Descending-price auction flow
  • Configurable start price, floor price, decrement amount, and tick interval (seconds or minutes with quick presets: 10s, 30s, 1m, 5m)
  • Host-only remote controls (start/reset)
  • Participant claim locks (no duplicate slot claims)
  • Start gating until all required participants are claimed
  • Winner capture at click-time price with bid price-lock protection
  • Real-time participant presence (join/leave toasts) and connection status indicators
  • Participant readiness visibility (READY/PASSED states)
  • Floor-reached / no-deal terminal state with clear UI
  • Authoritative room state snapshots (ensures late joiners sync correctly)
  • Auction history view
  • Sound cues (start, drop, bid, end)
  • Setup modal for runtime reconfiguration
  • Configurable participant initials (comma-separated)
  • In-app toasts for user-facing errors

Configuration

You can configure auction behavior in two ways.

1) Frontend setup panel (GUI)

Use the Setup button in the header to adjust:

  • start price
  • floor price
  • decrement amount
  • drop interval (seconds or minutes, with presets: 10s, 30s, 1m, 5m)
  • number of participants
  • participant initials (comma-separated)

Validation enforces:

  • floor price must be less than start price
  • decrement amount must not exceed price range (start - floor)
  • participant initials count must match participant count
  • all numeric values must be positive

2) public/setup.js

Set startup defaults before the app loads:

window.AUCTION_SETUP = {
  // Supabase public config (safe client-side)
  supabaseUrl: 'https://<project-ref>.supabase.co',
  supabaseAnonKey: 'sb_publishable_...',

  startPrice: 20000,
  floorPrice: 1000,
  decrementAmount: 1000,
  dropIntervalMs: 10000,
  participantCount: 3,
  participants: [
    { id: '1', name: 'EF', color: 'bg-rose-500' },
    { id: '2', name: 'EG', color: 'bg-indigo-500' },
    { id: '3', name: 'AG', color: 'bg-emerald-500' },
  ],
};

If participantCount is greater than participants.length, extra participants are generated automatically.

Tech Stack

  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS (CDN)
  • Supabase (Postgres + Realtime + Anonymous Auth)

Project Structure

.
β”œβ”€β”€ App.tsx
β”œβ”€β”€ constants.ts
β”œβ”€β”€ types.ts
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ Ticker.tsx
β”‚   └── FounderButton.tsx
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ soundService.ts
β”‚   └── syncService.ts
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ setup.js
β”‚   β”œβ”€β”€ favicon.ico
β”‚   └── favicon.png
β”œβ”€β”€ supabase_phase0.sql
β”œβ”€β”€ SECURITY_HARDENING_AUDIT.md
β”œβ”€β”€ LAUNCH_RUNBOOK.md
└── .github/workflows/
    └── deploy-pages.yml

Local Development

Prerequisites

  • Node.js 18+ (Node 20 recommended)
  • npm

Optional .env.local

VITE_SUPABASE_URL=...
VITE_SUPABASE_ANON_KEY=...

syncService supports both:

  1. VITE_SUPABASE_* env vars
  2. window.AUCTION_SETUP.supabaseUrl + supabaseAnonKey

Run

npm install
npm run dev

Build

npm run build
npm run preview

Database Setup (Supabase)

  1. Enable Anonymous Auth.
  2. Run supabase_phase0.sql in Supabase SQL Editor.
  3. Verify tables are in publication supabase_realtime.

GitHub Pages Deployment

Workflow:

  • .github/workflows/deploy-pages.yml

Setup:

  1. Settings β†’ Pages β†’ Source = GitHub Actions
  2. Settings β†’ Secrets and variables β†’ Actions
    • VITE_SUPABASE_URL
    • VITE_SUPABASE_ANON_KEY
  3. Push to main

Site URL:

  • https://<username>.github.io/<repo-name>/

Legal Disclaimer

This project and its documentation are for technical and informational purposes only and do not constitute legal advice. Legal enforceability and compliance obligations vary by jurisdiction and use case. Consult qualified legal counsel before relying on this software for legally binding transactions.

Contributing

Pull requests and issues are welcome.

License

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

About

Real-time Dutch Auction for Startup Equity & M&A. A specialized platform for co-founder buyouts, cap table clean-up, and high-value procurement built with React 19, TypeScript, and Supabase.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors