How been231/do_an_tot_nghiep_pawderm-ai works
PawDerm AI is a veterinary dermatology decision-support product: pet owners submit lesion images for AI-assisted assessment, receive first-aid and urgency guidance, track cases, and can be connected to clinic services. Doctors review and relabel cases for active learning; administrators manage users and disease knowledge and prepare retraining data. The repository has a React/FastAPI product and a separately launched Streamlit demo. Relationships below follow excerpts, SOURCE INDEX references, or README statements; unsampled feature internals are represented only where documented.
Main entry points: App.jsx Role-based app · main.py REST API · app.py Streamlit entry point · services Frontend API services
Components 30
React Web Portals
- Role-based app
frontend/src/App.jsx - Authentication
frontend/src/pages/AuthPage.jsx - Login and registration
frontend/src/components/auth - Customer portal
frontend/src/pages/CustomerPage.jsx - Pets, diagnosis, history
frontend/src/components/customer - Doctor portal
frontend/src/pages/DoctorPage.jsx - Review and relabel
frontend/src/components/doctor - Admin portal
frontend/src/pages/AdminPage.jsx - Users, disease, retraining
frontend/src/components/admin - Frontend API services
frontend/src/services - API configuration
frontend/src/services/apiConfig.js
FastAPI Services
- REST API
backend/main.py - Authentication routes
backend/app/routers/auth.py - Pet routes
backend/app/routers/pets.py - Diagnosis and history routes
backend/app/routers/diagnosis.py - Doctor review routes
backend/app/routers/doctor.py - Admin routes
backend/app/routers/admin.py
Clinical AI and Data
- Image inference
backend/app/services/ai_inference.py - Disease knowledge
backend/app/data/disease_kb.py - Supabase data access
backend/app/database/supabase_service.py - Supabase database
backend/app/database/supabase_client.py
Streamlit Demo
- Streamlit entry point
streamlit_app/app.py - Demo authentication
streamlit_app/auth/auth_manager.py - Login and sessions
streamlit_app/auth/login_manager.py - Demo diagnosis
streamlit_app/services/diagnosis_service.py - Results and clinic guidance
streamlit_app/components/result_view.py - Pet and case history
streamlit_app/services/history_service.py
Other components
- Pet owner
- Veterinarian
- Administrator
Connections 37
- Pet owner → Role-based app: uses
README.md - Veterinarian → Role-based app: uses
README.md - Administrator → Role-based app: uses
README.md - Role-based app → Authentication: routes unauthenticated
frontend/src/App.jsx - Role-based app → Customer portal: routes customer
frontend/src/App.jsx - Role-based app → Doctor portal: routes doctor
frontend/src/App.jsx - Role-based app → Admin portal: routes admin
frontend/src/App.jsx - Authentication → Login and registration: renders
frontend/src/pages/AuthPage.jsx - Customer portal → Pets, diagnosis, history: renders
frontend/src/pages/CustomerPage.jsx - Doctor portal → Review and relabel: renders
frontend/src/pages/DoctorPage.jsx - Admin portal → Users, disease, retraining: renders
frontend/src/pages/AdminPage.jsx - Customer portal → Frontend API services: uses services
frontend/src/pages/CustomerPage.jsx - Doctor portal → Frontend API services: uses services
frontend/src/pages/DoctorPage.jsx - Admin portal → Frontend API services: uses services
frontend/src/pages/AdminPage.jsx - Frontend API services → API configuration: uses configuration
frontend/src/services/adminService.js - Frontend API services → REST API: calls REST API
README.md - REST API → Authentication routes: registers
backend/main.py - REST API → Pet routes: registers
backend/main.py - REST API → Diagnosis and history routes: registers
backend/main.py - REST API → Doctor review routes: registers
backend/main.py - REST API → Admin routes: registers
backend/main.py - Authentication routes → Supabase data access: calls
backend/app/routers/auth.py - Pet routes → Supabase data access: calls
backend/app/routers/pets.py - Diagnosis and history routes → Image inference: runs inference
backend/app/routers/diagnosis.py - Diagnosis and history routes → Supabase data access: persists cases
backend/app/routers/diagnosis.py - Doctor review routes → Supabase data access: calls
backend/app/routers/doctor.py - Admin routes → Supabase data access: calls
backend/app/routers/admin.py - Image inference → Disease knowledge: uses knowledge
backend/app/services/ai_inference.py - Pet owner → Streamlit entry point: uses demo
README.md - Streamlit entry point → Demo authentication: coordinates authentication
streamlit_app/app.py - Demo authentication → Login and sessions: delegates login
streamlit_app/auth/auth_manager.py - Streamlit entry point → Demo diagnosis: uses diagnosis
streamlit_app/app.py - Streamlit entry point → Results and clinic guidance: renders results
streamlit_app/app.py - Streamlit entry point → Pet and case history: uses history
streamlit_app/app.py - Demo diagnosis → Disease knowledge: uses knowledge
streamlit_app/services/diagnosis_service.py - Pet and case history → Supabase database: reads and writes
streamlit_app/services/history_service.py - Results and clinic guidance → Pet and case history: uses history service
streamlit_app/components/result_view.py