# Project export: SkyWalker

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: TreeHacks 2026
- Tagline: AI-powered IoT intelligent walker for physical therapy.
- Devpost: https://devpost.com/software/skywalker-57kghq
- GitHub: https://github.com/ADJsBuilds/SmartWalker
- Video: https://www.youtube.com/embed/aCN6bpTC6Nc?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 4 GitHub contributor(s) — Andrzej Bachleda-Curus (32 commits), Andrew Jenkins (25 commits), CalThoMat (5 commits), Cursor (4 commits)

## Devpost submission (written by the team)

### Inspiration

When my grandmother had her hip surgery, she thought she would be on a walker for just a few weeks. Those weeks stretched and she didn’t improve, as her physical therapy and exercise levels were lowered and she lost motivation. My grandmother is still on that walker. Almost ⅓ of Americans will require a walker for assistance at one point in their lives. According to the CDC, over 47,000 elderly individuals are hospitalized annually due to walker-related falls. Research indicates that people are seven times more likely to be injured in a fall while using a walker compared to using a cane. Therapists also commonly have no way to keep track of patient behavior beyond their short office visits. Emotionally, many lose the motivation to exercise, viewing their walker as a symbol of limitation rather than a tool for recovery. We wanted to inject modern technology into this "old" device to help the elderly and those in rehabilitation regain their mobility safely, effectively, and encouragingly.

### What it does

Our project is a real-time health-tech platform that turns a standard walker into a connected rehab companion. It combines gait analysis and fall detection by streaming computer-vision signals and motion metrics live to detect instability and suspected falls. Pressure sensing is integrated through FSR sensors in the walker, capturing left and right load so we can measure support dependence and asymmetry. An AI physical therapist, powered by a voice agent, provides live coaching, corrective prompts, and encouragement during sessions. The system also includes an interactive web dashboard that shows live telemetry, trend history, and progress views for patients and caregivers. Clinicians can remotely review patient metrics and adjust exercise plans without waiting for in-person visits, enabling continuous oversight and faster intervention when needed.

### How we built it

We built a multi-modal data pipeline that combines walker sensor data with computer vision-derived gait data. Vision events such as cadence, step variability, and fall suspicion are ingested continuously for live risk scoring. FSR readings from the walker grips and frame are normalized to estimate effort, load balance, and walker reliance. On the backend, we used FastAPI, WebSockets, and SQLAlchemy to enable low-latency ingest and live broadcasting. The system merges sensor and vision streams into a unified resident state, triggers proactive alerts, and stores history for longitudinal analysis. We also integrated a voice pipeline that connects speech-to-text, reasoning, and then to a HeyGen avatar output to power the AI physical therapist in real time. We used OpenAI’s TPP, and logic model. On the frontend, we built a React, TypeScript, and Vite application with distinct user experiences. The patient view features a high-contrast, low-friction interface focused on live feedback, goals, and motivation. The clinician view provides denser analytics for reviewing trends, gait stability changes, and pressure-distribution progress over time.

### Challenges we ran into

The hardest part was synchronizing heterogeneous real-time streams. Pressure data and vision events arrive at different frequencies and had to be merged into one reliable timeline for both live coaching and clinician analytics. Keeping latency low while preserving enough historical context for “now versus recent baseline” decisions required careful WebSocket state design and query optimization. Also, developing our computer vision models and reliably detecting falls and steps was difficult.

### What we learned

We learned that health-tech reliability is primarily about systems integration. Hardware signals, real-time transport, inference and agent logic, storage, and user experience all need to function cohesively as a single product. We gained practical experience designing resilient real-time ingest and broadcast pipelines for live care workflows. We also learned how to translate clinical rehabilitation concepts into interfaces that both patients and clinicians can understand and act on. Still, more than anything

### What's next

Next, we want to improve both engagement and prevention. For individuals, we plan to expand lightweight motivation features such as gamified goals, clearer progress summaries, and adaptive coaching tone. At the network level, we aim to add predictive models that flag subtle gait decline earlier across longitudinal data. We also plan to integrate haptic cues directly into the walker so users receive immediate posture and balance guidance without relying on a screen.

## README (from the GitHub repository)

# SmartWalker
AI physical therapy in a walker


We close the loop on bringing physical


## Detected evidence (automated analysis)

Indexed codebase: 137 recognized source files, 1879 KB.
- C++ (language) — detected in the code
- CSS (language) — detected in the code
- FastAPI (technology) — detected in the code
- HTML (language) — detected in the code
- JavaScript (language) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- SQL (language) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- PostgreSQL (technology) — claimed on Devpost, not found in the code
- AI coding agent: Cursor — evidence: commit authorship or trailers

## Codebase structure (from repository index)

### Files (120 of 883)

```
.github/workflows/codeql.yml
.gitignore
.vscode/settings.json
backend_DELETE_LATER.py
backend/.dockerignore
backend/.env.example
backend/app/__init__.py
backend/app/agents/__init__.py
backend/app/agents/lite_agent.py
backend/app/audio/__init__.py
backend/app/audio/pcm.py
backend/app/core/config.py
backend/app/core/logging.py
backend/app/db/init_db.py
backend/app/db/models.py
backend/app/db/session.py
backend/app/main.py
backend/app/routers/__init__.py
backend/app/routers/agent.py
backend/app/routers/carrier.py
backend/app/routers/documents.py
backend/app/routers/eleven.py
backend/app/routers/exercise_metrics.py
backend/app/routers/health.py
backend/app/routers/ingest.py
backend/app/routers/integrations.py
backend/app/routers/liveavatar.py
backend/app/routers/patients.py
backend/app/routers/reports.py
backend/app/routers/suggestions.py
backend/app/routers/ws.py
backend/app/services/analytics_store.py
backend/app/services/carrier.py
backend/app/services/coach_script.py
backend/app/services/elevenlabs_tts.py
backend/app/services/exercise_qna_context.py
backend/app/services/gemini_client.py
backend/app/services/heygen.py
backend/app/services/liveagent.py
backend/app/services/liveavatar_client.py
backend/app/services/liveavatar_lite.py
backend/app/services/merge_state.py
backend/app/services/openevidence.py
backend/app/services/pdf_extract.py
backend/app/services/proactive_monitor.py
backend/app/services/report_pdf.py
backend/app/services/retention.py
backend/app/services/retrieval.py
backend/app/services/storage.py
backend/app/services/voice_actions.py
backend/app/services/voice_sql_pipeline.py
backend/app/services/ws_manager.py
backend/AVATAR_RECOMMENDATIONS.md
backend/DATABASE_EXPLAINED.md
backend/Dockerfile
backend/ENV_RENDER_TEMPLATE.txt
backend/HEYGEN_SETUP.md
backend/main.py
backend/openapi.yaml
backend/PROACTIVE_MONITOR_ROLLOUT.md
backend/README.md
backend/requirements-dev.txt
backend/requirements.txt
backend/scripts/liveavatar_lite_ws_smoke.py
backend/tests/test_proactive_monitor.py
backend/tests/test_voice_actions.py
backend/tests/test_ws_voice_actions.py
backend/VOICE_ACTION_ROLLOUT_CHECKLIST.md
backups/smartwalker-backup-20260215-020516.sql
docker-compose.backend-postgres.yml
docker-compose.yml
docs/backend_map_verified.md
docs/backend_map.md
docs/RENDER_CARRIER_ENV.md
docs/test_matrix.md
docs/testing.md
esp32.ino
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/00/e2/2049009ea62258c0fdc04671b1fb95674eed870587736c63f8e5e2f0d6faf7cc1def64b7b279dd6c0bd8676dc39cf7f4ab33233944f42b906cf8692f59a3
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/01/06/d8830798258ba6f7c9bf8c74f7482a7e3a1ac812dd829cf8b549c533da7e90b473511e1ea5d7cdcd82ffde53ae1fc8c4e2a538963bec5ae9db9fca0be82b
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/01/49/30cbffece31eb9fb73fc36df0727edbdef605b90c99390d73a13a671dd201c4a1064a0b987d3d27bb9f80baa3d0760e0c9438ab4fdd4972d38914ba98203
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/01/53/cec9045342096845d70d1084590331c7ee3d3ac5e3cc9500a8262853040eb622e1a63a3a609ee007e3362403827ad56a926a69b4ad7c61fc373f2c6e7856
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/01/69/0a95a01966259e500e47ce0763c944df2ef7a54ab2c8e93bbb2dc0530f7dc0cbe89e51fa3f1a379d6ddb0c10f8919260f19e7ff2c370e8ac07896b29750d
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/01/9f/93d3fa0b0034f227ce953911fced670728dcba0128f67b8f31047ca05fc2aaa7814648c98be3f559dd093cb91f425ad75b785409d2d41ef2bfd1c7783ddd
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/02/4c/231aa3faf1ec43cbd11ca769f1c2756a3efd7992ac32184ebf4f925e483edb213a0003610e5bffaaccf990040036142519ebb7007056d226280c71d5a2a3
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/02/55/28d230320eb37bca8bb0dfebbaa7d041312cf401d7cfe88945a06d1974bc6152d65e1ddce1d92f1464d359074745b9a0b640fb7d7a54bdd4edbc924d4914
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/02/69/bf15accac679ebbdaf03fa2cd1c1c3635e232735487a71834dd31715abc29275795900ebb6731733e5f44a0bff1193c982e3c65d8d6a99fa4be7fd9ffa98
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/04/27/c52f5b078a342504658132e272859521ce8ef07abe6c563f61a9e901ffbc67d18a72fa9111fde7426109b87b16d78f85a2c921a9e343fc52e4e1eb0d6cae
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/04/e5/f1bff15ebe7965b93a2dfcb09b2dad2f49b556f0b738a7b09672455538826a3a4b9eed94dd7c1cd746227117de1fdbd701c27f89eb9853d867417d40f984
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/05/1e/d5bc30951cefaadb10445ac9314ba0c9135a919dbec3c7352ba206fbd425a849f89c07162c88019df8a9749a6abf329ac6f7202b464cab4314cee978cccc
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/05/e1/ebc26ba1193d0e09b36c8e6536c4b6574d6ff6cfc672cfdd21f5ef6df51f542de7c494866ff0944da02f5d88ccb104fb08231d1df27a99a4868b71d11d2d
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/07/02/25059e6c002523d73d543992db3e7ce04f6066ab7bde2f0fb41a92eeeacb5425035256038e91b3824a6bd7ea88324d7b7c43c627c76d58ca681561d11b72
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/07/0f/abb1271933e1094e088766664a05ed62c52218fccf7d4d7e183779b2658be7896888532577b40411fcbeb5200e6f0aae42bd5ac32f717473192c450aa471
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/08/63/9f389a968e0daa5bf31beb336c0e6faee6f150f03c577db334f73ebda7967afa61358a43f68d45f0fa3e363dfd574d8103d919e2e5ff799e961ebb030340
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/09/e8/7eee8c79a9eecb26e2c7a18d1f7a1de91ee5031c071151ec8bd95620859c1fa64348cbffbc39c8346b752e4a86336af9b2970b8b59039fde19748e330c23
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/09/ea/104229e68fbce45f475ca8ec2ef8e81c20ef37440c4e6007eb395226629cef9164dd6e4bf0d7ed69398f6bcbdaf42eedd63175efa1e668b40c3848250209
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0a/01/0be2df6150d008288f1adfca3e7bb239ca22826aefda8a2b667df44cf3995a1ee1dfdb3ba20f9981c3d4e96bf3de55c59dae42d84868a90410b70f51a886
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0a/35/8b220810c83701bcee87be0d0402870cdfce1eb010b965eadf56db361c723d4eadad9a97913ae086c436f45849d8e292a70faad70a6faec5703e825d1972
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0a/e3/a3e8cb0467129914e061765497e8076df8709ca63eb7db106ce3f8a8c8f8f8623f3aea1c206d3250d282059d82e083f22263de3da9f94b61402e191c300b
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0c/22/ef25374092d86c0447fc24bfd8d5b714b116360a084a61a5a15e81491ef2606851ef72b09c8af53dbe3eb778600da4a6af6583caac5699275b6a8e027168
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0c/72/78a33d61ae251e07f21b69028e42c28bde206b3b9027087f1d54a1a318f4a5c75b0e05c57bb75407df4d98933020c634706567b14bfeb0d3bff3dad597f3
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0c/cd/6bc7e703a68d94df8f52c11afe039066afbff8bebe58f79d1a482b6b57e30694fbf001ee49b463ee8feaa078e89160008cdca970cd176c44caf258667f62
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0e/1b/939af656bb1e07d543a758c077b24d2c6da0953a84198eff2ed6b0e84d5d074dd19e9bd864019b65e09672f0fdb3e018349d3f9831e385c95af8cdc1b94f
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0e/dc/0fd83604481e7784437592a81ffd56d1bc3674677d6c95a8e4afd1d3435cbf55a79e7fc4ddf7e923ae0bc1a9ecb17d0de27433ea9668276f545400e4c9ef
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0f/7d/9c357070629c3498ef83b5dc9d9d12ad6432fb82d4f6fd0c37c6cb2321fe78037c08a815476bf03454e3afa1d07ace8434ae8f24522dcb0a858e9e6575f7
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0f/c0/0ff2bc35bf8a7dfc0f0f9616228be46207339dceea51c2a2f086f775291c90786f3f8b03eff990e26242cc6f76e577d9b01bcff740455701cb21e4a4504a
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/0f/fb/97427f4084c62336368f24a1169c93a15a381727702b8e0d18ce5f060e3faa7d063586b7246a8a41aeb5dc1b93b702f7e6ad5785add72f8e12c8f315c971
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/10/0a/d2be093f9f0b49a7e124065fbae47fe8f7428d6ddfbc6548ef803d25cb8118cf654e2253659b24c976f5af5d6aff22f81d6be5c69bf7152dadde8204515b
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/10/5a/dd16402fa3a7f3f8ecc90abf71072f6110881c05893bcd6fa98e7039da3642d7ad044c5a80febb521c5cdfa66ebc3d7b70e7f0e32b997228a15eef18d50f
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/10/f0/f9ab5b97c85c49a42acb9c27359c79eade039ae83641a1c008888d93692080ed5089d5424331a802cc891736c5187c3d5d68afff2d3110f318886eb1ed73
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/11/3a/f18b8b497bed71dbe68cb6bd35811e96fa5b5b849b45b79efff57429961cea74cc9ee20f612080283500f73c18e35aa5c8ae95839793fa7efc2d7c06d60f
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/12/cb/2102e724966a6e5007e40013f124d8738fdbf6b06ec9bb31432f830bd68250495d78b2aae94d89ec68eb9d300c3dc8e696e77354dd041395442846ce1ccf
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/14/0e/0490dac5036ae3168aec84565a73082df5540634c7442f8d4a706f380f187cffba0833a4773c2269457f237b8af32c3873003f3a4bdeb910cb2b0614f639
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/17/5c/727e39d074f3d891c976414887c96fd76bd0803bd50c46b66aa3996e3adef92dff0a99219b3ac4f33e2351d7b80d57d78b49d8771d6f1381b9afa47c0753
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/17/95/4fe3baac02c9f686ac5e3bb7092bcb3cc1ada5699a1976477655ad0cbf8daaa449ec5a854599b354754ddf19b73708ecec21c3c9da88674bcb07904ad0f5
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/17/a6/c4c9a995f632860050449a54277ac44f18e42a4b6f94c22d049b5e717a73b11da7f686fe8bf180959f7acf74f24e8897cf8829cb211cafc156aa318dcc23
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/17/ff/0e112748aa2a7fe6140d14eff0fbdb61442f5dc099697a5606a39054b4c94388121ba8cc88194ba3c5f0375bd4723c60b5d9dfaa38ce68026328e229ea81
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/18/64/e8c49ff0d71df6b3f0f610a343ee44e29789fc39593ff66c9c4dce150f36b5de53afa54653197de61520ad57d92c746055cefb320152ccea61c54e1c57c7
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/18/bb/ee850d635e318bce669e6acef65c4dc384640136b89273cf5a827b4f9f9e143daec6c89cee3243be262f8f7e5d9241566f76a104272c414ac95491a2161e
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/1a/08/fda907d8b91f37fcd197c0a0b67cd337beb03b189f39ed359b5c721f32d6530e98f686555af37b993e5897b7d9317606939cfa37e12d7cc1344b3fea46bb
frontend_legacy/.npm-cache/_cacache/content-v2/sha512/1a/5c/681d78d5a385d73d6a947f7abd54187a46c133f439d3f38490ed574d732f5fbd7533414a8cc920920923669e1390f81632f13ea317aea9eb02c5d1da9132
[763 more files omitted for size]
```

### Dependencies

- backend/requirements.txt: aiofiles@==24.1.0, fastapi@==0.115.6, httpx@==0.28.1, pdfplumber@==0.11.4, psycopg2-binary, pydantic@==2.10.6, pydantic-settings@==2.7.1, python-dotenv@==1.0.1, python-multipart@==0.0.12, rapidfuzz@==3.10.1, reportlab@==4.2.5, sqlalchemy@==2.0.36, tenacity@==9.0.0, uvicorn[standard]@==0.32.1
- frontend_legacy/package.json: @heygen/liveavatar-web-sdk@^0.0.10, @types/react@^18.3.18, @types/react-dom@^18.3.5, @vitejs/plugin-react@^4.3.4, autoprefixer@^10.4.20, livekit-client@^2.15.7, postcss@^8.4.49, react@^18.3.1, react-dom@^18.3.1, react-router-dom@^6.30.1, tailwindcss@^3.4.17, typescript@^5.7.2, vite@^6.0.5
- frontend/package.json: @types/react@^18.3.18, @types/react-dom@^18.3.5, @vitejs/plugin-react@^4.3.4, livekit-client@^2.15.7, react@^18.3.1, react-dom@^18.3.1, typescript@^5.7.2, vite@^6.0.5
- requirements.txt: fastapi, pydantic, uvicorn[standard]

