Skip to content
TestLookupTestLookup
Search Ctrl K

Search TestLookup

Enter a term to search the local static index.

    Codebase map

    This map shows where things live in the TestLookup code, for contributors who want to follow or change a feature. A module named here exists in the code of this version. Whether its feature is turned on in a given installation is a separate question.

    Start at backend/app/main.py and at register_routers in backend/app/bootstrap.py. Or find the endpoint in the API reference: the generated endpoint index on GitHub links each route to the code that handles it. From the route, follow the request in this order:

    1. Its request format.
    2. The checks on role and access.
    3. The service that holds the logic.
    4. The SQLAlchemy model, or the MongoDB or file-storage client.
    5. The serializer that formats the response.
    6. The tests.

    Services share the application’s models and run in the same processes. A file name that ends in _service does not mean a separately deployed service.

    Project export and import are not in the area map below. They live in backend/app/services/project_export_*.py and project_import_*.py, and their background jobs are in project_data_job_service.py. Four tests guard them:

    • backend/tests/test_project_export_classification.py covers every table that belongs to a project.
    • test_project_export_documents.py covers every MongoDB collection.
    • test_project_export_objects.py covers the keys of stored files.
    • test_project_import_side_effect_free.py fails if an import could reach the code that receives results, sends notifications or webhooks, calls a model or updates search.

    Use frontend/src/App.tsx to find a page’s route. Then follow the page and its components through hooks, state, permissions, shared types and frontend/src/services/api.ts. Check the screen against the API’s response format, or against what the handler really returns. Include the loading, empty, partial, error and not-allowed states.

    • The sidebar is built from frontend/src/components/layout/navConfig.ts.
    • Old addresses are redirected by frontend/src/routing/legacyRedirects.tsx.
    • The in-app user guide, served at /docs, lives in frontend/src/content/guide/.

    To follow background work, start where the job is created and the queue it is sent to. Then follow it through:

    • the Celery task’s entry point;
    • the event-loop and client set-up;
    • leases and retries;
    • outboxes and child workers;
    • workflow definitions and tool rules;
    • saving the results, and the catch-up jobs.

    Which queues exist, and which workers read them, differ between install modes. Agent child work needs its own worker for the agent_children queue. The generated worker task list on GitHub records each task’s route, queue and schedule as written in the code. It does not show which workers are running.

    The command-line tool (CLI), the code libraries (SDKs) for each language and the MCP server each use a different part of the API. Read cli/testlookup_cli, client and mcp separately, because each has its own packaging, sign-in, live updates, retries and versions. Not every client supports every report format the backend can read. None of the clients is published to a package registry yet, so install them from a copy of the repository. The MCP server accepts sign-in tokens (JWT access tokens), but not API keys.

    In this version, the repository holds 7,032 files. The API reference, the data dictionary (160 tables) and the generated worker task list link each route, table and task to its source file. All three are generated from the code of this version.

    For a change, follow the route through each part it touches: its data format, service, stored data or migration, worker jobs and outside effects, serializer, the code that uses it, and its tests. Keep these working:

    • the limits on which projects each user can reach;
    • the stages each record goes through;
    • safe repeats of the same request;
    • the activity log and monitoring;
    • the generated references.

    In reviews, link to the code at a fixed commit, so that later changes to the code do not change what you pointed to.

    The tables below show which folders, areas and parts of the code hold each feature.

    Folder or filesWhat it holds
    backend/app/main.py, bootstrap.pyStart-up, middleware, route registration, and the health and monitoring set-up
    backend/app/coreSettings, sign-in, role and access checks, release rules, security, logging and metrics
    backend/app/routersThe HTTP and WebSocket endpoints. Start with the API index to find a feature’s paths
    backend/app/modelsDatabase models, public data formats, fixed lists of values, AI input and output formats, evidence formats and serializers
    backend/app/dbClients for PostgreSQL, MongoDB and Redis, file storage, and the checks that refuse work when TestLookup is overloaded
    backend/app/servicesThe logic that coordinates each feature. A name ending in _service does not mean it is deployed on its own
    backend/app/agents, toolsAgent workflow steps, the Investigator and Fixer agents, and adapters for evidence and tools
    backend/app/streamsReading live events, sending them to viewers, and the streaming protocol
    backend/app/workerCelery task entry points, schedules, queue routing, event-loop set-up and training tasks
    backend/migrationsAlembic database updates (migrations) and data backfills. These decide how a database is upgraded
    backend/models, backend/scriptsModel files and their settings, and backend maintenance tools
    backend/testsUnit, architectural, regression and integration tests
    frontend/src/pages, componentsRouted feature screens and reusable UI
    frontend/src/services, hooks, store, types, utils, configAPI calls and data formats, polling and state, permissions, and shared display logic
    frontend/testsBrowser tests and exploratory checks. The config shows whether a test runs against a live server or a mock
    cli/testlookup_cliCommand groups (Typer), profiles, API calls and output
    clientThe Python reporter, the JavaScript, Java and Go integrations, CI details and examples
    mcpThe FastMCP adapter, API client, sign-in check, tools, resources, prompts and tests
    scriptsSetup, sample data, release and backup tasks, quality checks that must not get worse, and documentation generators
    docker-compose*.yml, Makefile, install.shStart-up for local, release, VM and offline installs, and common operator tasks
    k8s, homelabsetup, openshiftsetupThe Kubernetes base and overlays, and the K3s and OpenShift install scripts
    infra, deployCloud and monitoring files, and the list of images
    .github/workflowsCI, release, infrastructure and deployment automation
    benchmarks, samplesSample data for performance and AI quality checks, and example reports
    architecture, docs, user-guideDetailed architecture guides, maintainer docs and the operator guide. The end-user guide is in frontend/src/content/guide
    AreaMain services and entry pointsData it keeps and who uses it
    Receiving resultsingestion, ingestion_pipeline, format parsers, safe_archive, upload_statusRuns, test results and history, MongoDB evidence, and upload records in Redis
    Livestream_service, ws_event_ingest, live_session_drainer, live_run_recovery_serviceRedis stream and session, then the saved run, then live updates to the screens
    Intelligenceanalysis_router, rules_engine, ml, training, run_intelligence_serviceAI analyses, summaries, and where each pipeline result came from
    Agent governanceagent_catalog, agent_config_resolver, agent_planner, workflow_definition_service, action_policySettings versions, and records of agent calls, pipelines, steps and actions
    Reliabilitypipeline_lease, retry_policy, pipeline_retry_config, run_downstream_outbox, tombstonesSaved status, retries, removing duplicates, and catch-up jobs
    Evidence and reportsevidence_*, decision_report_*, report_composition_service, summary_report_serviceEvidence links that never change, report attempts, and HTML, PDF, share links and exports
    Reviewsreview_request_service, review_envelope, review_supervisor, report_distribution_policyWhich report a review covers, its state (accepted, rejected or replaced), and a record of where it was shared
    Releaserelease_*, policy_evaluator_service, policy_resolution, run_diff_serviceWhich runs belong to a release, phases, totals, and decisions that are only ever added to
    Test managementtest_management_*, test_case_lifecycle_service, suite_*, duplicate_detection_serviceWritten test cases, plans, strategies, each test’s permanent identity, and reviews
    Flaky tests and performanceflaky_*, quarantine_*, perf_regression_service, performance_budgetsUsual timings to compare against, quarantine state, signals and coaching
    Identity and settingsmfa_service, sso_service, scim_service, refresh_token_service, feature_flags, secret_serviceUsers, tokens, membership, project policies, audit
    External integrationsconnectors, jira_client, GitHub/GitLab services, notification, webhook_serviceOutside services’ APIs, delivery attempts and their records, and retries
    Knowledge and searchknowledge_*, rag_*, search_*, semantic_searchSource documents and their chunks, the search index, generated drafts and their sources
    Administrationretention_service, run_deletion_service, deletion_job_service, storage_accounting_servicePurge rules, markers for deleted runs, how long stored files are kept, and operations reports

    Request handlers use the core access checks, data formats, database models and services. Services use the storage clients and other services. Agent workflow steps call those services and tools under the rules set for each run. Celery tasks call the same shared code. The web app, the command-line tool and the MCP server use the REST API, and the code libraries (SDKs) also send live events and batches. Database migrations depend on the history of the database layout, not on what uses the API.

    The libraries each part depends on are listed, with their versions, in the backend requirements, the frontend package file, the CLI package, the client package and the MCP requirements. The frontend uses React Router, Axios, SWR, Zustand, Tailwind, Radix, chart libraries and Markdown rendering. The backend uses FastAPI, Pydantic, SQLAlchemy, Celery, Redis, Motor, file-storage clients, LangChain, LangGraph, optional Chroma and export libraries. Read the files for version numbers instead of copying them from old badges.

    To make a change, follow it in this order:

    1. The route.
    2. Its input format.
    3. The service.
    4. The database model and migration.
    5. Any worker job or outside effect.
    6. The serializer.
    7. The frontend or client code that uses it.
    8. The tests of its behaviour.
    ComponentResponsibilityKey implementation
    React 19 and TypeScript web appPages, controls that depend on the user’s role, polling and live updates, charts, and the screens for reviewing and writingfrontend/src/App.tsx, frontend/src/services/api.ts
    FastAPI APIChecks each request, sign-in and access, coordinates the work and formats the responsebackend/app/main.py, backend/app/bootstrap.py, backend/app/routers
    Domain servicesReceiving results, identity, releases, governance, reporting, retention and integrationsbackend/app/services
    Celery workersRead and save test results, run analysis pipelines, send notifications and clean upbackend/app/worker/tasks.py, backend/app/worker/celery_app.py
    BeatStarts scheduled jobs and catch-up jobsThe beat schedule in backend/app/worker/celery_app.py
    Agent runtimeAgent list, planner, the workflow fixed for each run, saved progress, leases, tools and reviewbackend/app/agents/workflow.py, backend/app/services/agent_capability_registry.py
    PostgreSQLThe main database, and the saved records of work in progressbackend/app/models/postgres.py
    MongoDBDetailed evidence, summaries, decision documents, and the raw and cleaned-up data that was sentbackend/app/db/mongo.py (the list of collections and indexes)
    RedisJob queue and results, live streams, sending updates to viewers, session buffers, usage limits and cachesbackend/app/streams, backend/app/db/redis_client.py
    File storageUploads waiting to be processed, files, exports, and training and knowledge filesbackend/app/db/storage.py
    AI model and search servicesThe local or cloud AI model you set up, and optional document searchbackend/app/services/llm_factory.py, backend/app/services/semantic_search.py
    Command-line tool, MCP server and SDKsUse the API, and send test results to TestLookupThe integration map
    Diagram: Components and ownershipDiagram: Components and ownership
    Open the diagram full size
    Steps in this diagram, as text

    Producers: External test runners and CI, Browser or CLI report upload, Drop folder with a marker file

    Application: FastAPI routes and auth, Domain services, Redis broker and live streams, General and ingestion workers, Isolated agent child workers, Beat and reconciliation, Agent workflow and policies

    Persistence: PostgreSQL, MongoDB, MinIO S3 or local storage, Optional ChromaDB

    • External test runners and CI → FastAPI routes and auth
    • Browser or CLI report upload → FastAPI routes and auth
    • Drop folder with a marker file → FastAPI routes and auth
    • FastAPI routes and auth → Domain services
    • FastAPI routes and auth → Redis broker and live streams
    • Domain services → PostgreSQL
    • Domain services → MinIO S3 or local storage
    • Redis broker and live streams → General and ingestion workers
    • Redis broker and live streams → Isolated agent child workers
    • Beat and reconciliation → Redis broker and live streams
    • General and ingestion workers → Domain services
    • General and ingestion workers → Agent workflow and policies
    • Isolated agent child workers → Agent workflow and policies
    • Agent workflow and policies → PostgreSQL
    • Agent workflow and policies → MongoDB
    • Agent workflow and policies → Optional ChromaDB
    • Agent workflow and policies → Policy-approved model provider
    • Domain services → MongoDB
    • FastAPI routes and auth → UI polling SSE and WebSocket

    Before you change a feature that spans several of these parts, read the extension guide.