Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ def index():
task_db = get_tasks()
return appointment_db

@app.route('/health')
def health():
return jsonify({
'status': 'ok',
'agent_initialized': agent is not None
})

if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
app.run(host='0.0.0.0', port=5000, debug=False)


Binary file modified Backend/requirements.txt
Binary file not shown.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
- **AI & NLP**: Python, LangChain
- **Database**: SQLite

## Quick Start

1. Clone the repository and navigate to the project directory.
2. For frontend: `cd Frontend && npm install && npx react-native run-android` (or `run-ios`).
3. For backend: `cd Backend && python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt && python app.py`.

For detailed setup instructions, see [Setup.md](Setup.md).

## Usage

- Open the mobile app on an emulator or device.
Expand Down
39 changes: 25 additions & 14 deletions Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,37 @@ npx react-native run-ios

## Backend Setup (Offline Flask API)

BabyNest includes an offline backend using Flask

### 6) Install Python Dependencies

```sh
cd Backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
BabyNest includes an offline backend using Flask with ChromaDB for vector search.

### Prerequisites
- Python 3.12+
- Virtual environment (venv)

### Installation
1. Navigate to the Backend directory:
```
cd Backend
```
2. Create and activate a virtual environment:
```
python -m venv .venv
source .venv/bin/activate
```
3. Install dependencies:
```
pip install -r requirements.txt
```

### Running the Backend
Start the server with:
```

### 7) Run the Backend Locally

```sh
cd Backend
python app.py
```

This will start the API locally.

The server will run on http://127.0.0.1:5000. Check `/health` for status.

Comment on lines 120 to 152
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Document the SKIP_AGENT_INIT environment variable for fast dev mode.

The PR objectives require documenting "Full Mode" vs. "Fast Dev Mode" with instructions for using SKIP_AGENT_INIT=1, but this section only shows basic startup. Developers need to know how to skip agent initialization during development.

Add documentation for the development mode:

 ### Running the Backend
-Start the server with:
+Start the server:
+
+**Full Mode (with Agent):**

python app.py

-The server will run on http://127.0.0.1:5000. Check /health for status.
+
+**Fast Dev Mode (skip Agent initialization):**
+```
+SKIP_AGENT_INIT=1 python app.py
+```
+
+The server will run on <http://127.0.0.1:5000>. Check `/health` for status.

This also resolves the bare URL warning by using angle brackets.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

102-102: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


106-106: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


111-111: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


117-117: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


120-120: Bare URL used

(MD034, no-bare-urls)

---

## Handling Vector Search (ChromaDB)
Expand Down