Skip to content

lilre11/capstone-project

Repository files navigation

AI-Powered Smartphone Decision Support System

An intelligent full-stack decision support system that helps users identify and rank smartphones using computer vision, multi-criteria decision analysis, and optional AI-generated explanations.

Features

  • Identify smartphone models from uploaded images or live camera.
  • Rank devices with Direct Weighting + TOPSIS or optional Pairwise AHP + TOPSIS.
  • Compare raw specifications side-by-side with bar charts.
  • Show transparent scoring inputs, sensitivity analysis, and comparison results.
  • Generate natural-language explanations with OpenRouter or Groq when configured.
  • Durable per-analysis URLs that survive refresh.
  • Run a React frontend and FastAPI backend together from the project root.

Tech Stack

  • Backend: FastAPI, SQLite, SQLAlchemy, pytest, ONNX Runtime
  • Frontend: React, Vite, TypeScript, Recharts, Framer Motion, Axios
  • Vision: ONNX Runtime with 3 trained YOLO models

Project Structure

src/
  api/                API endpoints and schemas
  database/           Database models, connection, and seed data
  decision_engine/    Preference validation, AHP, and TOPSIS analysis
  vision/             Image transforms, model lifecycle, and inference
  assistant/          Shared provider adapters, context, and fallback behavior
  catalog/            Active catalog and retirement-aware queries
  runtime/            Validated settings and capability configuration
  saved_analysis/     Durable ranking persistence operations
frontend/
  src/                React application source
  e2e/                Playwright browser journey tests
tests/                Unit and integration tests
computer_vision/      Training artifacts and exported models
docs/                 ADRs, verification evidence, defense artifacts

Environment Setup

Copy .env.example to .env and add only the values you plan to use:

OPENROUTER_API_KEY=your_openrouter_key

If OpenRouter or Groq keys are missing, tests remain offline and the app uses local fallback answers. Training notebooks read ROBOFLOW_API_KEY from the environment and do not contain a key.

Install

From the project root:

python -m venv .venv
.\.venv\Scripts\activate

npm run install:all

Run

Start the backend and frontend together:

npm run dev

Expected local services:

  • Backend: http://127.0.0.1:8000
  • Frontend: http://localhost:5173

Test

Run the authoritative local verification command:

npm run verify

Architecture terms and decisions are documented in CONTEXT.md

Database Migrations

Upgrade an existing database:

python -m alembic upgrade head

Fresh databases use the same command before startup seeding. Application startup also runs pending migrations automatically.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors