From 0a58672324885f6cdc265c52d54a211c2cdede66 Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 04:00:58 -0500 Subject: [PATCH 01/23] Changing requirements.txt for backend workflow --- backend/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 42772f8..8bcb10b 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -29,7 +29,6 @@ git+https://github.com/openai/whisper.git@v20230314 # --- Graph / Neo4j --- neo4j==6.0.2 neo4j-driver==5.28.2 -python-dotenv==1.0.0 requests==2.32.0 nltk==3.8.1 pandas==2.1.1 From cc45c54fd35c0e837addb6423c249da397e931a6 Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 04:06:28 -0500 Subject: [PATCH 02/23] Changing requirements.txt for backend workflow --- backend/requirements.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 8bcb10b..5a62da5 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -10,14 +10,9 @@ openai==1.48.0 sentence-transformers==2.7.0 # spacy==3.5.4 # coreferee==1.4.0 -nltk==3.8.1 transformers==4.44.2 torch==2.4.0 torchaudio==2.4.0 -numpy==1.26.2 -pandas==2.1.1 -scikit-learn==1.3.2 -httpx==0.25.2 # --- Vector Database --- faiss-cpu==1.8.0.post1 @@ -29,7 +24,6 @@ git+https://github.com/openai/whisper.git@v20230314 # --- Graph / Neo4j --- neo4j==6.0.2 neo4j-driver==5.28.2 -requests==2.32.0 nltk==3.8.1 pandas==2.1.1 numpy==1.26.2 From 349f06493bea7e93375356a8e7902961c35e677f Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 04:11:17 -0500 Subject: [PATCH 03/23] Changing requirements.txt for backend workflow --- backend/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index 5a62da5..4c278f2 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -11,15 +11,15 @@ sentence-transformers==2.7.0 # spacy==3.5.4 # coreferee==1.4.0 transformers==4.44.2 -torch==2.4.0 -torchaudio==2.4.0 +# Let pip resolve compatible versions automatically +torch +torchaudio +openai-whisper # --- Vector Database --- faiss-cpu==1.8.0.post1 pickle-mixin==1.0.2 -# --- Speech-to-Text (Whisper) --- -git+https://github.com/openai/whisper.git@v20230314 # --- Graph / Neo4j --- neo4j==6.0.2 From 17ae48ba9a6b5338bf286be4b11eae31b62db28b Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 04:26:24 -0500 Subject: [PATCH 04/23] Changing routes_conversation.py to handle OpenAI API key --- backend/app/api/v1/routes_conversation.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/app/api/v1/routes_conversation.py b/backend/app/api/v1/routes_conversation.py index 2687c92..1805cd4 100644 --- a/backend/app/api/v1/routes_conversation.py +++ b/backend/app/api/v1/routes_conversation.py @@ -16,8 +16,14 @@ load_dotenv(dotenv_path=dotenv_path) print(f"✅ Loaded .env from: {os.path.abspath(dotenv_path)}") -print(f"✅ OPENAI_API_KEY starts with: {os.getenv('OPENAI_API_KEY')[:10]}") - +# Replace line 19 in app/api/v1/routes_conversation.py with: + +api_key = os.getenv('OPENAI_API_KEY') +if api_key: + print(f"✅ OPENAI_API_KEY starts with: {api_key[:10]}") +else: + print("⚠️ OPENAI_API_KEY is not set") + # ✅ Initialize OpenAI client using loaded API key client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) From c12aba9ee6c525fd7a163131020a9d525ee37cec Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 04:41:05 -0500 Subject: [PATCH 05/23] Adding env variables to test --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23ab534..7b466bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,6 +42,11 @@ jobs: # 5️⃣ Run tests with coverage - name: Run tests with coverage working-directory: backend + env: + OPENAI_API_KEY: sk-test-dummy-key-for-ci-testing-only + NEO4J_URI: bolt://localhost:7687 + NEO4J_USER: neo4j + NEO4J_PASSWORD: test_password run: | pytest --cov=. --cov-report xml:coverage.xml --cov-report html @@ -51,4 +56,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} files: backend/coverage.xml - fail_ci_if_error: true + fail_ci_if_error: true \ No newline at end of file From 157baedbbcf0331cf3bca66982c1653b68126be2 Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 04:59:04 -0500 Subject: [PATCH 06/23] Adding secret env variables --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b466bc..26c3233 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,10 +43,10 @@ jobs: - name: Run tests with coverage working-directory: backend env: - OPENAI_API_KEY: sk-test-dummy-key-for-ci-testing-only - NEO4J_URI: bolt://localhost:7687 - NEO4J_USER: neo4j - NEO4J_PASSWORD: test_password + NEO4J_URI: ${{ secrets.NEO4J_URI }} + NEO4J_USER: ${{ secrets.NEO4J_USER }} + NEO4J_PASS: ${{ secrets.NEO4J_PASS }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} run: | pytest --cov=. --cov-report xml:coverage.xml --cov-report html From 4b3b13ab8680098d64aced7961bede033fe6fe19 Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 05:03:42 -0500 Subject: [PATCH 07/23] Adding dependencies --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26c3233..a60690a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,8 @@ jobs: python -m pip install --upgrade pip setuptools wheel pip install -r requirements.txt pip install pytest pytest-cov + pip install python-multipart + pip install deepmultilingualpunctuation # 5️⃣ Run tests with coverage - name: Run tests with coverage From b5fdc0d38bf798d697ff936ec90632a454ae2f8c Mon Sep 17 00:00:00 2001 From: Tiva Rocco <143124479+tiva710@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:00:32 -0500 Subject: [PATCH 08/23] Update README.md Included DOI in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c935afa..67e8ad1 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ License: [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) Doi: +[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.17544380-blue.svg)](https://doi.org/10.5281/zenodo.17544380) ### Tests & Code Quality [![Backend CI](https://github.com/tiva710/SE_Project_2/actions/workflows/main.yml/badge.svg)](https://github.com/tiva710/SE_Project_2/actions/workflows/main.yml) From 87acb794900f99cf727142ab1b834e4ab96205b8 Mon Sep 17 00:00:00 2001 From: Tiva Rocco <143124479+tiva710@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:03:56 -0500 Subject: [PATCH 09/23] Update CITATION.md Fixes issue #10 --- docs/CITATION.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/CITATION.md b/docs/CITATION.md index 29b87e2..109ff1a 100644 --- a/docs/CITATION.md +++ b/docs/CITATION.md @@ -1,4 +1,5 @@ # Citation Information +[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.17544380-blue.svg)](https://doi.org/10.5281/zenodo.17544380) If you use **ReqTrace** in your research, coursework, or software, please cite it as follows: @@ -8,12 +9,13 @@ If you use **ReqTrace** in your research, coursework, or software, please cite i Rocco, T., Upadhyay, A., Palimkar, R., & Masurekar, A. (2025). *ReqTrace: Requirements Discussions and Graph Analysis Tool* [Computer software]. GitHub. Available at: [https://github.com/tiva710/SE_Project_2](https://github.com/tiva710/SE_Project_2) +DOI: [https://doi.org/10.5281/zenodo.17544380](https://doi.org/10.5281/zenodo.17544380) --- ## APA Style -> Rocco, T., Upadhyay, A., Palimkar, R., & Masurekar, A. (2025). *ReqTrace: Automated Literature Management and Graph Analysis Tool* [Computer software]. GitHub. https://github.com/tiva710/SE_Project_2 +> Rocco, T., Upadhyay, A., Palimkar, R., & Masurekar, A. (2025). *ReqTrace: Automated Literature Management and Graph Analysis Tool* [Computer software]. GitHub. [https://doi.org/10.5281/zenodo.17544380](https://doi.org/10.5281/zenodo.17544380) --- @@ -25,5 +27,6 @@ Available at: [https://github.com/tiva710/SE_Project_2](https://github.com/tiva7 title = {ReqTrace: Automated Literature Management and Graph Analysis Tool}, year = {2025}, publisher = {GitHub}, - url = {https://github.com/tiva710/SE_Project_2} + url = {https://github.com/tiva710/SE_Project_2}, + doi = {10.5281/zenodo.17544380} } From f478f3e8ee05d2dead92b4076a2b8ee8c9738d7d Mon Sep 17 00:00:00 2001 From: Tiva Rocco <143124479+tiva710@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:20:21 -0500 Subject: [PATCH 10/23] Update DEPENDENCIES.md --- docs/DEPENDENCIES.md | 92 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/docs/DEPENDENCIES.md b/docs/DEPENDENCIES.md index 3b67699..6f29bb9 100644 --- a/docs/DEPENDENCIES.md +++ b/docs/DEPENDENCIES.md @@ -1,3 +1,91 @@ -List all 3rd party dependencies (FE & BE) +# 📦 Project Dependency Map -- Version, livence, mandatory/optional \ No newline at end of file + +| **Package** | **Version** | **License** | **Package URL** | +|--------------|-------------|--------------|------------------| +| concat-map | 0.0.1 | MIT | [pkg:npm/concat-map@0.0.1](https://www.npmjs.com/package/concat-map) | +| jiti | 1.21.7 | MIT | [pkg:npm/jiti@1.21.7](https://www.npmjs.com/package/jiti) | +| @unrs/resolver-binding-linux-s390x-gnu | 1.11.1 | MIT | [pkg:npm/@unrs/resolver-binding-linux-s390x-gnu@1.11.1](https://www.npmjs.com/package/@unrs/resolver-binding-linux-s390x-gnu) | +| regjsgen | 0.8.0 | MIT | [pkg:npm/regjsgen@0.8.0](https://www.npmjs.com/package/regjsgen) | +| is-async-function | 2.1.1 | MIT | [pkg:npm/is-async-function@2.1.1](https://www.npmjs.com/package/is-async-function) | +| @rollup/rollup-win32-x64-msvc | 4.52.5 | MIT | [pkg:npm/@rollup/rollup-win32-x64-msvc@4.52.5](https://www.npmjs.com/package/@rollup/rollup-win32-x64-msvc) | +| typed-array-byte-offset | 1.0.4 | MIT | [pkg:npm/typed-array-byte-offset@1.0.4](https://www.npmjs.com/package/typed-array-byte-offset) | +| postcss-selector-parser | 7.1.0 | MIT | [pkg:npm/postcss-selector-parser@7.1.0](https://www.npmjs.com/package/postcss-selector-parser) | +| kapsule | 1.16.3 | MIT | [pkg:npm/kapsule@1.16.3](https://www.npmjs.com/package/kapsule) | +| parse-headers | 2.0.6 | MIT | [pkg:npm/parse-headers@2.0.6](https://www.npmjs.com/package/parse-headers) | +| @rollup/rollup-openharmony-arm64 | 4.52.5 | MIT | [pkg:npm/@rollup/rollup-openharmony-arm64@4.52.5](https://www.npmjs.com/package/@rollup/rollup-openharmony-arm64) | +| picocolors | 1.1.1 | ISC | [pkg:npm/picocolors@1.1.1](https://www.npmjs.com/package/picocolors) | +| proxy-from-env | 1.1.0 | MIT | [pkg:npm/proxy-from-env@1.1.0](https://www.npmjs.com/package/proxy-from-env) | +| function.prototype.name | 1.1.8 | MIT | [pkg:npm/function.prototype.name@1.1.8](https://www.npmjs.com/package/function.prototype.name) | +| @cacheable/memoize | 2.0.3 | MIT | [pkg:npm/@cacheable/memoize@2.0.3](https://www.npmjs.com/package/@cacheable/memoize) | +| detect-newline | 3.1.0 | MIT | [pkg:npm/detect-newline@3.1.0](https://www.npmjs.com/package/detect-newline) | +| loose-envify | 1.4.0 | MIT | [pkg:npm/loose-envify@1.4.0](https://www.npmjs.com/package/loose-envify) | +| whatwg-mimetype | 4.0.0 | MIT | [pkg:npm/whatwg-mimetype@4.0.0](https://www.npmjs.com/package/whatwg-mimetype) | +| jest-util | 30.2.0 | MIT | [pkg:npm/jest-util@30.2.0](https://www.npmjs.com/package/jest-util) | +| fast-json-stable-stringify | 2.1.0 | MIT | [pkg:npm/fast-json-stable-stringify@2.1.0](https://www.npmjs.com/package/fast-json-stable-stringify) | +| deep-assign | 2.0.0 | MIT | [pkg:npm/deep-assign@2.0.0](https://www.npmjs.com/package/deep-assign) | +| ci-info | 4.3.1 | MIT | [pkg:npm/ci-info@4.3.1](https://www.npmjs.com/package/ci-info) | +| global-prefix | 3.0.0 | MIT | [pkg:npm/global-prefix@3.0.0](https://www.npmjs.com/package/global-prefix) | +| minimist | 1.2.8 | MIT | [pkg:npm/minimist@1.2.8](https://www.npmjs.com/package/minimist) | +| jest | 30.2.0 | MIT | [pkg:npm/jest@30.2.0](https://www.npmjs.com/package/jest) | +| babel-jest | 30.2.0 | MIT | [pkg:npm/babel-jest@30.2.0](https://www.npmjs.com/package/babel-jest) | +| prettier | 3.6.2 | MIT | [pkg:npm/prettier@3.6.2](https://www.npmjs.com/package/prettier) | +| yargs | 17.7.2 | MIT | [pkg:npm/yargs@17.7.2](https://www.npmjs.com/package/yargs) | +| eslint | 9.39.1 | MIT | [pkg:npm/eslint@9.39.1](https://www.npmjs.com/package/eslint) | +| tailwindcss | 4.1.16 | MIT | [pkg:npm/tailwindcss@4.1.16](https://www.npmjs.com/package/tailwindcss) | +| d3-transition | 3.0.1 | ISC | [pkg:npm/d3-transition@3.0.1](https://www.npmjs.com/package/d3-transition) | +| ngraph.random | 1.2.0 | BSD-3-Clause | [pkg:npm/ngraph.random@1.2.0](https://www.npmjs.com/package/ngraph.random) | +| istanbul-lib-source-maps | 5.0.6 | BSD-3-Clause | [pkg:npm/istanbul-lib-source-maps@5.0.6](https://www.npmjs.com/package/istanbul-lib-source-maps) | +| istanbul-lib-coverage | 3.2.2 | BSD-3-Clause | [pkg:npm/istanbul-lib-coverage@3.2.2](https://www.npmjs.com/package/istanbul-lib-coverage) | +| fast-diff | 1.3.0 | Apache-2.0 | [pkg:npm/fast-diff@1.3.0](https://www.npmjs.com/package/fast-diff) | +| lightningcss-win32-x64-msvc | 1.30.2 | MPL-2.0 | [pkg:npm/lightningcss-win32-x64-msvc@1.30.2](https://www.npmjs.com/package/lightningcss) | +| cssstyle | 4.6.0 | MIT | [pkg:npm/cssstyle@4.6.0](https://www.npmjs.com/package/cssstyle) | +| flat-cache | 4.0.1 | MIT | [pkg:npm/flat-cache@4.0.1](https://www.npmjs.com/package/flat-cache) | +| jest-core | 30.2.0 | MIT | [pkg:npm/@jest/core@30.2.0](https://www.npmjs.com/package/@jest/core) | +| jest-message-util | 30.2.0 | MIT | [pkg:npm/jest-message-util@30.2.0](https://www.npmjs.com/package/jest-message-util) | +| jest-resolve | 30.2.0 | MIT | [pkg:npm/jest-resolve@30.2.0](https://www.npmjs.com/package/jest-resolve) | +| jest-environment-jsdom | 30.2.0 | MIT | [pkg:npm/jest-environment-jsdom@30.2.0](https://www.npmjs.com/package/jest-environment-jsdom) | +| jest-mock | 30.2.0 | MIT | [pkg:npm/jest-mock@30.2.0](https://www.npmjs.com/package/jest-mock) | +| expect | 30.2.0 | MIT | [pkg:npm/expect@30.2.0](https://www.npmjs.com/package/expect) | +| html-escaper | 2.0.2 | MIT | [pkg:npm/html-escaper@2.0.2](https://www.npmjs.com/package/html-escaper) | +| process | 0.11.10 | MIT | [pkg:npm/process@0.11.10](https://www.npmjs.com/package/process) | +| pump | 3.0.3 | MIT | [pkg:npm/pump@3.0.3](https://www.npmjs.com/package/pump) | +| slice-ansi | 4.0.0 | MIT | [pkg:npm/slice-ansi@4.0.0](https://www.npmjs.com/package/slice-ansi) | +| wrap-ansi | 7.0.0 | MIT | [pkg:npm/wrap-ansi@7.0.0](https://www.npmjs.com/package/wrap-ansi) | +| string-length | 4.0.2 | MIT | [pkg:npm/string-length@4.0.2](https://www.npmjs.com/package/string-length) | +| parse-json | 5.2.0 | MIT | [pkg:npm/parse-json@5.2.0](https://www.npmjs.com/package/parse-json) | +| camelcase | 6.3.0 | MIT | [pkg:npm/camelcase@6.3.0](https://www.npmjs.com/package/camelcase) | +| is-number | 7.0.0 | MIT | [pkg:npm/is-number@7.0.0](https://www.npmjs.com/package/is-number) | +| globals | 14.0.0 | MIT | [pkg:npm/globals@14.0.0](https://www.npmjs.com/package/globals) | +| rrweb-cssom | 0.8.0 | MIT | [pkg:npm/rrweb-cssom@0.8.0](https://www.npmjs.com/package/rrweb-cssom) | +| nwsapi | 2.2.22 | MIT | [pkg:npm/nwsapi@2.2.22](https://www.npmjs.com/package/nwsapi) | +| parse-headers | 2.0.6 | MIT | [pkg:npm/parse-headers@2.0.6](https://www.npmjs.com/package/parse-headers) | +| dequal | 2.0.3 | MIT | [pkg:npm/dequal@2.0.3](https://www.npmjs.com/package/dequal) | +| resolve-from | 4.0.0 | MIT | [pkg:npm/resolve-from@4.0.0](https://www.npmjs.com/package/resolve-from) | +| detect-newline | 3.1.0 | MIT | [pkg:npm/detect-newline@3.1.0](https://www.npmjs.com/package/detect-newline) | +| deep-assign | 2.0.0 | MIT | [pkg:npm/deep-assign@2.0.0](https://www.npmjs.com/package/deep-assign) | +| function.prototype.name | 1.1.8 | MIT | [pkg:npm/function.prototype.name@1.1.8](https://www.npmjs.com/package/function.prototype.name) | +| functions-have-names | 1.2.3 | MIT | [pkg:npm/functions-have-names@1.2.3](https://www.npmjs.com/package/functions-have-names) | +| is-date-object | 1.1.0 | MIT | [pkg:npm/is-date-object@1.1.0](https://www.npmjs.com/package/is-date-object) | +| is-function | 1.0.2 | MIT | [pkg:npm/is-function@1.0.2](https://www.npmjs.com/package/is-function) | +| internal-slot | 1.1.0 | MIT | [pkg:npm/internal-slot@1.1.0](https://www.npmjs.com/package/internal-slot) | +| side-channel-map | 1.0.1 | MIT | [pkg:npm/side-channel-map@1.0.1](https://www.npmjs.com/package/side-channel-map) | +| side-channel-weakmap | 1.0.2 | MIT | [pkg:npm/side-channel-weakmap@1.0.2](https://www.npmjs.com/package/side-channel-weakmap) | +| has-tostringtag | 1.0.2 | MIT | [pkg:npm/has-tostringtag@1.0.2](https://www.npmjs.com/package/has-tostringtag) | +| data-view-byte-length | 1.0.2 | MIT | [pkg:npm/data-view-byte-length@1.0.2](https://www.npmjs.com/package/data-view-byte-length) | +| typed-array-length | 1.0.7 | MIT | [pkg:npm/typed-array-length@1.0.7](https://www.npmjs.com/package/typed-array-length) | +| word-wrapper | 1.0.7 | MIT | [pkg:npm/word-wrapper@1.0.7](https://www.npmjs.com/package/word-wrapper) | +| to-readable-stream | 1.0.0 | MIT | [pkg:npm/to-readable-stream@1.0.0](https://www.npmjs.com/package/to-readable-stream) | +| strip-bom | 3.0.0 | MIT | [pkg:npm/strip-bom@3.0.0](https://www.npmjs.com/package/strip-bom) | +| cacheable | 2.1.1 | MIT | [pkg:npm/cacheable@2.1.1](https://www.npmjs.com/package/cacheable) | +| set-function-name | 2.0.2 | MIT | [pkg:npm/set-function-name@2.0.2](https://www.npmjs.com/package/set-function-name) | +| call-bind-apply-helpers | 1.0.2 | MIT | [pkg:npm/call-bind-apply-helpers@1.0.2](https://www.npmjs.com/package/call-bind-apply-helpers) | +| semver | 7.7.3 | ISC | [pkg:npm/semver@7.7.3](https://www.npmjs.com/package/semver) | +| fs.realpath | 1.0.0 | ISC | [pkg:npm/fs.realpath@1.0.0](https://www.npmjs.com/package/fs.realpath) | +| yallist | 3.1.1 | ISC | [pkg:npm/yallist@3.1.1](https://www.npmjs.com/package/yallist) | +| d3-transition | 3.0.1 | ISC | [pkg:npm/d3-transition@3.0.1](https://www.npmjs.com/package/d3-transition) | +| esutils | 2.0.3 | BSD-2-Clause | [pkg:npm/esutils@2.0.3](https://www.npmjs.com/package/esutils) | +| istanbul-lib-coverage | 3.2.2 | BSD-3-Clause | [pkg:npm/istanbul-lib-coverage@3.2.2](https://www.npmjs.com/package/istanbul-lib-coverage) | +| istanbul-lib-source-maps | 5.0.6 | BSD-3-Clause | [pkg:npm/istanbul-lib-source-maps@5.0.6](https://www.npmjs.com/package/istanbul-lib-source-maps) | +| fast-diff | 1.3.0 | Apache-2.0 | [pkg:npm/fast-diff@1.3.0](https://www.npmjs.com/package/fast-diff) | +| lightningcss-win32-x64-msvc | 1.30.2 | MPL-2.0 | [pkg:npm/lightningcss-win32-x64-msvc@1.30.2](https://www.npmjs.com/package/lightningcss) | From 00a0a836ffd8cf000adfc13a3f186a1aade0f5ec Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:34:46 -0500 Subject: [PATCH 11/23] Updated milestones in Readme documentation --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67e8ad1..aaa34b9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,37 @@ For detailed use cases, see [USE_CASES.md](docs/USE_CASES.md) --- ## Road Map -Milestones +Completed Milestones (October) +- User Auth + Frontend: JWT login/signup · React UI · role scaffolding · responsive dashboard +- Audio Upload + Transcription: FastAPI upload · OpenAI Whisper speech-to-text · auto storage +- Transcript Vectorisation + AI Chat: FAISS embeddings · semantic search · LLM drafts user reqs +- NER-driven Graph Build: NER on transcripts extracts entities to create nodes/edges. +- Graph Visualisation: Neo4j + React Flow · nodes (Req/Feat/Test/Stakeholder) · edges (depends/validates/owns) + +Future Milestones (November) +- Save/load conversation sessions +-- session versioning +-- resume interrupted conversations +-- session comparison +-- export conversation history +- Graph Comparison - +-- Compare two graph versions +-- highlight differences +-- merge graphs +-- track evolution over time +- Custom Graph Views & Perspectives +-- Save personalized graph layouts +-- stakeholder-specific views +-- dependency-focused views +-- feature cluster views +-- timeline view +- Software Design Document Generation +-- Automatically generate architecture diagrams from graph structure +-- create component specifications from requirement nodes +-- generate interface designs from relationships +-- produce design rationale from conversation context +-- export design docs in standard formats (Markdown/PDF) + --- From e3828aed62eba39fbd21babb9730fc7bdb62530c Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:36:30 -0500 Subject: [PATCH 12/23] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aaa34b9..1ba5046 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,11 @@ Completed Milestones (October) - Graph Visualisation: Neo4j + React Flow · nodes (Req/Feat/Test/Stakeholder) · edges (depends/validates/owns) Future Milestones (November) -- Save/load conversation sessions --- session versioning --- resume interrupted conversations --- session comparison --- export conversation history +- Save/load conversation sessions + *session versioning + *resume interrupted conversations + *session comparison + *export conversation history - Graph Comparison - -- Compare two graph versions -- highlight differences From 8060a06e83f184eb7fada3ca25dd256451e635fb Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:40:39 -0500 Subject: [PATCH 13/23] Update README.md --- README.md | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 1ba5046..23c1492 100644 --- a/README.md +++ b/README.md @@ -21,29 +21,31 @@ Completed Milestones (October) - NER-driven Graph Build: NER on transcripts extracts entities to create nodes/edges. - Graph Visualisation: Neo4j + React Flow · nodes (Req/Feat/Test/Stakeholder) · edges (depends/validates/owns) + Future Milestones (November) -- Save/load conversation sessions - *session versioning - *resume interrupted conversations - *session comparison - *export conversation history -- Graph Comparison - --- Compare two graph versions --- highlight differences --- merge graphs --- track evolution over time -- Custom Graph Views & Perspectives --- Save personalized graph layouts --- stakeholder-specific views --- dependency-focused views --- feature cluster views --- timeline view -- Software Design Document Generation --- Automatically generate architecture diagrams from graph structure --- create component specifications from requirement nodes --- generate interface designs from relationships --- produce design rationale from conversation context --- export design docs in standard formats (Markdown/PDF) +• Save/load conversation sessions + o session versioning + o resume interrupted conversations + o session comparison + o export conversation history +• Graph Comparison + o Compare two graph versions + o highlight differences + o merge graphs + o track evolution over time +• Custom Graph Views & Perspectives + o Save personalized graph layouts + o Stakeholder-specific views + o Dependency-focused views + o feature cluster views + o timeline view +• Software Design Document Generation + o Automatically generate architecture diagrams from graph structure + o create component specifications from requirement nodes + o generate interface designs from relationships + o produce design rationale from conversation context + o export design docs in standard formats (Markdown/PDF) + --- From 51658fc993484c55b3947ef5dfc1883405ae6685 Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:41:23 -0500 Subject: [PATCH 14/23] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 23c1492..e61994a 100644 --- a/README.md +++ b/README.md @@ -23,23 +23,23 @@ Completed Milestones (October) Future Milestones (November) -• Save/load conversation sessions +- •Save/load conversation sessions o session versioning o resume interrupted conversations o session comparison o export conversation history -• Graph Comparison +- •Graph Comparison o Compare two graph versions o highlight differences o merge graphs o track evolution over time -• Custom Graph Views & Perspectives +- •Custom Graph Views & Perspectives o Save personalized graph layouts o Stakeholder-specific views o Dependency-focused views o feature cluster views o timeline view -• Software Design Document Generation +- •Software Design Document Generation o Automatically generate architecture diagrams from graph structure o create component specifications from requirement nodes o generate interface designs from relationships From a44653865901cdb736f8ad07b884490b3a5318bd Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:43:05 -0500 Subject: [PATCH 15/23] Update README.md --- README.md | 67 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index e61994a..365f5eb 100644 --- a/README.md +++ b/README.md @@ -14,37 +14,42 @@ For detailed use cases, see [USE_CASES.md](docs/USE_CASES.md) --- ## Road Map -Completed Milestones (October) -- User Auth + Frontend: JWT login/signup · React UI · role scaffolding · responsive dashboard -- Audio Upload + Transcription: FastAPI upload · OpenAI Whisper speech-to-text · auto storage -- Transcript Vectorisation + AI Chat: FAISS embeddings · semantic search · LLM drafts user reqs -- NER-driven Graph Build: NER on transcripts extracts entities to create nodes/edges. -- Graph Visualisation: Neo4j + React Flow · nodes (Req/Feat/Test/Stakeholder) · edges (depends/validates/owns) - - -Future Milestones (November) -- •Save/load conversation sessions - o session versioning - o resume interrupted conversations - o session comparison - o export conversation history -- •Graph Comparison - o Compare two graph versions - o highlight differences - o merge graphs - o track evolution over time -- •Custom Graph Views & Perspectives - o Save personalized graph layouts - o Stakeholder-specific views - o Dependency-focused views - o feature cluster views - o timeline view -- •Software Design Document Generation - o Automatically generate architecture diagrams from graph structure - o create component specifications from requirement nodes - o generate interface designs from relationships - o produce design rationale from conversation context - o export design docs in standard formats (Markdown/PDF) + + +### Completed Milestones (October) +- **User Auth + Frontend:** JWT login/signup, React UI, role scaffolding, responsive dashboard +- **Audio Upload + Transcription:** FastAPI upload, OpenAI Whisper speech-to-text, auto storage +- **Transcript Vectorisation + AI Chat:** FAISS embeddings, semantic search, LLM drafts user requirements +- **NER-driven Graph Build:** NER on transcripts extracts entities to create nodes/edges +- **Graph Visualisation:** Neo4j + React Flow (nodes: Req/Feat/Test/Stakeholder; edges: depends/validates/owns) + +### Future Milestones (November) +- **Save/Load Conversation Sessions** + - Session versioning + - Resume interrupted conversations + - Session comparison + - Export conversation history + +- **Graph Comparison** + - Compare two graph versions + - Highlight differences + - Merge graphs + - Track evolution over time + +- **Custom Graph Views & Perspectives** + - Save personalized graph layouts + - Stakeholder-specific views + - Dependency-focused views + - Feature cluster views + - Timeline view + +- **Software Design Document Generation** + - Automatically generate architecture diagrams from graph structure + - Create component specifications from requirement nodes + - Generate interface designs from relationships + - Produce design rationale from conversation context + - Export design docs in standard formats (Markdown/PDF) + From 538ee61bcf6d79afe9b8c964418200732a035c4e Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:48:17 -0500 Subject: [PATCH 16/23] Update AboutView.jsx --- frontend/src/pages/AboutView.jsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/frontend/src/pages/AboutView.jsx b/frontend/src/pages/AboutView.jsx index 899d2b1..61bfeb1 100644 --- a/frontend/src/pages/AboutView.jsx +++ b/frontend/src/pages/AboutView.jsx @@ -129,16 +129,6 @@ function AboutView() { 🚀 Quick Start Tutorial -
  • - - 💡 Usage Guide - -
  • Date: Thu, 6 Nov 2025 16:51:08 -0500 Subject: [PATCH 17/23] Update README.md Added video demo --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 365f5eb..8bf645a 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,10 @@ npm run dev ## ReqTrace Demo Watch a quick video of ReqTrace in action! +![REQTRACE Demo Preview](assets/demo-preview.png) + +[![Watch the Demo on Google Drive](https://img.shields.io/badge/Watch%20REQTRACE%20Demo-Click%20Here-blue?style=for-the-badge&logo=google-drive)](https://drive.google.com/file/d/1XiaWd48iLaMvRkev5WwzB4xIv7sPceyf/view?usp=drive_link) + --- From 8726378e4bef1da2066be31a39805a5a922760ce Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 16:51:41 -0500 Subject: [PATCH 18/23] Update README.md Fixed video demo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bf645a..25be672 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ npm run dev ## ReqTrace Demo Watch a quick video of ReqTrace in action! -![REQTRACE Demo Preview](assets/demo-preview.png) + [![Watch the Demo on Google Drive](https://img.shields.io/badge/Watch%20REQTRACE%20Demo-Click%20Here-blue?style=for-the-badge&logo=google-drive)](https://drive.google.com/file/d/1XiaWd48iLaMvRkev5WwzB4xIv7sPceyf/view?usp=drive_link) From 9423c8261ec7ba2c69b9ff640e819f538a7b6033 Mon Sep 17 00:00:00 2001 From: ruju4a Date: Thu, 6 Nov 2025 16:55:17 -0500 Subject: [PATCH 19/23] Updated frontend --- frontend/src/components/GraphVisualization.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/GraphVisualization.jsx b/frontend/src/components/GraphVisualization.jsx index 07f749e..e2a34b9 100644 --- a/frontend/src/components/GraphVisualization.jsx +++ b/frontend/src/components/GraphVisualization.jsx @@ -17,7 +17,7 @@ function GraphVisualization({ graphData, graphReady, transcriptId }) { const [err, setErr] = useState(null); const fgRef = useRef(); - const views = ['All Nodes', 'Stakeholder Impact', 'Feature Clusters']; + const views = ['All Nodes']; const toggleFilter = (filterName) => { setActiveFilters((prev) => ({ ...prev, [filterName]: !prev[filterName] })); @@ -272,4 +272,4 @@ function GraphVisualization({ graphData, graphReady, transcriptId }) { ); } -export default GraphVisualization; \ No newline at end of file +export default GraphVisualization; From bd2ea4ec14f12bacd52a4ba252647340dd64bb0b Mon Sep 17 00:00:00 2001 From: ruju4a Date: Thu, 6 Nov 2025 16:57:24 -0500 Subject: [PATCH 20/23] Updated frontend --- frontend/src/components/GraphVisualization.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/GraphVisualization.jsx b/frontend/src/components/GraphVisualization.jsx index e2a34b9..5281b41 100644 --- a/frontend/src/components/GraphVisualization.jsx +++ b/frontend/src/components/GraphVisualization.jsx @@ -17,7 +17,7 @@ function GraphVisualization({ graphData, graphReady, transcriptId }) { const [err, setErr] = useState(null); const fgRef = useRef(); - const views = ['All Nodes']; + const views = ['All Nodes', 'Stakeholder Impact', 'Feature Clusters']; const toggleFilter = (filterName) => { setActiveFilters((prev) => ({ ...prev, [filterName]: !prev[filterName] })); From f3f975eca60b3e19946a3d2601dd142b76220f8a Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 16:59:21 -0500 Subject: [PATCH 21/23] Update API.md updated api documentation --- docs/API.md | 349 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 348 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index ca71d94..8e917f8 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1 +1,348 @@ -Enpoint Documentation (with Postman maybe?) \ No newline at end of file +# ReqTrace Graph Backend — API Reference + +This document summarizes the HTTP API exposed by the backend. It lists endpoints, methods, expected request parameters and bodies, and response shapes. + +--- + +## Root + +- GET / + +Description: Basic health message indicating the API is running. + +Response (200): +```json +{ "message": "ReqTrace Graph Backend API is running!" } +``` + +--- + +## Health + +- GET /health + +Description: lightweight health check endpoint. + +Response (200): +```json +{ "status": "OK" } +``` + +--- + +## Transcription / FAISS + +### POST /transcribe + +Description: Upload an audio file. The server transcribes it with Whisper, runs NER to extract entities/relationships, writes results to Neo4j (idempotent), indexes transcription into FAISS, and returns the generated conversation/recording id and graph data. + +Request: +- Content-Type: multipart/form-data +- Form field: `file` — audio file (UploadFile). Example: `file=@meeting.mp3` + +Successful Response (200): +```json +{ + "message": "✅ Transcription successful for meeting.mp3", + "audio_id": "", + "conversation_id": "rec_", + "graph_data": { + "nodes": [ { "id": "feature.checkout_rec_", "label": "Feature", "props": { ... } }, ... ], + "links": [ { "type": "depends_on", "source": "...", "target": "...", "props": { ... } }, ... ] + }, + "entry": { + "id": 1, + "conversation_id": "rec_", + "audio_id": "", + "filename": "meeting.mp3", + "text": "transcribed text...", + "timestamp": "2025-11-06 12:34:56", + "ner": { "entities": [...], "relationships": [...] }, + "neo4j_write": { ... } + } +} +``` + +Error Response (400/500): +```json +{ "error": "❌ Transcription failed: " } +``` + +Notes: +- Duplicate audio is detected using an audio content hash (`audio_id`). When duplicate, the response includes `skipped: true` and returns the existing `conversation_id` and `graph_data`. +- The NER output contains `entities` and `relationships` arrays; both are tagged with `recording_id` and `audio_id` when stored. + +--- + +### GET /transcriptions + +Description: Return all transcriptions kept in an in-memory list during the process lifetime. + +Response (200): +```json +{ "count": , "transcriptions": [ { }, ... ] } +``` + +--- + +### GET /search + +Description: Search transcription index (FAISS) for similar transcript fragments. + +Query Parameters: +- `q` (string, required): search query text +- `top_k` (int, optional, default=3): number of similar results to return + +Response (200): +```json +{ "query": "payment fails", "results": [ { "id": ..., "text": "...", "score": 0.83 }, ... ] } +``` + +Error Response: +```json +{ "error": "Search failed: " } +``` + +--- + +### POST /rebuild + +Description: Rebuild the FAISS index from in-memory transcriptions. Useful during development. + +Response (200): +```json +{ "message": "✅ Rebuilt FAISS index with entries" } +``` + +Error (500): +```json +{ "error": "❌ Rebuild failed: " } +``` + +--- + +## Conversation / Chat + +### POST /chat + +Description: Accepts a JSON body with a `query` string, uses FAISS to fetch context chunks, then calls OpenAI Chat Completions to answer using the context. + +Request Body (application/json): +```json +{ "query": "How do stakeholders affect checkout?" } +``` + +Response (200): +```json +{ + "query": "How do stakeholders affect checkout?", + "answer": "", + "context_used": [ {"id": ..., "text": "...", "score": ...}, ... ] +} +``` + +Errors: +- 400 when `query` is missing. +- 500 on internal failure; full stack is printed to server logs and HTTP 500 returned with the error string. + +Notes: +- The endpoint uses the `openai` client from the OpenAI SDK and requires `OPENAI_API_KEY` present in `.env`. +- The model used in code is `gpt-4o-mini` (update as needed). + +--- + +## Graph endpoints + +All graph endpoints are under `/api/graph` and return `GraphResponse` JSON objects with structure `{ "nodes": [Node], "links": [Link] }` where `Node` is `{id, label, props}` and `Link` is `{type, source, target, props}`. + +### GET /api/graph/all + +Description: Fetch all nodes and relationships across the entire graph database. +Query parameters: +- `limit` (int, optional, default=5000) + +Response (200): GraphResponse + +### GET /api/graph/stakeholders/overview + +Description: Overview subgraph for nodes with label `Stakeholder`. +Query parameters: +- `limit` (int, optional, default=200) + +Response (200): GraphResponse + +### GET /api/graph/features/overview + +Description: Overview for nodes labeled `Feature`. +Query parameters: +- `limit` (int, optional, default=200) + +Response (200): GraphResponse + +### GET /api/graph/stakeholders/neighborhood + +Description: Neighborhood subgraph centered on a stakeholder node id. +Query parameters: +- `id` (string, required): center node id (example: `stakeholder.pm`) +- `k` (int, default=1): number of hops +- `limit` (int, default=500) + +Responses: +- 200: GraphResponse +- 404: { "detail": "No nodes found around id=" } + +### GET /api/graph/features/neighborhood + +Same as stakeholders/neighborhood but with label `Feature`. + +### GET /api/graph/conversation/{conversation_id} + +Path parameter: +- `conversation_id` (string): conversation/recording ID (e.g., `rec_`) +Query params: +- `limit` (int, default=2000) + +Responses: +- 200: GraphResponse scoped to records with `recording_id` equal to the provided `conversation_id`. +- 404: { "detail": "No nodes found for conversation " } + +--- + +## Models / Schemas (summary) + +- Node +```json +{ "id": "string", "label": "string", "props": { "key": "value", ... } } +``` + +- Link +```json +{ "type": "string", "source": "string", "target": "string", "props": { ... } } +``` + +- GraphResponse +```json +{ "nodes": [Node], "links": [Link] } +``` + +--- + +## Notes & caveats +- Many endpoints perform network or heavy CPU work (Whisper, OpenAI, Neo4j, FAISS). Use asynchronous client calls and timeouts in production. +- `/transcribe` uses `whisper` model (currently loads `tiny`), which is memory/CPU intensive; consider running OCR/Transcription as a background job. +- `/chat` requires a valid `OPENAI_API_KEY` set in the `.env` file. + +If you want, I can: +- Add examples for each request using curl and HTTPie +- Export this API to `docs/API.md` in repo root or generate an OpenAPI YAML file and commit it +- Generate a Postman collection or an OpenAPI-based `swagger.yaml` + +--- + +## Examples (curl & HTTPie) + +Below are practical examples you can run against a running server on http://localhost:8000. + +1) Transcribe an audio file (curl): + +```bash +curl -X POST "http://localhost:8000/transcribe" -F "file=@/path/to/meeting.mp3" +``` + +1b) Transcribe (HTTPie): + +```bash +http --form POST http://localhost:8000/transcribe file@/path/to/meeting.mp3 +``` + +Example response (success): + +```json +{ + "message": "✅ Transcription successful for meeting.mp3", + "audio_id": "", + "conversation_id": "rec_", + "graph_data": {"nodes": [...], "links": [...]}, + "entry": { ... } +} +``` + +2) List transcriptions: + +```bash +curl http://localhost:8000/transcriptions +# or +http GET http://localhost:8000/transcriptions +``` + +3) Search transcripts: + +```bash +curl "http://localhost:8000/search?q=payment+fails&top_k=5" +# or +http GET http://localhost:8000/search q=="payment fails" top_k==5 +``` + +4) Rebuild FAISS index: + +```bash +curl -X POST http://localhost:8000/rebuild +# or +http POST http://localhost:8000/rebuild +``` + +5) Chat with context: + +```bash +curl -X POST http://localhost:8000/chat -H "Content-Type: application/json" -d '{"query":"How do stakeholders affect checkout?"}' +# or +http POST http://localhost:8000/chat query="How do stakeholders affect checkout?" +``` + +6) Graph endpoints (examples): + +```bash +# Fetch all graph +curl "http://localhost:8000/api/graph/all?limit=1000" + +# Fetch stakeholder neighborhood +curl "http://localhost:8000/api/graph/stakeholders/neighborhood?id=stakeholder.pm&k=2&limit=500" +``` + +## OpenAPI YAML — what it gives you and how to generate/use it + +What you can do with an OpenAPI YAML file +- Generate client SDKs (TypeScript, Python, Java, etc.) using OpenAPI Generator or `openapi-generator`. +- Import into tools like Postman or Insomnia to run and explore the API. +- Serve interactive docs (Swagger UI / ReDoc) or host the spec at a known URL for integrations. + +How to get/generate the OpenAPI YAML from this app +- FastAPI exposes OpenAPI JSON at `/openapi.json` and interactive docs at `/docs` by default. +- This project now provides `/openapi.yaml` (if PyYAML/PyYAML is installed) which returns the YAML representation. If your running environment doesn't have PyYAML, run: + +```bash +pip install PyYAML +``` + +Then fetch the YAML: + +```bash +curl http://localhost:8000/openapi.yaml -o openapi.yaml +``` + +Using the YAML +- Generate clients with OpenAPI Generator: + +```bash +# install openapi-generator or use docker +openapi-generator-cli generate -i openapi.yaml -g python -o ./client-python +``` + +- Import into Postman: `File -> Import -> Upload openapi.yaml`. +- Serve Swagger UI locally from the YAML using `swagger-ui` or `redoc-cli`: + +```bash +npx redoc-cli serve openapi.yaml +# or +npx swagger-ui-dist openapi.yaml +``` From 9414e77d156490d71e5752d2ab9d0e28c00eb48b Mon Sep 17 00:00:00 2001 From: aayushimasurekar Date: Thu, 6 Nov 2025 17:01:48 -0500 Subject: [PATCH 22/23] Changing install.md --- docs/INSTALL.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 0e1d240..810bfda 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -47,19 +47,26 @@ This document provides step-by-step instructions to install, configure, run, and 1. Create & activate virtual environment ```bash - cd backend - python3 -m venv .venv - source .venv/bin/activate + For Conda installation, open MacOs terminal + curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh + bash Miniforge3-MacOSX-arm64.sh + + + Open a new terminal in your IDE and run: + ls ~/miniforge3/bin/conda + ~/miniforge3/bin/conda init zsh + conda create -n se_project python=3.11 faiss-cpu -c conda-forge + conda activate se_project ``` 2. Install Python dependencies ```bash - pip install --upgrade pip + pip install --upgrade pip pip install -r requirements.txt brew install ffmpeg - python -m spacy download en_core_web_sm - python -m coreferee install en + pip install python-multipart + pip install deepmultilingualpunctuation /Applications/Python\ 3.11/Install\ Certificates.command ``` @@ -87,9 +94,10 @@ This document provides step-by-step instructions to install, configure, run, and pip install pip install -r requirements.txt - python -m spacy download en_core_web_sm python -m coreferee install en brew install ffmpeg + pip install python-multipart + pip install deepmultilingualpunctuation From 5c0bf15b3c42b3992b487972a0bb0011401931aa Mon Sep 17 00:00:00 2001 From: AnushaU1111 <154939858+AnushaU1111@users.noreply.github.com> Date: Thu, 6 Nov 2025 17:03:24 -0500 Subject: [PATCH 23/23] Create openapi.yaml Open api documentation --- backend/openapi.yaml | 474 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 474 insertions(+) create mode 100644 backend/openapi.yaml diff --git a/backend/openapi.yaml b/backend/openapi.yaml new file mode 100644 index 0000000..8e5004f --- /dev/null +++ b/backend/openapi.yaml @@ -0,0 +1,474 @@ +openapi: 3.1.0 +info: + title: ReqTrace Graph Backend + description: API for conversation, graph, stats, and health endpoints + version: 1.0.0 +paths: + /conversation/chat: + post: + tags: + - conversation + summary: Chat With Context + description: Handles chat queries using FAISS context + OpenAI (new SDK). + operationId: chat_with_context_conversation_chat_post + requestBody: + content: + application/json: + schema: + type: object + title: Payload + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /api/graph/all: + get: + tags: + - graph + - graph + summary: All Graph + description: Fetch all nodes and relationships across the entire graph database. + operationId: all_graph_api_graph_all_get + parameters: + - required: false + schema: + type: integer + maximum: 10000.0 + minimum: 100.0 + title: Limit + default: 5000 + name: limit + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GraphResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /api/graph/stakeholders/overview: + get: + tags: + - graph + - graph + summary: Stakeholders Overview + operationId: stakeholders_overview_api_graph_stakeholders_overview_get + parameters: + - required: false + schema: + type: integer + maximum: 2000.0 + minimum: 1.0 + title: Limit + default: 200 + name: limit + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GraphResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /api/graph/features/overview: + get: + tags: + - graph + - graph + summary: Features Overview + operationId: features_overview_api_graph_features_overview_get + parameters: + - required: false + schema: + type: integer + maximum: 2000.0 + minimum: 1.0 + title: Limit + default: 200 + name: limit + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GraphResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /api/graph/stakeholders/neighborhood: + get: + tags: + - graph + - graph + summary: Stakeholder Neighborhood + operationId: stakeholder_neighborhood_api_graph_stakeholders_neighborhood_get + parameters: + - description: Center node id, e.g., stakeholder.pm + required: true + schema: + type: string + title: Id + description: Center node id, e.g., stakeholder.pm + name: id + in: query + - required: false + schema: + type: integer + maximum: 5.0 + minimum: 1.0 + title: K + default: 1 + name: k + in: query + - required: false + schema: + type: integer + maximum: 5000.0 + minimum: 10.0 + title: Limit + default: 500 + name: limit + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GraphResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /api/graph/features/neighborhood: + get: + tags: + - graph + - graph + summary: Feature Neighborhood + operationId: feature_neighborhood_api_graph_features_neighborhood_get + parameters: + - description: Center node id, e.g., feature.checkout + required: true + schema: + type: string + title: Id + description: Center node id, e.g., feature.checkout + name: id + in: query + - required: false + schema: + type: integer + maximum: 5.0 + minimum: 1.0 + title: K + default: 1 + name: k + in: query + - required: false + schema: + type: integer + maximum: 5000.0 + minimum: 10.0 + title: Limit + default: 500 + name: limit + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GraphResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /api/graph/conversation/{conversation_id}: + get: + tags: + - graph + - graph + summary: Conversation Graph + description: 'Fetch graph scoped to a specific conversation/recording ID. + + Returns only nodes and relationships tagged with that recording_id.' + operationId: conversation_graph_api_graph_conversation__conversation_id__get + parameters: + - required: true + schema: + type: string + title: Conversation Id + name: conversation_id + in: path + - required: false + schema: + type: integer + maximum: 10000.0 + minimum: 1.0 + title: Limit + default: 2000 + name: limit + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/GraphResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /health/health: + get: + tags: + - health + summary: Health Check + operationId: health_check_health_health_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + /transcribe/transcribe: + post: + tags: + - transcribe + - Transcription + summary: Transcribe Audio + description: 'Transcribes an uploaded audio file using Whisper, + + runs NER to extract entities/relationships, + + tags them with a unique recording_id and audio_id, + + writes the graph to Neo4j, + + persists transcription in FAISS vector store, + + and returns the conversation_id for scoped graph queries.' + operationId: transcribe_audio_transcribe_transcribe_post + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_transcribe_audio_transcribe_transcribe_post' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /transcribe/transcriptions: + get: + tags: + - transcribe + - Transcription + summary: Get All Transcriptions + operationId: get_all_transcriptions_transcribe_transcriptions_get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + /transcribe/search: + get: + tags: + - transcribe + - Transcription + summary: Search Transcriptions + operationId: search_transcriptions_transcribe_search_get + parameters: + - description: Search query for transcript similarity + required: true + schema: + type: string + title: Q + description: Search query for transcript similarity + name: q + in: query + - description: Number of most similar results to return + required: false + schema: + type: integer + title: Top K + description: Number of most similar results to return + default: 3 + name: top_k + in: query + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /transcribe/rebuild: + post: + tags: + - transcribe + - Transcription + summary: Rebuild Faiss Index + operationId: rebuild_faiss_index_transcribe_rebuild_post + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + /: + get: + tags: + - root + summary: Root + operationId: root__get + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} +components: + schemas: + Body_transcribe_audio_transcribe_transcribe_post: + properties: + file: + type: string + format: binary + title: File + type: object + required: + - file + title: Body_transcribe_audio_transcribe_transcribe_post + GraphResponse: + properties: + nodes: + items: + $ref: '#/components/schemas/Node' + type: array + title: Nodes + links: + items: + $ref: '#/components/schemas/Link' + type: array + title: Links + type: object + required: + - nodes + - links + title: GraphResponse + HTTPValidationError: + properties: + detail: + items: + $ref: '#/components/schemas/ValidationError' + type: array + title: Detail + type: object + title: HTTPValidationError + Link: + properties: + type: + type: string + title: Type + source: + type: string + title: Source + target: + type: string + title: Target + props: + type: object + title: Props + type: object + required: + - type + - source + - target + title: Link + Node: + properties: + id: + type: string + title: Id + label: + type: string + title: Label + props: + type: object + title: Props + type: object + required: + - id + - label + title: Node + ValidationError: + properties: + loc: + items: + anyOf: + - type: string + - type: integer + type: array + title: Location + msg: + type: string + title: Message + type: + type: string + title: Error Type + type: object + required: + - loc + - msg + - type + title: ValidationError