### Recent commits (newest first)

- Add CodeQL analysis workflow configuration
- Add ESP32 code for WiFi and HX711 integration
- adding proactive avatar monitoring
- Enhance assistant instructions for user interactions
- adding functionality to the AI agent
- Updating System Prompt to be less boring
- PLEASE GOD MAKE THIS SHIT WORK 2.0
- This FUCKING SHIT BETTER WORK PLEASE
- fix: align voice-agent resident routing and tilt degree SQL
- fix: allow ingest resident mismatches without rejecting packets
- trying to get HeyGen working
- refactor: clean up websocket agent logic and remove merge conflict artifacts
- feat: add voice sql pipeline retention and websocket/ingest updates
- feat: add LiveAvatar LITE session management and UI components
- feat: integrate LiveAvatar LITE with voice agent for real-time coaching
- your commit message
- feat: improve voice pipeline timing and frontend endpointing
- chore: remove tracked frontend deps/cache and finalize frontend reset
- stabilize dev websocket connect lifecycle
- show backend stt transcript state in user view

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

### docs/RENDER_CARRIER_ENV.md

```markdown
# Render environment variables for Carrier mode

Add these in **Render → smartwalker-backend → Environment**.  
Use the **Key** as the variable name and the **Value** as the value (copy-paste the value as-is for CARRIER_CONTACTS).

---

## CARRIER_CONTACTS (copy-paste this entire line as the value)

```
{"physical therapist":"calvintonson@gmail.com","daughter":"calvinthomasmathew@gmail.com"}
```

---

## Other variables (set these in Render; do not commit secrets)

| Key | Example / notes |
|-----|------------------|
| `ZOOM_ACCOUNT_ID` | Your Zoom Server-to-Server app account ID |
| `ZOOM_CLIENT_ID` | Your Zoom Server-to-Server app client ID |
| `ZOOM_CLIENT_SECRET` | **Required.** Zoom Server-to-Server app **client secret** (different from ZOOM_SECRET_TOKEN). From Zoom Marketplace → your app → Credentials. |
| `CARRIER_EMAIL_FROM` | `calvinthomasmathew@gmail.com` (Gmail that sends invites) |
| `CARRIER_EMAIL_APP_PASSWORD` | Gmail app password for that account |

Optional: `ZOOM_SECRET_TOKEN` — only for webhooks; not used for creating meetings.

```

### backend/PROACTIVE_MONITOR_ROLLOUT.md

```markdown
# Proactive Monitor Rollout

This rollout sequence matches the proactive avatar monitoring plan.

## Phase 1: observe-only

- Set `PROACTIVE_MONITOR_ENABLED=true`.
- Keep operational guardrails strict:
  - `PROACTIVE_REQUIRE_ACTIVE_AVATAR=true`
  - conservative thresholds (`PROACTIVE_WEIGHT_THRESHOLD_KG=20`, `PROACTIVE_BALANCE_THRESHOLD=0.30`)
- Verify websocket `proactive_event` payloads are emitted with expected `eventType`, `severity`, `spoken`, and `error`.

## Phase 2: fall speech first

- Keep monitor enabled.
- Validate live avatar sessions are mapped from `/ws/voice-agent` `session.start`.
- Confirm fall events trigger concern + help question.
- Confirm interrupt behavior works for falls and does not starve normal agent turns.

## Phase 3: coaching speech

- Validate high-load and imbalance coaching cadence is acceptable.
- Tune `PROACTIVE_EVENT_COOLDOWN_SECONDS` and `PROACTIVE_MAX_SPEAKS_PER_MINUTE` to reduce repeated advice.

## Phase 4: tuning and stabilization

- Review false positives per event type.
- Adjust thresholds based on real resident/device calibration.
- Keep fall prompts empathetic and action-oriented; avoid diagnostic language.


```

### requirements.txt

```
fastapi
uvicorn[standard]
pydantic

```

### docker-compose.yml

```yaml
version: "3.9"

services:
  postgres:
    image: postgres:16-alpine
    container_name: smartwalker-postgres
    restart: unless-stopped
    environment:
      POSTGRES_DB: smartwalker
      POSTGRES_USER: smartwalker
      POSTGRES_PASSWORD: smartwalker
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U smartwalker -d smartwalker"]
      interval: 5s
      timeout: 5s
      retries: 20

  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile
    container_name: smartwalker-backend
    restart: unless-stopped
    depends_on:
      postgres:
        condition: service_healthy
    environment:
      APP_ENV: local
      LOG_LEVEL: INFO
      CORS_ALLOW_ORIGINS: '["*"]'
      DATABASE_URL: postgresql+psycopg2://smartwalker:smartwalker@postgres:5432/smartwalker
      STORAGE_DIR: /app/data
      OPENAI_API_KEY: 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
    ports:
      - "8000:8000"
    volumes:
      - backend_data:/app/data
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://localhost:8000/health || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 12

volumes:
  postgres_data:
  backend_data:

```

### backend/requirements.txt

```
fastapi==0.115.6
uvicorn[standard]==0.32.1
pydantic==2.10.6
pydantic-settings==2.7.1
python-dotenv==1.0.1
python-multipart==0.0.12
aiofiles==24.1.0
sqlalchemy==2.0.36
psycopg2-binary
tenacity==9.0.0
httpx==0.28.1
pdfplumber==0.11.4
reportlab==4.2.5
rapidfuzz==3.10.1

```

### backend/Dockerfile

```
FROM python:3.12-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1

WORKDIR /app

# Minimal system deps often needed by Python wheels/runtime.
RUN apt-get update \
    && apt-get install -y --no-install-recommends curl \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip && pip install -r /app/requirements.txt

COPY . /app

EXPOSE 8000

CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

```

### frontend/package.json

```
{
  "name": "smartwalker-debug-frontend",
  "private": true,
  "version": "0.1.0",
  "type": "module",
  "scripts": {
    "dev": "vite --host 0.0.0.0 --port 5173",
    "build": "tsc -b && vite build",
    "preview": "vite preview --host 0.0.0.0 --port 4173"
  },
  "dependencies": {
    "livekit-client": "^2.15.7",
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  },
  "devDependencies": {
    "@types/react": "^18.3.18",
    "@types/react-dom": "^18.3.5",
    "@vitejs/plugin-react": "^4.3.4",
    "typescript": "^5.7.2",
    "vite": "^6.0.5"
  }
}

```

### frontend_legacy/package.json

```
{
  "name": "smartwalker-frontend",
  "private": true,
  "version": "0.1.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@heygen/liveavatar-web-sdk": "^0.0.10",
    "livekit-client": "^2.15.7",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-router-dom": "^6.30.1"
  },
  "devDependencies": {
    "@types/react": "^18.3.18",
    "@types/react-dom": "^18.3.5",
    "@vitejs/plugin-react": "^4.3.4",
    "autoprefixer": "^10.4.20",
    "postcss": "^8.4.49",
    "tailwindcss": "^3.4.17",
    "typescript": "^5.7.2",
    "vite": "^6.0.5"
  }
}

```

### backend/main.py

```python
from app.main import app

```

### frontend/src/main.tsx

```typescript
import React from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './App';
import './styles.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
);

```

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