Skip to content

Temsegn/ISSOP-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

96 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ™οΈ ISSOP - Intelligent Smart City Operations Platform

A comprehensive smart city management system connecting citizens, field agents, and administrators for efficient urban service delivery.

Version License Node React


πŸ“‹ Table of Contents


🌟 Overview

ISSOP (Intelligent Smart City Operations Platform) is a modern, real-time platform designed to streamline urban service management. It enables citizens to report issues, field agents to respond efficiently, and administrators to monitor and manage city operations from a centralized dashboard.

Key Capabilities

  • πŸ“± Mobile App - Citizens report issues with photos and location
  • πŸ‘· Agent Portal - Field agents receive and manage assigned tasks
  • πŸ–₯️ Admin Dashboard - Real-time monitoring and analytics
  • πŸ”” Smart Notifications - Hourly reminders and instant updates
  • πŸ—ΊοΈ Live Tracking - Real-time agent location and task status
  • πŸ“Š Analytics - Comprehensive insights and performance metrics

✨ Features

For Citizens (Mobile App)

  • βœ… Report issues with photos, location, and description
  • βœ… Track request status in real-time
  • βœ… Receive notifications when issues are resolved
  • βœ… Hourly reminders for pending requests
  • βœ… View nearby agents and estimated response time
  • βœ… Rate and review completed services

For Field Agents (Mobile App)

  • βœ… Receive task assignments instantly
  • βœ… Update task status (In Progress, Completed)
  • βœ… Upload completion proof with photos
  • βœ… Navigate to task locations with maps
  • βœ… Hourly reminders for assigned tasks
  • βœ… View task history and performance metrics

For Administrators (Web Dashboard)

  • βœ… Real-time dashboard with live statistics
  • βœ… Monitor all requests and agent activities
  • βœ… Assign tasks to available agents
  • βœ… View analytics and performance reports
  • βœ… Manage users and roles (SUPERADMIN)
  • βœ… Live map with agent locations
  • βœ… Daily summary reports at 9 AM
  • βœ… Alert notifications for urgent issues

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     ISSOP Platform                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚   Mobile     β”‚  β”‚    Admin     β”‚  β”‚   Backend    β”‚    β”‚
β”‚  β”‚     App      β”‚  β”‚  Dashboard   β”‚  β”‚     API      β”‚    β”‚
β”‚  β”‚  (React      β”‚  β”‚  (Next.js)   β”‚  β”‚  (Node.js)   β”‚    β”‚
β”‚  β”‚   Native)    β”‚  β”‚              β”‚  β”‚              β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚         β”‚                  β”‚                  β”‚            β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚
β”‚                            β”‚                               β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”                      β”‚
β”‚                    β”‚   Socket.IO    β”‚                      β”‚
β”‚                    β”‚  (Real-time)   β”‚                      β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜                      β”‚
β”‚                            β”‚                               β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚         β”‚                  β”‚                  β”‚           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  PostgreSQL  β”‚  β”‚  Cloudinary  β”‚  β”‚   Node-Cron  β”‚   β”‚
β”‚  β”‚  (Database)  β”‚  β”‚   (Images)   β”‚  β”‚ (Scheduler)  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

System Flow

  1. Citizen reports issue via mobile app
  2. Backend stores request and notifies admins
  3. Admin assigns task to available agent
  4. Agent receives notification and accepts task
  5. Agent updates status and uploads completion proof
  6. Citizen receives completion notification
  7. Scheduler sends hourly reminders for pending tasks

πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js 20.x
  • Framework: Express.js
  • Database: PostgreSQL with Prisma ORM
  • Real-time: Socket.IO
  • Authentication: JWT (JSON Web Tokens)
  • File Storage: Cloudinary
  • Scheduling: node-cron
  • API Docs: Swagger/OpenAPI

Admin Dashboard

  • Framework: Next.js 16 (React 19)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: Radix UI + shadcn/ui
  • State Management: Redux Toolkit
  • Maps: Leaflet + React Leaflet
  • Charts: Recharts
  • Animations: Framer Motion

Mobile App

  • Framework: React Native (Expo)
  • Language: TypeScript
  • Navigation: React Navigation
  • State: Redux Toolkit
  • Maps: React Native Maps
  • Camera: Expo Camera & Image Picker

πŸš€ Getting Started

Prerequisites

  • Node.js >= 20.11.1
  • npm >= 9.8.1
  • PostgreSQL >= 14
  • Git

Installation

1. Clone the Repository

git clone https://github.com/Temsegn/ISSOP-Platform.git
cd ISSOP-Platform

2. Setup Backend

cd Backend

# Install dependencies
npm install

# Configure environment
cp .env.example .env.local

# Edit .env.local with your credentials:
# - DATABASE_URL
# - JWT_SECRET
# - CLOUDINARY credentials

# Run database migrations
npx prisma migrate dev

# Seed database (optional)
npx prisma db seed

# Start server
npm run dev

Backend runs on: http://localhost:3000

3. Setup Admin Dashboard

cd Admin

# Install dependencies
npm install

# Environment is pre-configured in .env.local
# Points to: https://issop-platform.onrender.com/api/v1

# Start development server
npm run dev

Admin Dashboard runs on: http://localhost:3000

4. Setup Mobile App

cd mobile

# Install dependencies
npm install

# Start Expo
npm start

# Scan QR code with Expo Go app
# Or press 'a' for Android, 'i' for iOS simulator

πŸ“ Project Structure

ISSOP-Platform/
β”œβ”€β”€ Backend/                    # Node.js API Server
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   β”œβ”€β”€ schema.prisma      # Database schema
β”‚   β”‚   └── seed.js            # Database seeding
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/            # Configuration files
β”‚   β”‚   β”œβ”€β”€ middleware/        # Express middlewares
β”‚   β”‚   β”œβ”€β”€ modules/           # Feature modules
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/          # Authentication
β”‚   β”‚   β”‚   β”œβ”€β”€ users/         # User management
β”‚   β”‚   β”‚   β”œβ”€β”€ requests/      # Request handling
β”‚   β”‚   β”‚   β”œβ”€β”€ tasks/         # Task management
β”‚   β”‚   β”‚   β”œβ”€β”€ notifications/ # Notifications
β”‚   β”‚   β”‚   └── analytics/     # Analytics & reports
β”‚   β”‚   β”œβ”€β”€ services/          # Business logic
β”‚   β”‚   β”‚   └── notification-scheduler.js
β”‚   β”‚   β”œβ”€β”€ app.js             # Express app
β”‚   β”‚   └── server.js          # Server entry point
β”‚   β”œβ”€β”€ tests/                 # Unit & integration tests
β”‚   β”œβ”€β”€ .env.example           # Environment template
β”‚   └── package.json
β”‚
β”œβ”€β”€ Admin/                      # Next.js Admin Dashboard
β”‚   β”œβ”€β”€ app/                   # App router pages
β”‚   β”‚   β”œβ”€β”€ dashboard/         # Dashboard pages
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx       # Main dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ requests/      # Request management
β”‚   β”‚   β”‚   β”œβ”€β”€ users/         # User management
β”‚   β”‚   β”‚   β”œβ”€β”€ agents/        # Agent monitoring
β”‚   β”‚   β”‚   β”œβ”€β”€ analytics/     # Analytics
β”‚   β”‚   β”‚   β”œβ”€β”€ roles/         # Role management
β”‚   β”‚   β”‚   └── settings/      # Settings
β”‚   β”‚   └── login/             # Login page
β”‚   β”œβ”€β”€ components/            # React components
β”‚   β”‚   β”œβ”€β”€ dashboard/         # Dashboard components
β”‚   β”‚   └── ui/                # UI components (shadcn)
β”‚   β”œβ”€β”€ lib/                   # Utilities
β”‚   β”‚   β”œβ”€β”€ api.ts             # API client
β”‚   β”‚   β”œβ”€β”€ socket.ts          # Socket.IO client
β”‚   β”‚   └── types.ts           # TypeScript types
β”‚   β”œβ”€β”€ store/                 # Redux store
β”‚   β”œβ”€β”€ .env.local             # Environment config
β”‚   └── package.json
β”‚
β”œβ”€β”€ mobile/                     # React Native Mobile App
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ screens/           # App screens
β”‚   β”‚   β”œβ”€β”€ components/        # React components
β”‚   β”‚   β”œβ”€β”€ navigation/        # Navigation config
β”‚   β”‚   β”œβ”€β”€ services/          # API & services
β”‚   β”‚   β”œβ”€β”€ store/             # Redux store
β”‚   β”‚   └── utils/             # Utilities
β”‚   β”œβ”€β”€ app.json               # Expo configuration
β”‚   └── package.json
β”‚
β”œβ”€β”€ docs/                       # Documentation
β”œβ”€β”€ COMPLETE-FIXES-SUMMARY.md  # All fixes summary
└── README.md                   # This file

