Skip to content

andrew867/CoinLine

Repository files navigation

CoinLine Payphone Management Platform

Server-hosted management plane for Millennium payphone fleets — provisioning, table distribution, call rating, card/account administration, technician craft workflows, firmware orchestration, protocol-aware diagnostics, and audit trails.

Backend Web Docs License: MIT .NET Node PostgreSQL OpenAPI Release Status: pre-production

Companion project: CoinLine Terminal Emulator — host-side functional emulator for the same payphone family, used for lab and integration validation.


What this is

CoinLine is the server-side counterpart to the terminal emulator. It runs on customer infrastructure as CoinLine Server (ASP.NET Core API + PostgreSQL + optional worker) plus the CoinLine Management Console (React + TypeScript). It is built for OEM and integrator workflows: provisioning, table downloads, rating, cards, craft, firmware orchestration, DLOG/NCC inspection, and audit.

Repository github.com/andrew867/CoinLine
Documentation (MkDocs source) docs-site/docs/ — build with MkDocs Material
OpenAPI docs-site/docs/api/openapi/coinline.openapi.json
Release v0.2.0 — see Changelog and Known limitations
License MIT — Copyright (C) 2026 Andrew Green

Architecture at a glance

                ┌──────────────────────────────┐
                │  CoinLine Management Console │   React + TypeScript SPA
                │  (web/)                      │
                └────────────┬─────────────────┘
                             │ HTTPS (API key auth, CORS)
                             ▼
┌───────────────────────────────────────────────────────────┐
│                       CoinLine Server                     │
│                       (backend/)                          │
│                                                           │
│  ASP.NET Core 9 API ── OpenAPI / Swagger                  │
│   ├── Provisioning · Tables · Downloads · DLOG · NCC      │
│   ├── Rating · Cards · Craft · Firmware · Audit · Health  │
│   └── Background worker (heartbeats, retention telemetry) │
└────────────┬──────────────────────────────────────────────┘
             │ EF Core (Npgsql)
             ▼
      ┌────────────────┐
      │  PostgreSQL 16 │   migrations, raw payload retention, audit log
      └────────────────┘

Components

Name Description
CoinLine Host Terminal-side / gateway integration surface (terminology used for field and OEM integration docs).
CoinLine Server ASP.NET Core API, PostgreSQL (EF Core), optional worker — see backend/ and docker/.
CoinLine Management Console React + TypeScript operator SPA — see web/.
CoinLine Field Tools Field validation, capture, and lab workflows (console + validation APIs).
CoinLine API REST + OpenAPI (CoinLine API title in Swagger). Authenticate with API keys in production.

Features (truthful scope)

  • Fleet hierarchy — customers, sites, terminals, groups; terminal events and status.
  • Table distribution — definitions, payloads, sets, assignments, download batches (confirm-guarded risky operations).
  • DLOG ingestion with raw payload retention and diagnostics.
  • NCC-oriented framing libraries and capture APIs for validation workflows.
  • Rating MVP — plans, rules, quote / authorize, call records. Not asserted as full production billing parity.
  • Cards ledger and reconciliation scaffolding — simulation-oriented defaults; scope PCI independently.
  • Craft sessions and simulated commands — live modem paths require field validation.
  • Firmware package registry and jobs — live programming gated behind Firmware:AllowLiveFlashing.
  • Audit events for sensitive mutations; health/readiness/metrics hooks for ops integration.

Project status — honest version

This release is for evaluation, lab demos, integration validation, and OEM customer pilots. It is not a turnkey carrier-grade billing switch or a PCI-compliant payment environment.

What works end-to-end today:

  • API, console, OpenAPI export, MkDocs strict build, Docker Compose dev stack.
  • Provisioning, table CRUD + download orchestration, DLOG ingest, NCC decode/capture, audit, health/readiness.
  • Rating MVP with quote/authorize flows; cards ledger UI in simulation mode; craft and firmware workflow scaffolding with gates.

