A full-stack inventory management system for luxury watch dealers, featuring AI-powered CSV import, trade tracking, profit analytics, and real-time business insights.
Live Demo: watch-inventory-two.vercel.app
Upload any CSV format and Claude automatically maps columns to the correct fields—no manual configuration required.
- Smart column detection: "Price Paid" →
purchasePrice, "S/N" →serial, "Sold For" →salePrice - Status normalization: Handles 15+ variations ("For Sale", "Listed", "Available" →
in_stock) - Flexible date parsing: ISO, US (MM/DD/YYYY), European (DD-MM-YYYY), natural language
- Currency formatting: Strips symbols and commas ($12,500.00 → 12500)
- Custom fields: Columns that don't fit the schema are preserved as JSON
- Two import modes: Create new inventory OR update existing watches with sale data
Record watch-for-watch trades with a guided wizard that handles the bookkeeping automatically.
- 4-step trade flow: Select outgoing watch → Set trade value → Enter incoming watch details → Confirm
- Cash difference support: Even trades, trades where you receive cash, or trades where you pay cash
- Automatic cost basis: Calculates correct cost basis for the incoming watch
- Linked records: Trade relationships are tracked—see what you traded for what
- Profit attribution: Trade value counts as sale price for P&L calculations
- Track watches with detailed specs (brand, model, reference, serial, year, condition, accessories)
- Record full purchase details (source, price, shipping, service costs)
- Track sales with complete cost breakdown (platform fees, marketing, shipping, tax)
- Automatic profit/loss calculation per watch
- Auto-sold status: Adding a sale price automatically marks the watch as sold
- Duplicate watch: One-click duplication for when you buy the same model again
- Filter and search by brand, model, reference, status, source, or platform
- Sortable columns with pagination
Export your inventory data for backup, analysis, or use in other tools.
- All watch details and financials included
- Calculated fields: total cost, total fees, profit, ROI %
- Filter by status (all, in stock, sold)
- Properly escaped CSV format
- Real-time dashboard: inventory count, total sales, profit, average margin
- Detailed P&L breakdown per transaction
- ROI and margin calculations
- Support for cents-level precision
- Profit breakdown by brand, source, and sale platform
- Monthly performance trends
- Top and bottom performers
- Inventory aging analysis (days in stock)
- Average days to sell metrics
A unified AI interface for all your business intelligence needs:
- Quick Actions: One-click buttons for common tasks
- Analyze Inventory
- Help Price a Watch
- Find Slow Movers
- Performance Review
- Business Chat: Natural language queries ("What's my best brand?", "How did Q3 compare to Q2?")
- Context-aware: AI has access to your full inventory and sales history
- Dark mode with system preference detection
- Keyboard shortcuts (press
?to view all) - Toast notifications for all actions
- Form autocomplete from your historical data
- Contextual empty states
- Mobile-responsive design
| Category | Technology |
|---|---|
| Framework | Next.js 15 (App Router, Turbopack) |
| Language | TypeScript |
| Database | PostgreSQL (Neon) |
| ORM | Prisma |
| Auth | NextAuth.js v5 (Google OAuth) |
| AI | Anthropic Claude API |
| Styling | Tailwind CSS 4 |
| Testing | Jest, Testing Library |
| CI/CD | GitHub Actions, Vercel |
The project includes 120+ tests covering imports and calculations.
Tests run automatically on every push—failed tests block deployment.
- Node.js 18+
- PostgreSQL database
- Google OAuth credentials
- Anthropic API key
# Clone the repo
git clone https://github.com/dangitbobbeh/watch-inventory.git
cd watch-inventory
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your credentials
# Set up database
npx prisma migrate dev
# Start dev server
npm run devDATABASE_URL="postgresql://user:password@localhost:5432/watch_inventory"
ANTHROPIC_API_KEY="sk-ant-..."
AUTH_SECRET="generate-with-openssl-rand-base64-32"
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"Generate AUTH_SECRET:
openssl rand -base64 32- Go to Google Cloud Console
- Create/select a project → APIs & Services → Credentials
- Create Credentials → OAuth client ID → Web application
- Add redirect URIs:
http://localhost:3000/api/auth/callback/google(dev)https://your-domain.vercel.app/api/auth/callback/google(prod)
- Push to GitHub
- Import project in Vercel
- Add Postgres via Vercel Storage (Neon)
- Set environment variables
- Deploy
Migrations run automatically via the build command.
The AI import handles any column naming, but here's what it looks for:
Brand, Model, Reference/Ref #, Serial/S/N, Year, Material, Dial Color, Diameter, Condition, Accessories
Purchase Date, Source/Dealer/Bought From, Cost/Price Paid, Shipping, Service/Repair Costs
Sale Date, Sale Price/Sold For, Platform, Fees/Commission, Tax, Shipping Out, Marketing
"For Sale", "Available", "Listed" → in_stock
"Sold", "Completed", "Closed" → sold
"Traded", "Trade" → traded
"Consigned", "Memo" → consigned
Unrecognized columns are stored as custom data and displayed on the watch detail page.
Contributions welcome! Please open an issue first to discuss what you'd like to change.
MIT License - see LICENSE for details.
Built by David Bernstein