okpos

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

okpos

okpos — business management for small and medium businesses (POS, inventory, expenses, and reporting).

Demo data

go run . -e .env seed populates an empty, migrated database with two years of realistic fake demo data across two businesses: a general-goods minimarket and a coffee shop. See internal/seeddata/ for how it's generated.

go run . -e .env reset      # destroys all data (dev only)
go run . -e .env migrateup  # recreate schema
go run . -e .env seed       # populate with demo data (~2-4 minutes at full scale)

Add --scale 0.05 (or similar) for a fast, lower-volume smoke test, and --seed <n> to change the deterministic RNG seed (default 42 — the same seed always produces the same dataset).

A pre-generated full-scale demo database (okpos-demo.db, ~320MB) is not tracked in git — regenerate it locally with the commands above if needed.

Demo accounts

All demo accounts share the password:

Demo12345!
Email Name Role Company
owner@okposdemo.test Budi Santoso Owner Both (owns both companies below)
manager@tokomakmurjaya.test Siti Rahayu Manager Toko Makmur Jaya
cashier@tokomakmurjaya.test Andi Prasetyo Cashier Toko Makmur Jaya
manager@kopiselasar.test Dewi Anggraini Manager Kopi Selasar
cashier@kopiselasar.test Rizky Ramadhan Cashier Kopi Selasar

Toko Makmur Jaya — general goods / minimarket, simple products only, 1 branch, 1 POS station, ~2 years of order history, ~11% net margin.

Kopi Selasar — coffee shop, mix of simple and recipe-based products (with ingredient stock tracking), 2 branches × 2 POS stations each, ~1 year of order history, ~46% net margin.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package accounting implements double-entry bookkeeping for okpos.
Package accounting implements double-entry bookkeeping for okpos.
Package auth provides JWT generation/validation and role definitions for okpos.
Package auth provides JWT generation/validation and role definitions for okpos.
Package cmd contains the Cobra CLI command definitions for okpos.
Package cmd contains the Cobra CLI command definitions for okpos.
components
icon
templui component icon - version: v1.12.1 installed by templui v1.12.1 📚 Documentation: https://templui.io/docs/components/icon
templui component icon - version: v1.12.1 installed by templui v1.12.1 📚 Documentation: https://templui.io/docs/components/icon
Package config holds application configuration loaded from environment variables.
Package config holds application configuration loaded from environment variables.
Package core wires all application dependencies together.
Package core wires all application dependencies together.
Package i18n provides UI string translation for okpos.
Package i18n provides UI string translation for okpos.
internal
seeddata
Package seeddata populates an empty, migrated okpos database with a large, internally-consistent set of fake demo data: two businesses (a retail minimarket and a coffee shop) with realistic historical orders, inventory movement, and expenses.
Package seeddata populates an empty, migrated okpos database with a large, internally-consistent set of fake demo data: two businesses (a retail minimarket and a coffee shop) with realistic historical orders, inventory movement, and expenses.
Package locale detects a request's preferred locale from the browser's Accept-Language header and makes it available via context, for locale-aware formatting (view/ui) and currency suggestions (setup flow).
Package locale detects a request's preferred locale from the browser's Accept-Language header and makes it available via context, for locale-aware formatting (view/ui) and currency suggestions (setup flow).
Package mockrepo contains moq-generated mock implementations of the data.*Repoer interfaces.
Package mockrepo contains moq-generated mock implementations of the data.*Repoer interfaces.
Package plugin provides a goja-based JavaScript plugin registry.
Package plugin provides a goja-based JavaScript plugin registry.
Package service contains the business logic for okpos.
Package service contains the business logic for okpos.
sql
migrations
Package migrations provides a lightweight, dependency-free migration runner.
Package migrations provides a lightweight, dependency-free migration runner.
Package stubrepo provides hand-written stub implementations of the data.*Repoer interfaces.
Package stubrepo provides hand-written stub implementations of the data.*Repoer interfaces.
Package swagger Code generated by swaggo/swag.
Package swagger Code generated by swaggo/swag.
Package testhelpers provides shared utilities for tests across all packages.
Package testhelpers provides shared utilities for tests across all packages.
Package ui embeds the compiled static assets (CSS, JS) for production builds.
Package ui embeds the compiled static assets (CSS, JS) for production builds.
templui util templui.go - version: v1.12.1 installed by templui v1.12.1
templui util templui.go - version: v1.12.1 installed by templui v1.12.1
Package validation provides Echo DTO validation via go-playground/validator.
Package validation provides Echo DTO validation via go-playground/validator.
view
pos
ui
Package worker starts the background job runner and registers all job handlers.
Package worker starts the background job runner and registers all job handlers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL