AOSSIE-Org / AOSSIE-Org/BabyNest

BUG: Generated files are tracked and required runtime dependencies are missing

未關閉
#241 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
56
分支
124
PR 合併指標
30 天內沒有已合併 PR

描述

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

## 📌 Issue Overview

Several generated, environment-specific, and machine-specific files are tracked because the repository's `.gitignore` rules are incomplete.

These include frontend environment configuration, ChromaDB data, backend cache files, editor settings, macOS metadata, and Bundler configuration. Tracking these files creates unnecessary changes, repository bloat, configuration conflicts, and a risk of exposing sensitive values.

Additionally, runtime dependencies already used by the application are missing from the dependency manifests:

- The frontend uses AsyncStorage but does not declare `@react-native-async-storage/async-storage`.
- The backend imports ChromaDB but does not declare `chromadb` in `requirements.txt`.

Consequently, a fresh installation can fail even after installing all declared dependencies.

## 🔍 Steps to Reproduce

### Generated and tracked files

1. Clone the repository.
2. Install and run the frontend and backend.
3. Configure the frontend `.env` file and run ChromaDB-dependent features.
4. Open the project in VS Code or on macOS.
5. Run `git status`.
6. Observe generated or machine-specific files being tracked or appearing as changes.

### Missing dependencies

1. Install the frontend dependencies using `npm install`.
2. Run the React Native application.
3. Observe that AsyncStorage cannot be resolved because it is missing from `package.json`.
4. Install the backend dependencies using `pip install -r requirements.txt`.
5. Run the backend functionality that imports ChromaDB.
6. Observe `ModuleNotFoundError: No module named 'chromadb'`.

## 🎯 Expected Behavior

Generated databases, caches, environment files, virtual environments, editor settings, and machine-specific configuration should be ignored by Git.

Running or configuring the project should not create unrelated changes in the working tree.

All runtime dependencies used by the frontend and backend should be declared and pinned in their respective dependency manifests so a fresh installation can run successfully.

## 🚨 Actual Behavior

The repository tracks files such as:

- `.DS_Store`
- `.vscode/`
- `Frontend/.env`
- `Frontend/.bundle/config`
- `Backend/db/chromadb/chroma.sqlite3`
- `Backend/cache/context_default.json`
- `Backend/tests/cache/context_default.json`

The backend `.gitignore` also contains incomplete patterns for Python virtual environments, bytecode, databases, and cache directories.

Additionally:

- `@react-native-async-storage/async-storage` is missing from `Frontend/package.json`.
- `chromadb` is missing from `Backend/requirements.txt`.
- Installing the declared dependencies alone does not provide every module required by the application.

## 📷 Screenshot

Tracked generated and environment-specific files

## 💡 Suggested Improvements

- Add `.DS_Store` and `.vscode/` to the root `.gitignore`.
- Ignore `.venv/`, `venv/`, `env/`, `__pycache__/`, and `*.py[cod]`.
- Ignore backend SQLite databases, ChromaDB data, and generated cache directories.
- Ignore `Frontend/.bundle/`.
- Remove already tracked generated and environment-specific files from the Git index.
- Keep only reproducible source code and safe configuration templates under version control.
- Add `@react-native-async-storage/async-storage@2.1.2` to the frontend dependencies.
- Synchronize `Frontend/package-lock.json`.
- Declare the required ChromaDB dependency in `Backend/requirements.txt`.
- Normalize `Backend/requirements.txt` to UTF-8.

> [!WARNING]
> Security scanners currently report critical advisories affecting `chromadb==1.5.9`, with no patched release available. The selected ChromaDB version should therefore receive maintainer review and the alerts should not be suppressed.

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

Start by reviewing the root .gitignore, the backend ignore rules, Frontend/package.json, Frontend/package-lock.json, and Backend/requirements.txt, then reproduce the clean-install and git-status steps from the issue. Check the listed tracked files and dependency imports before making changes. Done means generated and machine-specific files no longer appear as changes and fresh frontend and backend installs declare the runtime dependencies, with the ChromaDB security warning reviewed by a maintainer.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
git, javascript, python, react-native
領域
backend, full-stack, mobile-dev, tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。