Skip to main content

Neo4j-backed FastAPI app with React frontend for IT inventory graph management.

Project description

faik-inventory

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

Requirements

  • Python 3.14
  • Node.js 22+ (development only)

Environment

Set these as needed before starting the app:

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

Quick start (copy/paste)

Running in a container starting from python with neo4j installed:

pip install faik-inventory

# 1) Start Neo4j in the container (default neo4j user)
neo4j start

# 2) Create a user, password, and database
cypher-shell -u neo4j -p neo4j <<'EOF'
CREATE USER app_user IF NOT EXISTS SET PASSWORD 'apppass';
CREATE DATABASE app_db;
GRANT ROLE admin TO app_user;
EOF

# 3) Use the new app user/database
export NEO4J_URI="bolt://127.0.0.1:7687"
export NEO4J_USER="app_user"
export NEO4J_PASSWORD="apppass"
export NEO4J_DATABASE="app_db"

Launch the app:

faik-inventory --host 0.0.0.0 --port 8000

If you changed the default neo4j password on this container, use that password in the cypher-shell -u neo4j -p <password> command.

Install

Install backend dependencies:

pip install -r requirements.txt

Configure git to use project hooks:

git config core.hooksPath .githooks

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

1) Run On Bare Python Docker Image With External Neo4j

  1. Install the app package:
# From package index:
pip install faik-inventory

# Or from a built wheel:
# pip install dist/faik_inventory-*.whl
  1. Install and start Neo4j separately (sidecar, service, or command), then start the app:
neo4j start
faik-inventory --managed-neo4j --host 0.0.0.0 --port 8000

Do not let faik-inventory manage Neo4j; it only verifies a pre-existing endpoint. Set credentials in env vars before launch:

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

--managed-neo4j defaults to NEO4J_USER=neo4j and NEO4J_PASSWORD=neo4j only when those values are not already set.

Optional: override bolt port check (if your deployment uses a different port):

faik-inventory \
  --managed-neo4j \
  --managed-neo4j-bolt-port 7687 \
  --host 0.0.0.0 \
  --port 8000

2) Run On Normal Python With Remote Neo4j

Set your remote Neo4j environment values, then run:

faik-inventory --host 0.0.0.0 --port 8000

or in development mode:

uvicorn app:app --reload

3) Development

Install frontend dependencies:

npm install

Before running the app locally, build frontend assets:

npm run build

Then run FastAPI:

uvicorn app:app --reload

Open:

http://127.0.0.1:8000

Wheel build/publish automation is handled in Tekton jobs under k8s/tekton.

If you change files under src/, rebuild before refreshing:

npm run build

The backend serves the built frontend from faik_inventory/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.

test 1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

faik_inventory-1.0.27-py3-none-any.whl (263.7 kB view details)

Uploaded Python 3

File details

Details for the file faik_inventory-1.0.27-py3-none-any.whl.

File metadata

File hashes

Hashes for faik_inventory-1.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 f621dcf7bf5db829d44172f17c859132c29021397c8b5429eb627ad5325a39de
MD5 8a04b564a5e107df0bb890e2448303c3
BLAKE2b-256 e557e104b40cd7a72a56d699fdde34d5aba1c14a0c5c33e1f497494456bc71fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page