# Project export: HealthChain

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 11.0
- Tagline: HealthChain is your personal AI dietary trainer that uses emotional intelligence for real-time nutrition suggestions that help users stay committed to their dietary goals and healthy lifestyle!
- Devpost: https://devpost.com/software/healthchain-0t4n2j
- GitHub: https://github.com/addychen2/flexbot3000
- Video: https://www.youtube.com/embed/Hhrw1plxoWw?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 4 GitHub contributor(s) — dwstan (40 commits), Addy Chen (39 commits), sanityl0st (39 commits), Joshua Jiaxin Liu (3 commits)

## Devpost submission (written by the team)

### Overview

Staying healthy doesn’t have to feel like a daily battle. HealthChain goes beyond the standard fitness and nutrition apps. It’s not just another diet plan or workout routine—it's your dedicated partner, powered by the latest emotional intelligence technology, designed to help you stay on track, even when life tries to pull you away from your goals. Emotionally Responsive AI: Like a Friend Who Really Gets You Unlike typical AI trainers that just dish out cookie-cutter advice, HealthChain uses emotional AI to tune into your feelings and motivations. Imagine having a coach who knows when you’re feeling unmotivated or stressed and provides the right encouragement at the perfect moment. It senses when you’re struggling and adapts your training plan accordingly, keeping you engaged, uplifted, and less likely to fall off the wagon. This human-like touch means that you’re not just following a diet plan—you’re building a new lifestyle, with genuine support that meets you where you are. No More Generic Advice—Get Personalized Feedback That Actually Works HealthChain dives deep into your unique habits, tendencies, and goals to provide hyper-personalized feedback. The AI learns what triggers your cravings, what times of day you’re most motivated, and even the moments when you’re likely to slip up. By creating a plan tailored specifically for you, it helps break down your bigger health goals into manageable milestones and celebrates every win along the way—no matter how small. Stay Accountable Without the Guilt We all know what it’s like to cheat on a diet or miss a workout and feel the guilt afterward. HealthChain doesn’t believe in guilt trips. Instead, it uses emotionally intelligent responses to help you acknowledge setbacks and move past them quickly, keeping your focus on progress rather than perfection. It learns from your experiences to adjust future plans in ways that make your goals feel achievable again. Powered by Hume.ai Technology for Deeper Motivation HealthChain’s integration with Hume.ai enables it to assess your emotional state through every interaction, from tracking your food intake to post-workout check-ins. It understands the why behind your actions, which lets it go beyond just being a trainer—HealthChain becomes the emotional ally that helps you stay committed to your health journey. Why HealthChain? Emotionally Intelligent: Goes beyond the numbers and workouts to connect with you on a deeper level. Real-Time Adaptation: Recognizes when you're at risk of falling off track and provides the right nudge. Celebrates Milestones: Keeps you motivated by acknowledging your progress. Non-Judgmental Support: Helps you recover from setbacks with understanding, not guilt. Join HealthChain and redefine what’s possible with a personal trainer that understands not just your fitness goals, but you. Staying healthy doesn’t have to feel like a daily battle anymore. Our Journey with HealthChain: Building a Personal AI Trainer🗺️

### Inspiration

✨ The inspiration for HealthChain came from our belief that staying healthy doesn’t have to feel like a daily battle. We wanted to create a solution that transcends traditional fitness apps by offering real emotional support and personalized guidance. What It Does🔍 HealthChain is your dedicated AI personal trainer, powered by Hume.ai emotional intelligence technology. It adapts to your feelings and motivations, providing personalized fitness and nutrition plans with the help of Google Gemini's parsing and structured data features. Unlike typical AI trainers that offer generic advice, HealthChain understands when you're unmotivated or stressed, offering timely encouragement to keep you on track.

### How we built it

👷🏼‍♀️ We built HealthChain by integrating with Hume.ai EVI 2's emotional analysis capabilities. This allows the platform to assess users' emotional states and requests in real time and adjust dietary plans and goals accordingly. .

### Challenges we ran into

🔨 This was some our team's first time ever working with AI so the learning curve of how to utilize the best parts of the various AIs we used and how to make them work together was one of our biggest challenge. We also needed to address privacy concerns surrounding emotional data, ensuring users felt secure while using the app. One last major challenge was deployment, where we had to assets the differences between running locally with Vercel and online with AWS and how to essentially fix all the bugs associated with deployment

### Accomplishments we're proud of

