Skip to content

CaPerez17/SERENO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏛️ SERENO - Intelligent Citizen Case Tracking System

Governing with AI for the People

Python FastAPI License

AI-powered citizen service system for Montelíbano Municipality, Córdoba

DemoArchitectureAI & AnalyticsInstallation


🎯 What is SERENO?

SERENO is an intelligent citizen service system that transforms how local governments interact with their citizens. More than a chatbot, SERENO is a complete case management platform with institutional memory that ensures:

  • Reception Certainty: Every report receives a unique case number
  • Proactive Support: Automatic notifications without citizens needing to follow up
  • Complete Traceability: Full history of every interaction
  • Artificial Intelligence: Predictive analytics and intelligent policy segmentation

🌟 Key Differentiators

Traditional System SERENO
Conversational chatbot without memory Case-based tracking with active follow-up
No reception guarantee Immediate confirmation with case number
Generic responses Contextual conversational flow by emergency type
No data analysis AI for segmentation and data-driven policies
Citizen must follow up Proactive automatic support

🚀 Quick Demo

For Citizens

  1. Report emergency: "There was a traffic accident on 5th Street"
  2. Receive confirmation: "Your report has been registered. Case number: SER-000001"
  3. Answer guided questions: Location, injuries, additional details
  4. Receive automatic updates: No need to call or follow up

For Administrators

  • Complete case management panel
  • Filters by status (received, in progress, closed)
  • Status updates with automatic notifications
  • Analytics dashboard (coming soon)

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                    FRONTEND (Web Interface)                   │
│  ┌──────────────┐              ┌──────────────┐             │
│  │ Citizen Chat │              │ Admin Panel  │             │
│  └──────┬───────┘              └──────┬───────┘             │
└─────────┼─────────────────────────────┼─────────────────────┘
          │                              │
          └──────────────┬───────────────┘
                         │ REST API
          ┌──────────────▼───────────────┐
          │     BACKEND (FastAPI)         │
          │  ┌─────────────────────────┐ │
          │  │  Business Logic Layer   │ │
          │  │  - Case Management      │ │
          │  │  - Conversation Flow    │ │
          │  │  - Message Templates     │ │
          │  └─────────────────────────┘ │
          │  ┌─────────────────────────┐ │
          │  │   AI/ML Services        │ │
          │  │  - Intent Classification│ │
          │  │  - Data Segmentation    │ │
          │  │  - Policy Suggestions    │ │
          │  └─────────────────────────┘ │
          └──────────────┬────────────────┘
                         │
          ┌──────────────▼───────────────┐
          │   DATABASE (SQLite/PostgreSQL)│
          │  - Cases                     │
          │  - Messages                  │
          │  - Analytics Metadata        │
          └───────────────────────────────┘

🤖 Artificial Intelligence & Data Analytics

🔍 Current Phase: Intelligent Classification

SERENO uses Natural Language Processing (NLP) to:

  1. Emergency Type Detection

    • Automatic classification: accidents, security, infrastructure, public services
    • Entity extraction: locations, dates, affected persons
  2. Intelligent Conversational Flow

    • Contextual questions based on emergency type
    • Critical information validation (injuries, exact location)
    • Intent detection (new report vs. follow-up)
  3. Active Case Management

    • Context memory per session
    • Prevention of case duplication
    • Intelligent message association to correct case

📊 Future Phase: Intelligent Segmentation & Data-Driven Policies

1. Intelligent Case Segmentation

Goal: Identify patterns and trends in citizen reports to inform public policies.

Capabilities:

  • Geographic clustering: Identify critical zones by emergency type
  • Temporal analysis: Detect seasonal patterns and peak incident hours
  • Demographic segmentation: Understand which populations are most affected
  • Event correlation: Identify relationships between different report types

Use Case Example:

Analysis: "Traffic accidents in Centro neighborhood increase 300% 
on Fridays between 6-9 PM. Correlation with reports of insufficient 
public lighting in the same area."

2. Data-Driven Policy Suggestions

Goal: Provide actionable recommendations to emergency services and planning entities.

AI Modules:

a) Predictive Analytics

  • Time series models to predict emergency peaks
  • Early warnings based on historical patterns
  • Resource optimization (police, fire, ambulances)

b) Policy Recommendations

  • Infrastructure: "Install 15 additional traffic lights in identified critical zones"
  • Security: "Increase patrols in neighborhood X during weekends based on 6-month analysis"
  • Public Services: "Prioritize sewer maintenance in sector Y due to correlation with health reports"

c) Niche Segmentation

  • Identify specific citizen groups with particular needs
  • Policy personalization by segment (elderly, students, merchants)
  • Impact analysis by gender, age, location

