No description
Find a file
SJCoetz fd1571e294 Add PocketBase collections, APIs & migration docs
Introduce PocketBase workflow support, migration tooling, server APIs and documentation. Adds a set of PocketBase collection JSONs (order_items, order_items_v2, collection_pool, delivery_notes, delivery_note_items, repairs) and a large import manifest for workflow collections; includes docs describing MCP/API layer, migration audit, order-item schema and rollout plans. Adds server-side agent/MCP endpoints and services (api/mcp, api/v1/orders, collection-pool, order-items status, health) plus helper modules (pocketbase-admin, orders-service, order-item-status, agent-auth) and a migration script to create order_items_v2/collection_pool. UI: new pages for collection-pool, delivery-notes, repairs and several updates to orders/quotes pages, sidebar, tooltip and pb helpers/types. Also updates package.json (migration script and related changes) and global styles. Required env vars and suggested migration command are documented (e.g. NEXT_PUBLIC_POCKETBASE_URL, PB_ADMIN_EMAIL, PB_ADMIN_PASSWORD, ORDER_ITEMS_COLLECTION; run npm run pb:migrate:orders-v2).
2026-05-25 18:39:33 +02:00
.vscode feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
docs Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
public feat: add service worker, offline page, and manifest for PWA support 2026-05-24 17:02:07 +02:00
scripts Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
src Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
.gitignore feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
AGENTS.md feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
CLAUDE.md feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
components.json feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
Dockerfile feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
eslint.config.mjs feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
next.config.ts feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
package-lock.json Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
package.json Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
postcss.config.mjs feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
README.md feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00
tsconfig.json feat: add UI components for separator, sheet, sonner, switch, table, tabs, textarea, tooltip 2026-05-24 16:31:01 +02:00

WFDASH - Business CRM

A modern business CRM built with Next.js 16, shadcn/ui, Tailwind CSS 4, and PocketBase.

Tech Stack

  • Frontend: Next.js 16 (App Router), React 19, TypeScript
  • UI: shadcn/ui, Tailwind CSS 4, Lucide Icons
  • Backend: PocketBase (database, auth, file storage, realtime)
  • Notifications: Sonner

Getting Started

Prerequisites

  • Node.js 18+
  • PocketBase server running at http://127.0.0.1:8090

Installation

npm install

PocketBase Setup

  1. Start PocketBase:
./pocketbase serve
  1. Create an admin account in the PocketBase admin UI

  2. Set environment variables:

export PB_ADMIN_EMAIL=admin@example.com
export PB_ADMIN_PASSWORD=your_password
  1. Run the setup script to create collections:
npm run setup

Environment Variables

Create .env.local:

NEXT_PUBLIC_POCKETBASE_URL=http://127.0.0.1:8090

Development

npm run dev

Features

  • Customers: Full CRUD with search, pagination, CSV export
  • Companies: Full CRUD with detail pages
  • Suppliers: Full CRUD with tag support
  • Quotes: Line items with auto-calculations, status workflow
  • Orders: PO generation, supplier grouping
  • Dashboard: Real-time stats, recent activity
  • Auth: Login, register, password reset
  • Dark/Light Mode: Theme switching
  • Mobile Responsive: Collapsible sidebar, card views on mobile

Collections

  • customers - Customer database
  • companies - Company database
  • suppliers - Supplier network
  • quotes - Quotes with line items
  • orders - Orders with PO generation

Project Structure

src/
├── app/
│   ├── (auth)/          # Auth pages (login, register)
│   └── (app)/           # Protected app pages
│       ├── dashboard/   # Dashboard
│       ├── customers/   # Customer management
│       ├── companies/   # Company management
│       ├── suppliers/   # Supplier management
│       ├── quotes/      # Quote management
│       └── orders/      # Order management
├── components/
│   ├── ui/              # shadcn/ui components
│   ├── sidebar.tsx      # Navigation sidebar
│   ├── auth-provider.tsx # Auth context
│   ├── theme-provider.tsx # Theme context
│   └── ...              # Form and table components
└── lib/
    ├── pocketbase.ts    # PocketBase client
    ├── pb-helpers.ts    # Helper functions
    ├── types.ts         # TypeScript types
    └── utils.ts         # Utility functions