πŸ”” Notification System

Overview

ISSOP features a comprehensive notification system with real-time delivery and scheduled reminders.

Notification Types

Type Recipient Trigger Frequency
Task Assignment Agent Request assigned Instant
Status Update Citizen Status changes Instant
Completion Citizen Request completed Instant
Hourly Reminder Citizen/Agent Pending >1 hour Every hour
Alert Admin Pending >24 hours Every 24 hours
Daily Summary Admin Platform stats 9:00 AM daily

Hourly Reminders

How it works:

  • Cron job runs every hour at minute 0 (10:00, 11:00, 12:00, etc.)
  • Checks all requests pending for more than 1 hour
  • Sends reminders to:
    • Citizens: "Your request has been pending for X hours. We're working on it!"
    • Agents: "Reminder: Task assigned to you for X hours. Please update status."
    • Admins: For requests >24 hours old

Configuration:

// Backend/src/services/notification-scheduler.js
cron.schedule('0 * * * *', async () => {
  // Hourly reminder logic
});

Completion Notifications

When a request is marked as COMPLETED:

βœ… Great news! Your request "Fix Pothole" has been completed. 
Thank you for using ISSOP!

When a request is IN_PROGRESS:

πŸ”§ Your request "Fix Pothole" is now being worked on by our team.

Real-Time Delivery

All notifications are delivered via Socket.IO for instant updates:

// Client connects
socket.on('notification_received', (notification) => {
  // Display notification in app
});

// Server sends
socketService.emitToUser(userId, 'notification_received', notification);

API Endpoints

Get Notifications:

GET /api/v1/notifications
Authorization: Bearer <token>

Mark as Read:

PATCH /api/v1/notifications/:id/read
Authorization: Bearer <token>

πŸ“š API Documentation

Base URL

Production: https://issop-platform.onrender.com/api/v1
Local: http://localhost:3000/api/v1

Authentication

All protected endpoints require JWT token:

Authorization: Bearer <your-jwt-token>

Key Endpoints

Authentication

POST /auth/register          # Register new user
POST /auth/login             # Login
GET  /auth/me                # Get current user

Requests

GET    /requests             # List all requests
POST   /requests             # Create new request
GET    /requests/:id         # Get request details
PATCH  /requests/:id/status  # Update status
PATCH  /requests/:id/assign  # Assign to agent

Users

GET    /users                # List users
GET    /users/:id            # Get user details
PATCH  /users/:id            # Update user
DELETE /users/:id            # Delete user
PATCH  /users/:id/role       # Update user role

Notifications

GET    /notifications        # Get user notifications
PATCH  /notifications/:id/read  # Mark as read

Analytics

GET /analytics/summary       # Dashboard statistics
GET /analytics/agents        # Agent performance

Swagger Documentation

Interactive API documentation available at:

http://localhost:3000/api-docs

🌐 Deployment