⭐ We are proud to have created a platform that truly understands users as individuals. HealthChain not only helps users achieve their fitness goals but also celebrates every milestone, fostering a positive and supportive experience. These accomplishments encompass learning how to extract and parse data outputs Gemini and Hume as well as tailoring and personalizing our Hume AI.

### What we learned

📖 We learned a lot about new and innovative AI models and how to effectively chain, prompt, and extract meaningful data with large language models to accomplish our goals. We also were able to gain a better understanding on how user's emotions and experiences can translate to greater motivation and commitment. Outside of our technical discoveries, we also learned a lot about each other, as this is the first time we've ever met and worked together.

### What's next

🔮 Our goal is to continue evolving the platform to offer even deeper insights and support, making health and wellness accessible and enjoyable for everyone. Features we hope to implement in the future would be the ability for user to specifically tailor their AI trainer's personality, a calendar feature that allows users to easily choose a date and view what and when they ate, a great mobile interface and wearable technologies for better accessibility and convenience, and allowing users to submit feedback on our FAQ section.

## README (from the GitHub repository)

<div align="center">
  <img src="public/logo.png">
</div>



![Preview](preview.png)


# HealthChain

## Overview
HealthChain is your dedicated AI personal trainer, powered by Hume.ai emotional intelligence technology. It adapts to your feelings and motivations, providing personalized fitness and nutrition plans with the help of Google Gemini's parsing and structured data features. Unlike typical AI trainers that offer generic advice, HealthChain understands when you're unmotivated or stressed, offering timely encouragement to keep you on track.

## **Authors and Acknowledgment**

HealthChain was created by **[Addy](https://github.com/addychen2), [Derek](https://github.com/dwstan), [Joshua](https://github.com/NumerousJLs), and [Steven](https://github.com/sanityl0st),**.


## Project Local Run Instructions
```
npm install
npm run dev
```

## .env Setup
Make sure to create a .env file and fill it with the stuff from discord
```
HUME_API_KEY=
HUME_SECRET_KEY=
NEXT_PUBLIC_HUME_CONFIG_ID=

GEMINI_API_KEY=
```

## Project deployment

Click the button below to deploy this example project with Vercel:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhumeai%2Fhume-evi-next-js-starter&env=HUME_API_KEY,HUME_SECRET_KEY)

Below are the steps to completing deployment:

1. Create a Git Repository for your project.
2. Provide the required environment variables. To get your API key and Client Secret key, log into the portal and visit the [API keys page](https://beta.hume.ai/settings/keys).

## Deployment Bug Commands

```
# if node version if out of date
nvm install node

corepack enable pnpm     

pnpm install
# or
pnpm install --no-frozen-lockfile
```

## Support

If you have questions, require assistance, or wish to engage in discussions pertaining to this starter template, [please reach out to us on Discord](https://link.hume.ai/discord).


## Setting Up the Backend

To set up the backend, follow these steps:

1. **Create a Virtual Environment**:
  ```bash
  python3 -m venv venv
  ```

2. **Activate the Virtual Environment**:
  - On macOS and Linux:
    ```bash
    source venv/bin/activate
    ```
  - On Windows:
    ```bash
    .\venv\Scripts\activate
    ```

3. **Navigate to the Backend Source Directory**:
  ```bash
  cd backend/src
  ```

4. **Install dependencies**

```bash
  pip install -r requirements.txt
  ```

5. **Run the Backend Application**:
  ```bash
  python main.py
  ```

This will start the backend server, and it should be running and ready to handle requests.


## Detected evidence (automated analysis)

Indexed codebase: 62 recognized source files, 263 KB.
- CSS (language) — detected in the code
- FastAPI (technology) — detected in the code
- Flask (technology) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- LangChain (technology) — detected in the code
- Next.js (technology) — detected in the code
- Ollama (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- Google Gemini (technology) — claimed on Devpost, not found in the code
- Node.js (technology) — claimed on Devpost, not found in the code
- Vercel (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (73 of 73)

```
.env.example
.gitignore
app/API.js
app/error.tsx
app/globals.css
app/help/layout.tsx
app/help/page.tsx
app/layout.tsx
app/login/layout.tsx
app/login/page.tsx
app/meal-history/layout.tsx
app/meal-history/page.tsx
app/page.tsx
app/register/layout.tsx
app/register/page.tsx
app/settings/layout.tsx
app/settings/page.tsx
backend/chromaTest/chroma.sqlite3
backend/Dockerfile
backend/healthyMealRecommender.py
backend/src/.gitignore
backend/src/app.py
backend/src/chromaTest2.py
backend/src/gemini.py
backend/src/main.py
backend/src/model.py
backend/src/requirements.txt
backend/src/route.py
backend/src/static/css/style.css
backend/src/templates/app.html
backend/src/templates/includes/header.html
backend/src/templates/index.html
components.json
components/CalorieCard.tsx
components/Chat.tsx
components/ChatText.tsx
components/Controls.tsx
components/Expressions.tsx
components/HeaderAndChat.tsx
components/HelpWiki.tsx
components/Login.tsx
components/logos/GitHub.tsx
components/logos/Hume.tsx
components/MealOverview.tsx
components/Messages.tsx
components/MicFFT.tsx
components/Nav.tsx
components/ProteinCard.tsx
components/Register.tsx
components/SettingOverview.tsx
components/SideNav.tsx
components/StartCall.tsx
components/ui/button.tsx
components/ui/CalorieGraph.tsx
components/ui/Card.tsx
components/ui/CardGrams.tsx
components/ui/MealCard.tsx
components/ui/ProteinCard.tsx
components/ui/ProteinGraph.tsx
components/ui/toggle.tsx
docker-compose.yaml
Dockerfile
next-env.d.ts
nginx.conf
package.json
postcss.config.mjs
README.md
tailwind.config.ts
tsconfig.json
utils/expressionColors.ts
utils/expressionLabels.ts
utils/getHumeAccessToken.ts
utils/index.ts
```

### Dependencies

- backend/src/requirements.txt: aiohappyeyeballs@==2.4.3, aiohttp@==3.10.10, aiosignal@==1.3.1, annotated-types@==0.7.0, anyio@==4.6.2.post1, asgiref@==3.8.1, attrs@==24.2.0, backoff@==2.2.1, bcrypt@==4.1.2, blinker@==1.7.0, build@==1.2.2.post1, cachetools@==5.5.0, certifi@==2024.8.30, charset-normalizer@==3.4.0, chroma-hnswlib@==0.7.6, chromadb@==0.5.17, click@==8.1.7, coloredlogs@==15.0.1, DateTime@==5.5, Deprecated@==1.2.14, durationpy@==0.9, fastapi@==0.115.2, filelock@==3.16.1, Flask@==3.0.2, Flask-Cors@==5.0.0, Flask-JWT-Extended@==4.6.0, Flask-Login@==0.6.3, Flask-SQLAlchemy@==3.1.1, flatbuffers@==24.3.25, frozenlist@==1.4.1, fsspec@==2024.9.0, google-ai-generativelanguage@==0.6.10, google-api-core@==2.21.0, google-api-python-client@==2.149.0, google-auth@==2.35.0, google-auth-httplib2@==0.2.0, google-generativeai@==0.8.3, googleapis-common-protos@==1.65.0, greenlet@==3.0.3, grpcio@==1.67.0, grpcio-status@==1.67.0, h11@==0.14.0, httpcore@==1.0.6, httplib2@==0.22.0, httptools@==0.6.4, httpx@==0.27.2, huggingface-hub@==0.26.0, humanfriendly@==10.0, idna@==3.10, importlib_metadata@==8.4.0, importlib_resources@==6.4.5, itsdangerous@==2.1.2, Jinja2@==3.1.3, jsonpatch@==1.33, jsonpointer@==3.0.0, kubernetes@==31.0.0, langchain@==0.3.7, langchain-core@==0.3.15, langchain-text-splitters@==0.3.0, langsmith@==0.1.136, markdown-it-py@==3.0.0, MarkupSafe@==2.1.5, mdurl@==0.1.2, mmh3@==5.0.1, monotonic@==1.6, mpmath@==1.3.0, multidict@==6.1.0, numpy@==1.26.4, oauthlib@==3.2.2, ollama@==0.3.3, onnxruntime@==1.19.2, opentelemetry-api@==1.27.0, opentelemetry-exporter-otlp-proto-common@==1.27.0, opentelemetry-exporter-otlp-proto-grpc@==1.27.0, opentelemetry-instrumentation@==0.48b0, opentelemetry-instrumentation-asgi@==0.48b0, opentelemetry-instrumentation-fastapi@==0.48b0, opentelemetry-proto@==1.27.0, opentelemetry-sdk@==1.27.0, opentelemetry-semantic-conventions@==0.48b0, opentelemetry-util-http@==0.48b0, orjson@==3.10.9, overrides@==7.7.0, packaging@==24.1, posthog@==3.7.0, propcache@==0.2.0, proto-plus@==1.24.0, protobuf@==4.25.5, pyasn1@==0.6.1, pyasn1_modules@==0.4.1, pydantic@==2.9.2, pydantic_core@==2.23.4, Pygments@==2.18.0, PyJWT@==2.9.0, pyparsing@==3.2.0, PyPika@==0.48.9, pyproject_hooks@==1.2.0, python-dateutil@==2.9.0.post0, python-dotenv@==1.0.1, pytz@==2024.2, PyYAML@==6.0.2, requests@==2.32.3, requests-oauthlib@==2.0.0, requests-toolbelt@==1.0.0, rich@==13.9.2, rsa@==4.9, setuptools@==75.2.0, shellingham@==1.5.4, six@==1.16.0, sniffio@==1.3.1, SQLAlchemy@==2.0.27, starlette@==0.40.0, sympy@==1.13.3, tenacity@==9.0.0, tokenizers@==0.20.1, tqdm@==4.66.5, typer@==0.12.5, typing_extensions@==4.9.0, uritemplate@==4.1.1, urllib3@==2.2.3, uvicorn@==0.32.0, uvloop@==0.21.0, watchfiles@==0.24.0, websocket-client@==1.8.0, websockets@==13.1, Werkzeug@==3.0.1, wrapt@==1.16.0, yarl@==1.15.5, zipp@==3.20.2, zope.interface@==7.1.0
- package.json: @humeai/voice-react@^0.1.16, @radix-ui/react-slot@^1.1.0, @radix-ui/react-switch@^1.1.1, @radix-ui/react-toggle@^1.1.0, @types/js-cookie@^3.0.6, @types/node@^20.16.14, @types/react@^18.3.11, @types/react-dom@^18.3.1, @types/react-virtualized@^9.21.30, chart.js@^4.4.5, chromadb@^1.9.2, class-variance-authority@^0.7.0, clsx@^2.1.1, eslint@^8.57.1, eslint-config-next@14.2.3, framer-motion@^11.11.9, geist@^1.3.1, hume@^0.8.10, js-cookie@^3.0.5, langchain@^0.3.5, lucide-react@^0.394.0, next@^14.2.15, node@^22.11.0, pnpm@^9.12.3, postcss@^8.4.47, react@^18.3.1, react-chartjs-2@^5.2.0, react-dom@^18.3.1, react-virtualized@^9.22.5, remeda@^2.16.0, server-only@^0.0.1, tailwind-merge@^2.5.4, tailwind-scrollbar-hide@^1.1.7, tailwindcss@^3.4.14, tailwindcss-animate@^1.0.7, ts-pattern@^5.5.0, typescript@^5.6.3

### Recent commits (newest first)

- Merge pull request #49 from addychen2/joshua
- chromadb
- Merge pull request #46 from addychen2/joshua
- Merge branch 'main' into joshua
- stuff
- Update README.md
- Merge pull request #47 from addychen2/addingchromajoshua
- pnpm fix
- trying
- adding chromadb test files
- Merge pull request #45 from addychen2/fixedbackend
- yuh
- Merge pull request #44 from addychen2/fixeddeploy
- Merge branch 'main' into fixeddeploy
- fixed deploy
- Merge pull request #43 from addychen2/dynamic
- Merge pull request #42 from addychen2/deploy2
- dynamic
- deployment fix 2 hope
- Merge pull request #41 from addychen2/deploy

## Key source files (fetched from GitHub, selected and truncated for size)

### docker-compose.yaml

```yaml
services:
  frontend:
    build:
      context: ./
      dockerfile: Dockerfile
    image: flexbox-frontend:latest  # Tag for the frontend image
    ports:
      - "80:3000"  # Map host port 80 to container port 3000
    depends_on:
      - backend

  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    image: flexbot-backend:latest  # Tag for the backend image
    ports:
      - "8080:8080"  # Keep the backend port mapping as it is
    env_file:
      - .venv
    environment:
      FLASK_ENV: production

```

### Dockerfile

```
# Stage 1: Build the React app
FROM node:18 AS build
WORKDIR /app  # Set the working directory to /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY ./ ./

# Build the React app
RUN npm run build

# Stage 2: Serve the React app with Nginx
FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html 

# Expose the port on which the app will run
EXPOSE 80

# Command to start Nginx server
CMD ["nginx", "-g", "daemon off;"]

```

### package.json

```
{
  "name": "hume-evi-next-js-starter",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://github.com/humeai/hume-evi-next-js-starter",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@humeai/voice-react": "^0.1.16",
    "@radix-ui/react-slot": "^1.1.0",
    "@radix-ui/react-switch": "^1.1.1",
    "@radix-ui/react-toggle": "^1.1.0",
    "@types/react-virtualized": "^9.21.30",
    "chart.js": "^4.4.5",
    "chromadb": "^1.9.2",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "framer-motion": "^11.11.9",
    "geist": "^1.3.1",
    "hume": "^0.8.10",
    "js-cookie": "^3.0.5",
    "langchain": "^0.3.5",
    "lucide-react": "^0.394.0",
    "next": "^14.2.15",
    "node": "^22.11.0",
    "pnpm": "^9.12.3",
    "react": "^18.3.1",
    "react-chartjs-2": "^5.2.0",
    "react-dom": "^18.3.1",
    "react-virtualized": "^9.22.5",
    "remeda": "^2.16.0",
    "server-only": "^0.0.1",
    "tailwind-merge": "^2.5.4",
    "tailwind-scrollbar-hide": "^1.1.7",
    "tailwindcss-animate": "^1.0.7",
    "ts-pattern": "^5.5.0"
  },
  "devDependencies": {
    "@types/js-cookie": "^3.0.6",
    "@types/node": "^20.16.14",
    "@types/react": "^18.3.11",
    "@types/react-dom": "^18.3.1",
    "eslint": "^8.57.1",
    "eslint-config-next": "14.2.3",
    "postcss": "^8.4.47",
    "tailwindcss": "^3.4.14",
    "typescript": "^5.6.3"
  },
  "packageManager": "pnpm@9.12.2+sha1.3012e6dd27e70ec4e185be062e8a124523dccfc4"
}

```

### backend/Dockerfile

```
# Use the official Python image as the base image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Install dependencies for Chrome and ChromeDriver
RUN apt-get update && apt-get install -y \
    wget \
    curl \
    unzip \
    xvfb \
    fonts-liberation \
    libappindicator3-1 \
    libasound2 \
    libatk-bridge2.0-0 \
    libatk1.0-0 \
    libcups2 \
    libdbus-1-3 \
    libnss3 \
    libxcomposite1 \
    libxdamage1 \
    libxrandr2 \
    libgbm-dev \
    libgtk-3-0 \
    xdg-utils \
    && apt-get clean && rm -rf /var/lib/apt/lists/*


# Install the Python dependencies
COPY src/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Install Gunicorn
RUN pip install --no-cache-dir gunicorn

# Copy the rest of the application code into the container
COPY . .

# Expose the port on which the Flask app runs
EXPOSE 8080

# Set the environment variable for Flask
ENV FLASK_APP=src/main.py

# Set display port for Xvfb
ENV DISPLAY=:99

# Command to run the Flask app
CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:8080", "app:app"]
```

### backend/src/requirements.txt

```
aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.6.2.post1
asgiref==3.8.1
attrs==24.2.0
backoff==2.2.1
bcrypt==4.1.2
blinker==1.7.0
build==1.2.2.post1
cachetools==5.5.0
certifi==2024.8.30
charset-normalizer==3.4.0
chroma-hnswlib==0.7.6
chromadb==0.5.17
click==8.1.7
coloredlogs==15.0.1
DateTime==5.5
Deprecated==1.2.14
durationpy==0.9
fastapi==0.115.2
filelock==3.16.1
Flask==3.0.2
Flask-Cors==5.0.0
Flask-JWT-Extended==4.6.0
Flask-Login==0.6.3
Flask-SQLAlchemy==3.1.1
flatbuffers==24.3.25
frozenlist==1.4.1
fsspec==2024.9.0
google-ai-generativelanguage==0.6.10
google-api-core==2.21.0
google-api-python-client==2.149.0
google-auth==2.35.0
google-auth-httplib2==0.2.0
google-generativeai==0.8.3
googleapis-common-protos==1.65.0
greenlet==3.0.3
grpcio==1.67.0
grpcio-status==1.67.0
h11==0.14.0
httpcore==1.0.6
httplib2==0.22.0
httptools==0.6.4
httpx==0.27.2
huggingface-hub==0.26.0
humanfriendly==10.0
idna==3.10
importlib_metadata==8.4.0
importlib_resources==6.4.5
itsdangerous==2.1.2
Jinja2==3.1.3
jsonpatch==1.33
jsonpointer==3.0.0
kubernetes==31.0.0
langchain==0.3.7
langchain-core==0.3.15
langchain-text-splitters==0.3.0
langsmith==0.1.136
markdown-it-py==3.0.0
MarkupSafe==2.1.5
mdurl==0.1.2
mmh3==5.0.1
monotonic==1.6
mpmath==1.3.0
multidict==6.1.0
numpy==1.26.4
oauthlib==3.2.2
ollama==0.3.3
onnxruntime==1.19.2
opentelemetry-api==1.27.0
opentelemetry-exporter-otlp-proto-common==1.27.0
opentelemetry-exporter-otlp-proto-grpc==1.27.0
opentelemetry-instrumentation==0.48b0
opentelemetry-instrumentation-asgi==0.48b0
opentelemetry-instrumentation-fastapi==0.48b0
opentelemetry-proto==1.27.0
opentelemetry-sdk==1.27.0
opentelemetry-semantic-conventions==0.48b0
opentelemetry-util-http==0.48b0
orjson==3.10.9
overrides==7.7.0
packaging==24.1
posthog==3.7.0
propcache==0.2.0
proto-plus==1.24.0
protobuf==4.25.5
pyasn1==0.6.1
pyasn1_modules==0.4.1
pydantic==2.9.2
pydantic_core==2.23.4
Pygments==2.18.0
PyJWT==2.9.0
pyparsing==3.2.0
PyPika==0.48.9
pyproject_hooks==1.2.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
pytz==2024.2
PyYAML==6.0.2
requests==2.32.3
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
rich==13.9.2
rsa==4.9
setuptools==75.2.0
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
SQLAlchemy==2.0.27
starlette==0.40.0
sympy==1.13.3
tenacity==9.0.0
tokenizers==0.20.1
tqdm==4.66.5
typer==0.12.5
typing_extensions==4.9.0
uritemplate==4.1.1
urllib3==2.2.3
uvicorn==0.32.0
uvloop==0.21.0
watchfiles==0.24.0
websocket-client==1.8.0
websockets==13.1
Werkzeug==3.0.1
wrapt==1.16.0
yarl==1.15.5
zipp==3.20.2
zope.interface==7.1.0

```

### utils/index.ts

```typescript
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

```

### app/layout.tsx

```typescript
import type { Metadata } from "next";
import { GeistSans } from "geist/font/sans";
import { GeistMono } from "geist/font/mono";
import "./globals.css";
import { Nav } from "@/components/Nav";
import { cn } from "@/utils";

export const metadata: Metadata = {
  title: "HealthChain",
  description: "",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={cn(
          GeistSans.variable,
          GeistMono.variable,
          "flex flex-col grow h-dvh bg-diet-green-darker"
        )}
      >
        {children}
      </body>
    </html>
  );
}

```

### app/page.tsx

```typescript
import { getHumeAccessToken } from "@/utils/getHumeAccessToken";
import dynamic from 'next/dynamic'
import { useEffect } from 'react'

const CalorieCard = dynamic(() => import('@/components/CalorieCard'), { ssr: false });
const ProteinCard = dynamic(() => import('@/components/ProteinCard'), { ssr: false });
const HeaderAndChat = dynamic(() => import('@/components/HeaderAndChat'), { ssr: false });
const SideNav = dynamic(() => import('@/components/SideNav'), { ssr: false });


export default async function Page() {

  const accessToken = await getHumeAccessToken();
  
  if (!accessToken) {
    throw new Error();
  }

  return (
    <div className="grow flex flex-row h-screen">
      <div className="grow flex flex-col h-screen">
        <div className="hidden">
        </div>
        <SideNav/>
      </div>

      <HeaderAndChat accessToken={accessToken} />

      <div className="flex flex-col w-64 justify-evenly mx-10">
        <ProteinCard />
        <CalorieCard />
      </div>
    </div>
  );
}

```

### app/help/layout.tsx

```typescript
export default function Layout({ children }: { children: React.ReactNode }) {
    return (
      <div className="flex h-screen flex-col">
        <div className="">{children}</div>
        
      </div>
      
    );
  }
```

### app/login/layout.tsx

```typescript
export default function Layout({ children }: { children: React.ReactNode }) {
    return (
      <div className="flex h-screen flex-col">
        <div className="">{children}</div>
        
      </div>
      
    );
  }
```

[53 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]