Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

🔧 Detective Door AI — Backend

FastAPI-based backend for the AI smart door security assistant.

📁 Structure

backend/
├── app/
│   ├── main.py                          # FastAPI app entry point
│   ├── api/
│   │   └── routes/
│   │       ├── health.py                # Health check endpoint
│   │       ├── events.py                # Event management endpoints
│   │       ├── detection.py             # Detection simulation endpoints
│   │       ├── voice.py                 # Voice/speech endpoints
│   │       └── session.py              # Session management
│   ├── core/
│   │   └── config.py                    # App configuration & env vars
│   ├── models/
│   │   └── __init__.py                  # Database models (future)
│   ├── schemas/
│   │   ├── event.py                     # Event Pydantic schemas
│   │   ├── detection.py                 # Detection Pydantic schemas
│   │   └── voice.py                     # Voice Pydantic schemas
│   ├── services/
│   │   ├── detection/
│   │   │   ├── person_detector.py       # 🔒 Patrick + Quan — OpenCV person detection
│   │   │   └── event_classifier.py      # 🔒 Patrick + Quan — Event type classification
│   │   ├── audio/
│   │   │   └── microphone_service.py    # 🔒 Patrick + Quan — Microphone input handling
│   │   ├── pi/
│   │   │   ├── camera_service.py        # 🔒 Patrick + Quan — Pi camera streaming
│   │   │   └── pi_controller.py         # 🔒 Patrick + Quan — Pi GPIO / hardware control
│   │   └── voice/
│   │       └── elevenlabs_service.py    # 🔒 Tirth — ElevenLabs voice synthesis
│   └── utils/
│       └── helpers.py                   # Shared utility functions
├── requirements.txt
├── .env.example
└── README.md

🏃 Getting Started

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Set up environment
cp .env.example .env
# Edit .env with your API keys

# Run the server
uvicorn app.main:app --reload --port 8000

📡 API Endpoints

Method Path Description
GET /api/health Health check
POST /api/detection/simulate Simulate person detection
GET /api/events Get recent events
POST /api/voice/speak Generate voice response
POST /api/session/reset Reset current session

📖 API Docs

Once running, visit:

👥 Team Ownership

  • detection/ — Patrick + Quan
  • audio/ — Patrick + Quan
  • pi/ — Patrick + Quan
  • voice/ — Tirth

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages