Skip to main content

9. Repository Map

Root

File/PathDescription
MakefileHelper targets (network, up-core, health, ingest, logs/restart helpers) using docker compose and container exec.
docker-compose.ymlBase Compose (CPU-safe default stack, including ollama).
docker-compose-gpu-override.ymlOptional NVIDIA override for ollama (used when GPU mode is enabled).
DockerfileMulti-stage build for Python services: python-rag (bridge/API image) and rerank (local reranker).
docker/Dockerfiles and runtime assets (laravel.Dockerfile, ollama.Dockerfile, qdrant.Dockerfile, entrypoint/nginx configs).
.env.exampleTemplate for runtime configuration.

Laravel (PHP) side

PathDescription
app/Http/Controllers/API/HawkiRagProxyController.phpProxies user queries to bridge.
app/Http/Controllers/API/IngestController.phpStarts/stops ingest processes, validates paths, writes status.
app/Http/Controllers/API/IngestStatusController.phpReads/updates ingest status and logs.
app/Http/Controllers/API/RagHealthController.phpHealth checks for RAG API/bridge.
app/Services/GraphService/Neo4jAdmin.phpClears all nodes/edges in Neo4j.
config/config.phpApp config mapping for endpoint URLs, model defaults, and ingest/log paths (keys listed below).
routes/api.phpMaps API routes to controllers above (standard Laravel).
storage/Logs (storage/logs) and shared files (storage/app/public, bound to shared volume).

Config keys (config/config.php + .env)

VariablePurpose
APP_NAMELaravel app display name.
APP_URLBase URL used by Laravel for generated links.
APP_KEYLaravel encryption/session secret.
DB_HOSTMariaDB host.
DB_PORTMariaDB port.
DB_DATABASEMariaDB database name.
DB_USERNAMEMariaDB username.
DB_PASSWORDMariaDB password.
NEO4J_HTTP_URLNeo4j HTTP endpoint used by graph operations.
NEO4J_USERNeo4j username.
NEO4J_PASSWORDNeo4j password.
QDRANT_HTTP_URLQdrant endpoint used by vector indexing/search.
HAWKI_RAG_BRIDGE_URLBridge base URL for ingest operations.
HAWKI_RAG_API_URLRAG API base URL for question-answering.
HAWKI_RAG_SHARED_ROOTShared ingest root path inside containers.
OLLAMA_API_URLOllama API endpoint.
OLLAMA_EMBED_MODELEmbedding model name.
GRAPH_OLLAMA_RAG_MODELGraph extraction model name.

Python side

PathDescription
python_rag/Python RAG stack containing the FastAPI bridge, RAG API components, and reranker code.
python_rag/app/FastAPI entrypoints and route modules (main.py, query.py, ingest.py).
python_rag/ingest/ingest_crawled.pyPrimary ingestion runner for crawled content.
python_rag/pipeline/Query and ingest pipeline logic/helpers.
python_rag/rerank/Local reranker implementation.
python_rag/requirements.txtPython dependency manifest.
rag_storage/Local repo directory; in Compose, the RAG API working directory is the named volume rag_storage mounted at /app/rag_storage for raganything_api_gpu (GPU profile). hawki_rag_bridge uses ./python_rag:/app and shared_storage:/app/shared.

Assets and build

PathDescription
resources/Standard Laravel frontend resources (views/assets).
public/Laravel public web root served by the web stack/reverse proxy.

Volumes (from compose)

VolumeDescription
rawki_shared_storageShared volume between Laravel and bridge (/var/www/storage/app/public/app/shared).
qdrant_data, neo4j_data, hawki_mariadb_data, rag_storage, ollamaPersistent data volumes for vector DB, graph DB, SQL DB, RAG working data, and model store.

Logs & statuses

ItemLocation/Command
Laravel logsstorage/logs/laravel.log
Ingest logs/statusstorage/logs/ingest_progress_*_{cache,full}.log and storage/logs/ingest_status*.json
Bridge/RAG API runtime logsdocker logs <container>