# TAX Local MVP App

Date: 2026-06-13

This is the first local system for TAX. Django is not installed in the bundled Python runtime, so this MVP uses only Python standard-library HTTP serving plus SQLite. The database and route shape are intentionally simple so the project can later migrate to Django without losing the model.

## What it does

- Stores professional member prospects:
  - tax lawyers,
  - zeirishi,
  - CPAs,
  - corporate accountants,
  - finance and funding specialists,
  - VC, angel, and crypto investor lanes.
- Stores case intake:
  - M&A / restructuring,
  - real estate acquisition,
  - real estate divestment,
  - loan / funding,
  - capital raising,
  - portfolio tax alerts,
  - global tax consultation.
- Creates a simple local AI-style routing memo for each case.
- Records TAX token utility events:
  - professional review credits,
  - memo-generation credits,
  - loan/funding package credits,
  - investor-intake credits,
  - portfolio alert credits.
- Exposes JSON endpoints:
  - `/api/status`
  - `/api/cases`
  - `/api/members`
  - `/api/token-config`
  - `/api/token-events`
- Uses SQLite at `app/data/tax_mvp.db`.
- Writes local logs to `app/logs/tax-app.log`.

## Run

From this folder:

```powershell
.\run-local.ps1
```

Execution-policy-safe command wrapper:

```text
run-local.cmd
```

Detached Windows helper:

```powershell
.\run-detached.ps1
```

Hidden Windows Script Host helper:

```powershell
wscript.exe .\run-hidden.vbs
```

Or directly:

```powershell
& "C:\Users\hayat\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe" tax_app.py --host 127.0.0.1 --port 8787
```

Open:

```text
http://127.0.0.1:8787/
```

## Smoke test

```powershell
.\smoke.ps1
```

Execution-policy-safe wrapper:

```text
smoke.cmd
```

## Professional-scope note

The local AI routing memo is a triage aid only. Tax advice, tax filing, representation, legal opinions, and professional conclusions must be handled by qualified professionals.

TAX token events are utility workflow records. They are not investment records, securities offering records, legal opinions, or tax opinions.
