How eerreenn/sehirpulse-ai works
ŞehirPulse AI is a municipal request-management application. A citizen submits a report through the React form; the API validates it, the service invokes rule-based classification, department routing, and priority analysis, then stores the enriched ticket. Admins load, search, and filter saved tickets and update their status. The graph includes the documented admin and persistence capabilities; sampled source supports the principal call relationships shown. Some AI internals and frontend form behavior were not excerpted, so their internal links are limited to evidence in the adapter and README.
Main entry points: tickets.py Ticket endpoints · ai_adapter.py AI adapter · App.jsx Route selection · main.py FastAPI entry
Components 15
Web application
- Route selection
frontend/src/App.jsx - Report form
frontend/src/components/ReportForm.jsx - Admin tickets
frontend/src/components/AdminTickets.jsx - API client
frontend/src/services/api.js
API and workflow
- FastAPI entry
backend/app/main.py - Ticket endpoints
backend/app/routes/tickets.py - Request schemas
backend/app/schemas/ticket.py - Ticket workflow
backend/app/services/ticket_service.py
AI analysis
- AI adapter
backend/app/ai_adapter.py - Category classifier
ai/classify.py - Department routing
ai/routing.py - Priority rules
ai/priority_basic.py
Persistence
- Ticket model
backend/app/models/ticket.py - SQLAlchemy database
backend/app/database.py
Other components
- Citizen
Connections 17
- Citizen → Route selection: uses
README.md - Route selection → Report form: renders
frontend/src/App.jsx - Route selection → Admin tickets: renders
frontend/src/App.jsx - Report form → API client: submits via
README.md - Admin tickets → API client: loads and updates via
frontend/src/components/AdminTickets.jsx - API client → FastAPI entry: HTTP requests
README.md - FastAPI entry → Ticket endpoints: registers
backend/app/main.py - Ticket endpoints → Request schemas: validates with
backend/app/routes/tickets.py - Ticket endpoints → Ticket workflow: calls
backend/app/routes/tickets.py - Ticket workflow → AI adapter: analyzes through
backend/app/services/ticket_service.py - AI adapter → Category classifier: classifies with
backend/app/ai_adapter.py - AI adapter → Department routing: routes with
backend/app/ai_adapter.py - AI adapter → Priority rules: scores with
backend/app/ai_adapter.py - Ticket workflow → Ticket model: creates and queries
backend/app/services/ticket_service.py - Ticket model → SQLAlchemy database: uses base
backend/app/models/ticket.py - FastAPI entry → SQLAlchemy database: creates tables
backend/app/main.py - Ticket endpoints → SQLAlchemy database: obtains sessions
backend/app/routes/tickets.py