Backend (Render.com)

  1. Create Web Service

    • Connect GitHub repository
    • Select Backend folder
    • Build Command: npm install && npx prisma generate
    • Start Command: npm start
  2. Environment Variables

    DATABASE_URL=postgresql://...
    JWT_SECRET=your-secret-key
    CLOUDINARY_CLOUD_NAME=...
    CLOUDINARY_API_KEY=...
    CLOUDINARY_API_SECRET=...
    PORT=3000
    
  3. Database

    • Create PostgreSQL database on Render
    • Run migrations: npx prisma migrate deploy

Admin Dashboard (Vercel)

  1. Deploy to Vercel

    cd Admin
    vercel
  2. Environment Variables

    NEXT_PUBLIC_API_URL=https://issop-platform.onrender.com/api/v1
    NEXT_PUBLIC_SOCKET_URL=https://issop-platform.onrender.com
    

Mobile App (Expo)

  1. Build for Production

    cd mobile
    eas build --platform android
    eas build --platform ios
  2. Submit to Stores

    eas submit --platform android
    eas submit --platform ios

πŸ§ͺ Testing

Backend Tests

cd Backend

# Run all tests
npm test

# Run with coverage
npm test -- --coverage

# Run specific test
npm test -- auth.service.test.js

Test Suites:

  • Unit tests for services
  • Integration tests for API endpoints
  • Database tests with Prisma mock

Admin Dashboard

cd Admin

# Type checking
npm run type-check

# Linting
npm run lint

# Build test
npm run build

Mobile App

cd mobile

# Run tests
npm test

# Type checking
npm run type-check

πŸ‘₯ User Roles

USER (Citizen)

  • Report issues
  • Track request status
  • Receive notifications
  • Rate completed services

AGENT (Field Agent)

  • View assigned tasks
  • Update task status
  • Upload completion proof
  • Navigate to locations

ADMIN (Administrator)

  • View all requests
  • Assign tasks to agents
  • Monitor agent activities
  • View analytics (area-specific)

SUPERADMIN (Super Administrator)

  • All ADMIN permissions
  • Manage users and roles
  • System-wide analytics
  • Platform configuration

πŸ” Security

  • Authentication: JWT with secure token storage
  • Authorization: Role-based access control (RBAC)
  • Data Validation: Zod schema validation
  • SQL Injection: Protected by Prisma ORM
  • XSS Protection: Helmet.js middleware
  • CORS: Configured for specific origins
  • Rate Limiting: Implemented on sensitive endpoints
  • Password Hashing: bcrypt with salt rounds

πŸ“Š Performance

  • Real-time Updates: Socket.IO for instant notifications
  • Caching: API response caching (30 seconds TTL)
  • Database Indexing: Optimized queries with indexes
  • Image Optimization: Cloudinary transformations
  • Code Splitting: Next.js automatic code splitting
  • Lazy Loading: Components loaded on demand

🀝 Contributing

We welcome contributions! Please follow these steps:

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

Coding Standards

  • Backend: ESLint configuration
  • Frontend: TypeScript strict mode
  • Commits: Conventional commits format
  • Tests: Required for new features

πŸ“ License

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


πŸ“ž Support

For issues, questions, or contributions:


πŸ™ Acknowledgments

  • Prisma - Modern database toolkit
  • Next.js - React framework
  • Socket.IO - Real-time engine
  • Cloudinary - Media management
  • shadcn/ui - UI components
  • Render.com - Hosting platform

πŸ“ˆ Roadmap

Version 2.6.0 (Planned)

  • Push notifications (FCM/APNS)
  • Email notifications
  • SMS notifications
  • Multi-language support
  • Dark mode for mobile app
  • Offline mode support

Version 3.0.0 (Future)

  • AI-powered task routing
  • Predictive maintenance
  • Citizen feedback system
  • Integration with city IoT sensors
  • Advanced analytics dashboard
  • Mobile app for iOS

πŸ“Έ Screenshots

Admin Dashboard

Dashboard Real-time monitoring with live statistics

Mobile App

Mobile App Citizen request submission interface

Live Map

Live Map Real-time agent tracking


🎯 Project Status

Current Version: 2.5.0
Status: βœ… Production Ready
Last Updated: April 8, 2026
Maintained: Yes


Built with ❀️ for Smart Cities

⬆ Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors