项目 / tngoman/Store-POS

tngoman/Store-POS

行业推荐
语言 TypeScript标签 point-of-saleposexpresscashdesktop-appelectronlanreactregisterretailsqlitetypescriptvite数据更新 2026-11-23 06:44:28 · 仓库 2026-11-22

一段话介绍

Store POS 是一套桌面收银应用,可用于单机收银台,也可在局域网内部署多台收银终端。2.0 版本在 Electron 上重写,前台为 React 18、TypeScript 和 Vite 6,接口为 Express,数据用 SQLite(经由 sql.js,无需本地原生编译工具链)。收银端支持条码检索、分类筛选、带图片的商品卡片、购物车与折扣税额、顾客选择、挂单,以及现金或刷卡结账和打印小票;后台可管理商品、库存、销售记录、顾客和员工权限。开发启动为 `npm install` 后执行 `npm run dev`,需 Node.js 18 或更新版本(文档建议 20 LTS);Windows 安装包可用 `npm run dist` 生成。本页不转述默认登录口令。说明见[仓库 README](https://github.com/tngoman/Store-POS)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Modern Electron Point of Sale — React till, Express + SQLite API, LAN multi-terminal, catalog/photos, and Windows installer.
1,058累计星
471Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

电商交易与订单履约

适配系统:电商交易平台、订单履约系统 · 得分 3.0

Electron POS 收银。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
可运行 npm run dev。
特点或设计要点
POS 收银系统支持条码扫码、库存追踪、现金与卡支付、挂单续单、小票打印,并含员工权限与商店信息设置。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-10-25 · 语言 TypeScript · 贡献者 —
cli

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 5,872 字节。

# Store POS

Modern desktop Point of Sale for a single register or a LAN of networked tills. Version **2.0** rebuilds the original Electron app on a secure, maintainable stack.

## Features

### Till
- Barcode scan / search (Enter to add)
- Category filter chips
- Product tiles with photos, price, and stock status
- Cart with quantity controls, discount, and tax
- Customer picker with quick-add
- Hold / resume sales
- Cash payment pad with South African note shortcuts (R10–R200) plus Exact
- Card payment (exact tender)
- Change / still-due display
- Printable receipt

### Catalog
- Products and categories
- Inventory tracking
- Photo picker (local upload + Pexels download to a local media library)
- **Seed demo** sample catalog (SA-style products & customers)
- Multi-select **bulk delete**

### Sales
- Transaction history filtered by date range, cashier, till, and status (paid / held)

### Customers & Team
- Customer records
- Staff accounts with permission flags (products, categories, sales, users, settings)

### Settings
- Store identity (name, address, contact, logo, receipt footer)
- Currency symbol and optional tax
- Operating mode (Standalone / Network Server / Network Terminal)
- Till number
- Pexels API key for catalog photos
- Demo data seed / full catalog & sales wipe

## Tech stack

| Layer | Technology |
|--------|------------|
| Desktop shell | Electron 33 (contextIsolation, preload bridge — no `nodeIntegration`) |
| UI | React 18 + TypeScript + Vite 6 |
| API | Express |
| Auth | JWT + bcrypt |
| Database | SQLite via **sql.js** (no native build toolchain required) |
| Installer | electron-builder (Windows NSIS) |

## Requirements

- Node.js 18+ (20 LTS recommended)
- Windows for the packaged installer (`npm run dist`); `npm run dev` works wherever Electron runs

## Quick start

```bash
npm install
npm run dev
```

Default login:

| Username | Password |
|----------|----------|
| `admin`  | `admin`  |

Change the admin password after first login in a production deployment.

### Till shortcuts

| Key | Action |
|-----|--------|
| **Enter** | Add scanned / searched item |
| **F2** | Open payment (charge) |
| **F4** | Held sales |
| **Esc** | Close payment modal |

## Operating modes

Configure under **Settings → Register**. Restart the app after changing mode.

| Mode | Behavior |
|------|----------|
| **Standalone** | Local API + SQLite on this PC (`127.0.0.1:8001`) |
| **Network Server** | Same database, API bound to `0.0.0.0:8001` so other tills can connect |
| **Network Terminal** | No local DB; connects to the server IP you enter |

Typical LAN setup:

1. On the back-office / main PC → **Network Server**, note the LAN IP shown in Settings.
2. On each till PC → **Network Terminal**, set **Server IP** to that address, assign a unique **Till number**.
3. Restart both apps.

## Scripts

| Command | Description |
|---------|-------------|
| `npm run dev` | Vite + Electron (development) |
| `npm run build` | Production UI build into `dist/` |
| `npm start` | Electron against an existing build / config |
| `npm run smoke` | API + LAN smoke tests |
| `npm run dist` | Build UI and create Windows installer |

Installer output:

```text
release/Store POS Setup 2.0.0.exe
```

## Project layout

```text
electron/          Main process + secure preload (window.pos)
server/            Express API, sql.js database, route modules
  routes/          inventory, categories, customers, users, settings,
                   transactions, media, demo
src/               React UI
  pages/           Till, Catalog, Sales, Settings, Login
  components/      Payment pad, photo picker, customer select, …
  layout/          App shell / sidebar
  api/client.ts    HTTP client
scripts/           Smoke tests
build/             App icons for the installer
public/favicon.ico Packaged favicon
```

Data and uploads live under Electron **userData** (not in the repo), so uninstalling may leave a database folder depending on OS settings.

## Demo data

From **Catalog** or **Settings → Demo data**:

- **Seed demo** — adds sample categories, products, and customers if those names do not already exist
- **Bulk delete** (Catalog) — delete selected products
- **Bulk delete catalog & sales** (Settings) — removes products, categories, sales history, and customers except Walk-in; keeps staff and settings

## API overview

Local API base (standalone): `http://127.0.0.1:8001/api`

| Area | Examples |
|------|----------|
| Auth | `POST /users/login` |
| Catalog | `/inventory/products`, `/categories/all` |
| Sales | `POST /new`, `GET /by-date`, `GET /on-hold` |
| Media | `/media/library`, `/media/pexels/search` |
| Demo | `POST /demo/seed`, `POST /demo/clear` |

Authenticated routes expect `Authorization: Bearer <token>`.

## Security notes

- Renderer has no Node integration; privileged actions go through the preload bridge.
- Change default `admin` credentials before real use.
- Prefer Network Server only on a trusted LAN; put a firewall in front for wider exposure.
- Pexels key is stored in settings on the server machine — treat it like a secret.

## Troubleshooting

| Issue | What to try |
|-------|-------------|
| Blank window / `window.pos` missing | Use Electron via `npm run dev`, not a plain browser tab |
| Terminal cannot reach server | Same LAN, correct server IP, mode = Network Server, port **8001** open |
| Sales history empty | Date filters use local time; default range is month start → end of today |
| Media library 404 after code changes | Restart Electron so the API process reloads new routes |
| Native module / SSL build errors | This project uses **sql.js** deliberately to avoid `better-sqlite3` compile issues |

## License / authorship

Desktop POS application maintained for store use. See repository history for contributors to the original and 2.0 rewrite.
↑