Example Output:

{
  "policy_recommendation": {
    "type": "infrastructure",
    "priority": "high",
    "evidence": {
      "cases_analyzed": 1247,
      "time_period": "6 months",
      "correlation": "traffic_accidents + insufficient_lighting"
    },
    "recommendation": "Install LED lighting system at 8 critical points",
    "estimated_impact": "45% reduction in nighttime accidents",
    "cost_benefit": {
      "investment": "$2.4M COP",
      "savings_emergency_services": "$1.8M COP/year"
    }
  }
}

3. Intelligence Dashboard for Decision Making

Features:

  • Geographic hotspot visualization
  • Temporal trends with predictions
  • Policy impact scorecards
  • Intervention effectiveness comparison

🛠️ Technologies

Backend

  • FastAPI: Modern and fast framework for APIs
  • SQLAlchemy: ORM for database management
  • SQLite/PostgreSQL: Data persistence
  • Pydantic: Data validation with type hints

Frontend

  • HTML5/CSS3: Modern and responsive interface
  • Vanilla JavaScript: No heavy dependencies
  • Institutional Design: Montelíbano colors (green and white)

AI/ML (Future)

  • scikit-learn: Clustering and classification
  • spaCy/NLTK: Natural language processing
  • Pandas/NumPy: Data analysis
  • TensorFlow/PyTorch: Deep learning models (optional)

📦 Installation

Prerequisites

  • Python 3.8+
  • pip
  • Git

Installation Steps

# 1. Clone the repository
git clone https://github.com/CaPerez17/SERENO.git
cd SERENO

# 2. Install dependencies
cd backend
pip install -r requirements.txt

# 3. Initialize database (created automatically on startup)
# Database is created automatically when starting the server

# 4. Start the server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Access


📡 API Endpoints

Citizens

  • POST /api/messages - Send message and create/update case
  • GET /api/cases/{case_number} - Check case status
  • GET /api/cases/{case_number}/messages - Message history

Administrators

  • GET /api/cases - List all cases (with filters)
  • PUT /api/cases/{case_number}/status - Update case status

🎨 Key Features

For Citizens

Immediate Confirmation: Every report receives unique case number (SER-XXXXXX)
Guided Conversational Flow: Contextual questions by emergency type
Proactive Support: Automatic notifications without needing to follow up
Status Query: Check status with simple command "estado SER-XXXXXX"
Institutional Memory: System remembers your active case

For Administrators

Management Panel: Complete view of all cases
Smart Filters: By status, date, emergency type
Status Updates: With automatic citizen notifications
Complete History: Traceability of every interaction
Analytics Dashboard: (Coming soon) Trend and pattern visualization


🔮 AI Roadmap

Phase 1: Classification and Detection (✅ Implemented)

  • Emergency type detection
  • Intent classification (new report vs. follow-up)
  • Contextual conversational flow

Phase 2: Analytics and Segmentation (🚧 In Development)

  • Geographic case clustering
  • Temporal trend analysis
  • Demographic segmentation
  • Correlation between emergency types

Phase 3: Prediction and Recommendations (📅 Planned)

  • Predictive emergency models
  • Data-driven policy suggestions
  • Intervention impact analysis
  • Emergency resource optimization

Phase 4: Intelligence Dashboard (📅 Planned)

  • Interactive hotspot visualization
  • Policy scorecards
  • Automatic executive reports
  • Predictive early warnings

🏛️ Use Cases

1. Traffic Emergency

Citizen: "There was an accident on 5th Street"
System: "What is the exact location? (neighborhood, landmark)"
Citizen: "Centro neighborhood, near the park"
System: "Are there any injured persons?"
Citizen: "Yes, two people"
System: "Case SER-000001 registered. Traffic Department notified."

2. Case Follow-up

Citizen: "How long will it take?"
System: "Your case SER-000001 is being attended. We will notify you when there are updates."

3. Policy Analysis (Future)

System: "6-month analysis shows 40% of accidents occur in zone X 
on weekends. Recommendation: increase patrols and improve signage."

🤝 Contributing

Contributions are welcome. Please:

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


👥 Authors


🙏 Acknowledgments

  • Montelíbano Municipality, Córdoba
  • Open source developer community
  • System contributors and users

Developed with ❤️ for the people of Montelíbano

Governing with AI for the People

⭐ Star this project🐛 Report Bug💡 Suggest Feature

About

🏛️ Intelligent Citizen Case Tracking System with AI | Governing with AI for the People | Predictive analytics & data-driven policy recommendations for Montelíbano, Córdoba

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors