AOSSIE-Org / AOSSIE-Org/BabyNest

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

Aperta
#241 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
56
Fork
123
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.