Self-hosted order management for social-commerce sellers.
Products, customers, orders, payments, invoices, inventory, reports, and backups — in one calm workspace you own.
Why VendKit · Screens · Features · Quick start · Configuration · Deployment
The dashboard at a glance: revenue, order volume, best sellers, recent sales, and stock alerts for the selected period.
Most social sellers run their business across Facebook, Instagram, WhatsApp, and phone messages. Orders live in chats, stock lives in a notebook, and invoices are rebuilt by hand.
VendKit brings that work into one place:
- Own your data. Run it on your own server, with your own database, files, and backups. No subscription and no vendor lock-in.
- Built for messaging-first selling. Every order records its channel, courier, tracking number, customer notes, and a full activity timeline.
- Operational, not accounting. VendKit handles the daily work of selling: stock, payments, invoices, delivery, and follow-up.
- Simple to run. One web app, one API, PostgreSQL, and Docker Compose. No microservices and no multi-tenant control plane.
VendKit is designed for a single business per installation. It is intentionally focused: no storefront, no customer accounts, no courier APIs, and no payment-gateway integrations.
All screenshots use a fictional demo store, Nova Living, seeded with realistic products, customers, orders, payments, and invoices.
Orders — search, filter by status, payment, channel, or date, and export the current view to CSV. |
Products — a visual catalog with SKUs, pricing, categories, brands, images, and stock status. |
Product editor — pricing, inventory rules, dimensions, images, and a live preview. |
Categories — organize the catalog and control which categories are active. |
Brands — group products by supplier or label. |
Media library — upload once and reuse images across products and business branding. |
Customers — contact details, order history, and duplicate-phone detection. |
Customer detail — saved addresses, notes, and every order in one place. |
Inventory — tracked stock, low-stock thresholds, and an auditable movement history.
Invoices — numbered documents linked to orders, with draft, issued, and cancelled states.
Reports — revenue, order value, status and channel mix, daily sales, top products, and top customers.
The settings area covers business identity, invoice branding and numbering, regional formats, tax, order defaults, payments, shipping, notifications, and backups.
Backup & restore — download a complete archive of business data and media, or restore a previous backup.
Team — separate sign-ins for the people who help run the business. |
Account — update your profile and change your password. |
Sign in — secure access to the workspace. |
First run — the first account becomes the administrator; public sign-up then closes. |
- Orders — create, edit, cancel, search, filter, and export orders. Track outstanding balances, record payments, and process returns back into stock.
- Sales channels — record where each order came from: Facebook, Instagram, WhatsApp, TikTok, website, phone, walk-in, or other.
- Delivery tracking — capture the courier and tracking number, and follow the order through a full activity timeline.
- Payments — record cash, bank transfer, mobile financial service, card, or other payments. Payment status is derived from recorded payments.
- Invoices — one numbered invoice per order, with configurable numbering, business details, terms, and a downloadable PDF. Drafts can be issued later; issued invoices can be cancelled without reusing numbers.
- WhatsApp hand-off — generate a pre-filled order message and open it in WhatsApp. VendKit does not use the WhatsApp Business API.
- Products — SKUs, pricing, compare-at prices, descriptions, dimensions, units, images, categories, and brands.
- Inventory — stock tracking with an immutable movement history, low-stock thresholds, automatic deduction when orders are placed, and stock restoration on cancellation, return, or deletion.
- Media library — upload images once, reuse them across products, and keep usage protection when an image is attached to a product or the business profile.
- Categories and brands — organize the catalog and control what is active.
- Customers — contact details, addresses, notes, full order history, and phone-based duplicate detection when a number is already saved.
- Dashboard — revenue, orders, average order value, new customers, order status, best sellers, recent orders, stock alerts, and a setup checklist driven by real data.
- Reports — revenue, orders, average order value, status and channel breakdowns, daily sales, top products, and top customers for a selected date range.
- CSV exports — download filtered orders, customers, and inventory with spreadsheet-safe escaping.
- Team — administrators can create members and administrators, and reset passwords. The first account becomes the administrator.
- Account — users can update their name and change their password.
- Settings — business profile, invoice, regional, tax, order, payment, shipping, and notification defaults, all stored in the database.
- Backup and restore — create a complete archive of catalog, customers, orders, payments, invoices, inventory history, settings, and media. Restores are transactional and optionally create a safety backup first.
- Health check —
GET /api/healthreports API and database status for containers and monitoring.
| Layer | Stack |
|---|---|
| Monorepo | pnpm workspaces, Turborepo |
| Frontend | Next.js, React, TypeScript, Tailwind CSS, shadcn/ui, React Hook Form, Zod |
| Backend | NestJS, TypeScript, class-validator |
| Database | PostgreSQL, Prisma ORM |
| Authentication | JWT access tokens, refresh cookies, bcrypt password hashing, rate limiting |
| Documents | React PDF for invoice PDFs |
| Deployment | Docker, Docker Compose, GitHub Actions CI |
The browser talks only to the Next.js app. Server-side route handlers proxy requests to NestJS with a shared API key, so the API does not need to be publicly exposed.
- Docker with the Compose plugin
- A server or local machine with a persistent disk
cp .env.example .envEdit .env and set at least:
POSTGRES_PASSWORD=use-a-long-url-safe-password
JWT_SECRET=...
API_KEY=...
APP_URL=http://localhost:3000Generate the two secrets with:
openssl rand -hex 32Use a different value for JWT_SECRET and API_KEY. POSTGRES_PASSWORD should contain only URL-safe characters because it is embedded in the API connection string.
POSTGRES_PASSWORD is applied only when the vendkit-db volume is first created. If you change it later, the API cannot authenticate to the existing database and fails during migrations (see Changing the database password).
docker compose up -d --buildOpen http://localhost:3000 and create the first account. It becomes the administrator.
Database migrations run automatically when the API container starts. Business data is stored in the vendkit-db volume; uploaded images and backups are stored in vendkit-data.
git pull
docker compose up -d --buildApplied migrations are skipped, so the command is safe to repeat.
- Node.js 24+
- pnpm 11+
- PostgreSQL 16+
Create the database and copy the environment templates:
createdb vendkit
pnpm install
cp apps/api/.env.example apps/api/.env
cp packages/database/.env.example packages/database/.env
cp apps/web/.env.example apps/web/.envSet the same DATABASE_URL in apps/api/.env and packages/database/.env, and set the same API_KEY in apps/api/.env and apps/web/.env.
Apply migrations and start both apps:
pnpm db:migrate
pnpm dev- Web app: http://localhost:3000
- API: http://localhost:4000/api
- Health check: http://localhost:4000/api/health
- Open
/sign-upand create the first account. It is created as an administrator. - Open Settings → Business profile and add the details that appear on invoices.
- Open Settings → Invoice to choose numbering, currency display, due period, default status, and terms.
- Add categories, brands, and products before creating orders.
- Use the dashboard setup checklist to confirm the core pieces are in place.
Public registration is closed after the first account. Set ALLOW_PUBLIC_REGISTRATION=true only if you intentionally want self-service sign-up. Administrators can create members and administrators, and reset passwords from Team.
The API validates required environment variables at startup and refuses to boot with a message listing every problem.
| Variable | Required | Purpose |
|---|---|---|
DATABASE_URL |
yes | PostgreSQL connection string. |
JWT_SECRET |
yes | Access-token signing secret, at least 32 characters. |
API_KEY |
yes | Shared key used by the web app to call the API. |
PORT |
no | API port. Default 4000. |
CORS_ORIGINS |
in production | Comma-separated allowed web origins. |
ALLOW_PUBLIC_REGISTRATION |
no | Allow sign-up after the first account. Default false. |
IMAGE_STORAGE_DIR |
no | Image upload directory. Default uploads/images. |
IMAGE_MAX_FILE_SIZE |
no | Maximum image upload size in bytes. Default 5 MB. |
BACKUP_STORAGE_DIR |
no | Backup archive directory. Default uploads/backups. |
BACKUP_MAX_FILE_SIZE |
no | Maximum backup upload size. Default 1 GB. |
BACKUP_MAX_EXTRACTED_SIZE |
no | Maximum uncompressed restore size. Default 2 GB. |
BACKUP_RESTORE_TRANSACTION_TIMEOUT_MS |
no | Restore transaction timeout. Default 10 minutes. |
BACKUP_SAFETY_SNAPSHOT |
no | Create a safety backup before restore. Default true. |
APP_VERSION |
no | Version recorded in backup metadata. |
| Variable | Required | Purpose |
|---|---|---|
NEST_API_URL |
yes | API base URL, including /api. |
API_KEY |
yes | Must match the API's API_KEY. |
Business details, invoice numbering, and terms are not environment variables. They live in Settings and are stored in the database, so they are included in backups.
| Command | Description |
|---|---|
pnpm dev |
Run the web app and API in watch mode. |
pnpm build |
Build all apps and packages. |
pnpm lint |
Lint the workspace. |
pnpm check-types |
Type-check the workspace. |
pnpm test |
Run unit tests. |
pnpm db:generate |
Regenerate the Prisma client. |
pnpm db:migrate |
Create or apply a development migration. |
pnpm db:deploy |
Apply existing migrations in production. |
pnpm db:studio |
Open Prisma Studio. |
CI runs linting, type-checking, API and web tests, the production build, Compose validation, and Docker image builds.
Backups are managed from Settings → Backup & Restore.
An archive contains:
- catalog, categories, brands, images, and product media
- customers, orders, order items, payments, and returns
- invoices and document sequences
- inventory movements and settings
Users, sessions, and backup history are intentionally excluded so they survive a restore.
Restores are transactional: if anything fails, existing data is left untouched. With BACKUP_SAFETY_SNAPSHOT=true, a safety backup is created before the restore begins.
Keep BACKUP_STORAGE_DIR on durable storage, and copy archives off the server as part of your host backup routine. A backup on the same disk as the database is not a disaster-recovery plan.
- Use HTTPS. Session cookies are marked
Securein production, so plain HTTP will not sign users in. Put the web app behind a reverse proxy such as Caddy, nginx, or Traefik. - Set
APP_URLto the public web URL. Compose passes it to the API asCORS_ORIGINS. - Do not expose the API port publicly. The browser should talk only to the web app, which proxies API calls server-to-server with
API_KEY. - Run one API instance. Authentication rate limiting is in-memory and applies per process.
- Persist both volumes.
vendkit-dbholds PostgreSQL data;vendkit-dataholds uploaded images and backup archives. - Back up off the server. Download backups regularly or copy the backup volume to durable off-host storage.
After the stack starts:
- Confirm both containers are healthy with
docker compose ps. - Confirm the API health check with
docker compose exec api wget -qO- http://localhost:4000/api/health. - Create the first account and complete the dashboard setup checklist.
- Create a product, customer, and order, then download an invoice PDF.
- Download a backup, restore it, and confirm the order and invoice still load.
PostgreSQL reads POSTGRES_PASSWORD only when it initializes an empty vendkit-db volume. Regenerating the value in .env for an existing installation leaves the database with the old password, so the API exits during prisma migrate deploy with P1000: Authentication failed and the container is reported as unhealthy. Check the actual error with docker compose logs api.
Choose one of these fixes:
-
Restore the original
POSTGRES_PASSWORDin.env. -
Keep the data and update the password inside PostgreSQL, then restart the API:
docker compose exec db psql -U postgres -d vendkit -c "ALTER USER postgres WITH PASSWORD 'new-password';" docker compose up -d
-
For a fresh install with nothing to keep, recreate the volumes. This permanently deletes the database, uploaded images, and backups:
docker compose down -v docker compose up -d --build
apps/web Next.js frontend and server-side API proxy
apps/api NestJS API, business logic, invoices, and backups
packages/database Prisma schema, migrations, and generated client
packages/ui Shared UI primitives
docs Operational documentation and screenshots
VendKit is intentionally a focused, single-business application. It does not include:
- multi-tenancy or a hosted SaaS control plane
- customer-facing accounts or storefronts
- official WhatsApp, Facebook, or Instagram API integrations
- courier or payment-gateway integrations
- AI order parsing or offline-first sync
Notifications are configuration-only in this release: preferences are saved, but email delivery is not connected. Use the WhatsApp hand-off on an order to contact the customer directly.
See CONTRIBUTING.md for local setup, checks, and coding conventions.
Report security issues privately as described in SECURITY.md. Please do not open a public issue for a vulnerability.
VendKit is licensed under the GNU Affero General Public License v3.0.
If you run a modified version as a network service, the AGPL requires you to offer its source code to the people using it.



























