Customer-IT Portal – Program Description

1. Purpose

This single-file PHP script is a zero-install prototype for centrally collecting, maintaining and analysing all IT information per customer (contact data, servers, clients, printers, software, remote-access credentials, memos, photos). It replaces spreadsheets or wikis during the pilot phase and gives technicians full read/write access on-site with nothing more than a browser.

2. Feature Map

AreaFeatureImplementation
Auth One-time password login Session + constant LOGIN_PASSWORD (hash-equals check)
Create Add new customer action=new – pre-populated JSON template
Edit Full or partial data change edit, edit_block, edit_form, edit_support
Store Validated JSON + last-update stamp save* actions + save_json()
Files One folder per customer customers/<id>/customer.json
customers/<id>/notes/*
customers/<id>/assets/*
Secrets TeamViewer ID/Password isolated ../secrets/<id>.secrets.json (only shown when &secrets=1)
Audit Append-only log per customer logs/<id>.log.jsonl (timestamp, IP, diff)
Report Quality checks & bulk export action=report → JSON or CSV download
Theme Card colours configurable Optional theme.ini parsed by cardStyle()

3. JSON vs. Traditional Database – Why JSON for Prototyping?

AspectJSON files (no server)Classic RDBMS
Setup Zero minutes – drop file on any PHP host Install DB, create schema, users, rights
Schema Evolution Add array key on the fly; no migrations ALTER TABLE, backups, locks
Version Control Human-readable diffs in Git Binary dumps or SQL scripts
Offline / Field Test Runs instantly on XAMPP/laptop May need VPN, open ports
Scale Perfect for dozens of customers & MB size Required when data > GB or heavy concurrency

4. Prototyping Benefits

  1. No external dependencies – works on every PHP 7/8 host.
  2. Git-friendly – every change is a readable diff.
  3. Structured yet flexible – any depth (e.g. infrastructure.server.shares[].purpose) without joins.
  4. Simple import/export paths – JSON ↔ CSV ↔ Excel for non-DB colleagues.
  5. Instant demo effect – create customer → fill form → done.
  6. Risk-free – delete folder and restart; no DB rights, no broken indexes.

5. Migration Path (when you outgrow files)

  1. Derive DDL from the JSON schema.
  2. Replace load_json() / save_json() with PDO wrappers.
  3. Keep JSON as exchange format for future imports/exports.

The prototype never becomes “throw-away code” – it evolves into the production customer-IT database.