A production-ready retail POS template with web and desktop interfaces, built with Next.js and Electron. Bring your own database — wire it up in lib/db.ts and ship.
Buying this as a template? Read
TEMPLATE.mdfirst — it covers the rename/rebrand checklist,lib/db.tsimplementation, and the in-memory demo adapter for a quick first-run.
- Dashboard Overview: Visual representation of price trends and summaries
- Price Management: Add and track product prices over time
- Daily & Monthly Reports: Analyze price changes on daily and monthly basis
- Checklist Management: Organize tasks and shopping lists with checklist functionality
- Data Export: Export price data to PDF and other formats
- Cross-Platform: Available as a web application or desktop application (Windows, macOS, Linux)
- Frontend: Next.js, React, TailwindCSS, Radix UI components
- Charts: Chart.js, Recharts for data visualization
- PDF Export: React-PDF, jsPDF for document generation
- Database: Bring-your-own — implement the adapter in
lib/db.ts - Desktop App: Electron
- Form Handling: React Hook Form with Zod validation
- Node.js (v16 or later)
- Bun package manager
- Git
-
Clone the repository:
git clone https://github.com/yourusername/paykit.git cd paykit -
Install dependencies:
bun install
-
Wire up a database: This template ships without a bundled database. Open
lib/db.tsand implement each exported function against your chosen backend (Postgres, MySQL, SQLite, Supabase, Firebase, a REST API, etc.). Until these are implemented, every API route will throw a clear "not implemented" error.To try Paykit before picking a backend, swap in the in-memory demo adapter:
cp lib/db.ts lib/db.backup.ts cp lib/db.example.ts lib/db.ts
Data in the demo adapter is ephemeral — fine for exploration, not production.
-
Set up environment variables: Copy
.env.exampleto.envand fill in any values yourlib/db.tsimplementation needs. -
Run the development server:
bun run dev
-
Open http://localhost:3000 in your browser to see the application.
-
Start the development server:
bun run dev
-
In a new terminal, run the Electron app:
bun run electron
bun run build
bun run startbun run build
bun run electron-buildAfter building, you can find the packaged desktop application in the dist directory.
app/ # Next.js app directory with pages and API routes
api/ # API routes for data operations
checklist/ # Checklist feature pages
components/ # Reusable React components
ui/ # UI component library
electron/ # Electron-specific code for desktop app
hooks/ # Custom React hooks
lib/ # Utility functions and database logic
migrations/ # Database migrations
public/ # Static assets
types/ # TypeScript type definitions
The application provides the following API endpoints:
/api/prices- Manage product prices/api/checklist- Manage checklist items and sheets/api/summary- Get summarized data for dashboards
This project is licensed under the MIT License - see the LICENSE file for details.