Metadata-Version: 2.4
Name: faik-inventory
Version: 1.0.7
Summary: Neo4j-backed FastAPI app with React frontend for IT inventory graph management.
Requires-Python: >=3.14
Description-Content-Type: text/markdown
Requires-Dist: fastapi<1.0,>=0.116
Requires-Dist: jinja2<4.0,>=3.1
Requires-Dist: neo4j<6.0,>=5.28
Requires-Dist: python-multipart<1.0,>=0.0.20
Requires-Dist: uvicorn<1.0,>=0.35

# faik-inventory

Neo4j-backed FastAPI app with a React frontend for managing an IT inventory graph.

## Requirements

- Python 3.14
- Node.js 22+
- A reachable Neo4j instance

## Environment

Set these as needed before starting the app:

```bash
export NEO4J_URI="bolt://127.0.0.1:7687"
export NEO4J_USER="neo4j"
export NEO4J_PASSWORD="your-password"
export NEO4J_DATABASE="neo4j"
```

## Install

Install backend dependencies:

```bash
pip install -r requirements.txt
```

Install frontend dependencies:

```bash
npm install
```

Configure git to use project hooks:

```bash
git config core.hooksPath .githooks
```

This enables pre-commit checks that prevent committing Neo4j database files and ensure tests pass.

## Build Python Wheel

Build an installable wheel for this app:

```bash
./scripts/sync_package_assets.sh
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
python -m build --wheel
```

Install and run from wheel:

```bash
pip install dist/faik_inventory-*.whl
faik-inventory --host 0.0.0.0 --port 8000
```

Run with managed local Neo4j (data stored in your user directory):

```bash
faik-inventory --managed-neo4j --host 0.0.0.0 --port 8000
```

By default managed Neo4j stores runtime files under:

```text
~/.local/share/faik-inventory/neo4j/
```

Override managed paths and ports if needed:

```bash
faik-inventory \
  --managed-neo4j \
  --managed-neo4j-home /opt/neo4j \
  --managed-neo4j-dir ~/.local/share/faik-inventory \
  --managed-neo4j-bolt-port 7687 \
  --managed-neo4j-http-port 7474
```

## Run The Latest Version

Build the React frontend:

```bash
npm run build
```

Start the FastAPI app:

```bash
uvicorn app:app --reload
```

Open:

```text
http://127.0.0.1:8000
```

## Frontend Development

If you change files under `src/`, rebuild before refreshing the FastAPI app:

```bash
npm run build
```

The backend serves the built frontend from `static/app/`.

## Notes

- The `/` route serves the built React app, not the old Jinja page.
- If the frontend build is missing, the app returns a message telling you to run `npm install` and `npm run build`.

Test string

Pipeline trigger check: deploy key added on 2026-03-05.