What is intentionally simulated or gated:

  • Card payments default to simulation; physical card writes are disabled or simulated.
  • Craft has no live modem execution path enabled — workflow + persistence only unless extended.
  • Firmware live flashing is off by default and requires explicit configuration and field validation.

What still requires field validation with real hardware:

  • DLOG / NCC wire semantics on supported terminal firmware.
  • Set / table-rated rating against supported payphone models.
  • End-to-end download acknowledgment on the terminal.
  • Anything touching PSTN, modem, UART, or programming pins.

See Known limitations, Open questions, and Hardware validation required.


Requirements

Optional: Docker / Docker Compose for API + database (+ worker profile).


Quickstart (development)

1. PostgreSQL

docker run --name coinline-pg -e POSTGRES_PASSWORD=coinline -e POSTGRES_USER=coinline \
  -e POSTGRES_DB=coinline -p 5432:5432 -d postgres:16-alpine

2. CoinLine Server

From the repository root:

cd backend
dotnet tool restore
dotnet ef database update --project src/HostPlatform.Infrastructure --startup-project src/HostPlatform.Api
dotnet run --project src/HostPlatform.Api --launch-profile http

Configure API keys for non-development environments — see .env.example (COINLINE_API_KEYS).

3. CoinLine Management Console

cd web
npm install
npm run dev

4. Docker Compose (alternative)

cd docker
docker compose up --build

Build & test

cd backend && dotnet build && dotnet test
cd ../web && npm ci && npm run build && npm run test

Playwright E2E (optional):

cd web && npx playwright install --with-deps && npm run e2e

Documentation site

cd docs-site
pip install -r requirements.txt
mkdocs serve -f mkdocs.yml

Strict build (recommended before release):

cd docs-site && mkdocs build -f mkdocs.yml -d site --strict

Entry points: Documentation home · Quickstart · Server deployment · Security overview.


OpenAPI export

Regenerate committed artifacts after API contract changes:

Windows (repository root):

powershell -ExecutionPolicy Bypass -File docs-site/scripts/export-openapi.ps1

Linux / macOS:

bash docs-site/scripts/export-openapi.sh

Outputs: docs-site/docs/api/openapi/coinline.openapi.{json,yaml}


Configuration


How to help

Issues and PRs are welcome — this project is most useful when integrators and lab operators share what they hit on real hardware:

  • Field validation reports. Open an issue with the supported terminal firmware version, the workflow you ran, what worked, and what did not. Compatibility-matrix PRs against docs-site/docs/field-validation/ are especially welcome.
  • OpenAPI gaps. If the committed export disagrees with live /swagger, file an issue with both excerpts.
  • Rating edge cases. Fixture + expected-output PRs under fixtures/ are the fastest way to harden the rating engine.
  • DLOG / NCC samples. Anonymized samples that exercise unknown message types or unusual framing are gold for the diagnostics path.
  • Documentation polish. MkDocs strict build must stay green; PRs that close TODOs in docs-site/docs/ are very welcome.

For protocol and hardware notes please keep contributions technical and generic — describe signals, ports, framing, and observed behavior rather than specific customer sites or proprietary firmware artifacts.


Contributing & support

Issues and PRs: GitHub.
Support channels for production deployments are organization-defined — see Support policy.


Companion project

  • CoinLine Terminal Emulator — MAME-based functional emulator for the same payphone family. Useful for protocol bring-up, host integration against a deterministic terminal, and reproducing DLOG / NCC behavior without physical hardware.

Disclaimer

CoinLine is intended for evaluation, integration, and field validation aligned with your OEM and compliance programs. It is not offered as a turnkey certified billing switch or a PCI-compliant card environment without your own assessment and scope.


Copyright (C) 2026 Andrew Green — licensed under the MIT License.

About

Server-hosted management plane for Millennium payphone fleets: provisioning, table distribution, call rating, cards, craft, firmware orchestration, DLOG/NCC diagnostics, and audit. .NET 9 + React + PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors