Real-time Infrastructure Monitoring & Community Reporting Platform
InfraTrack Global is a comprehensive web application that empowers communities in developing nations to report, track, and monitor infrastructure issues including power outages, water supply problems, and internet connectivity disruptions. Built with transparency and accountability at its core, the platform enables citizens to share real-time updates and hold service providers accountable.
- Features
- Technology Stack
- Project Structure
- Installation
- Configuration
- Running the Application
- API Documentation
- Database Schema
- User Roles
- Screenshots
- Team
- License
- π± Real-time Issue Reporting - Report power, water, and internet infrastructure problems
- πΊοΈ Interactive Map View - Visualize all reported issues on an interactive map using Leaflet.js
- π° Live Reports Feed - Browse and filter community-submitted reports in real-time
- β Community Verification - Upvote/downvote reports to verify their accuracy
- π Trust Score System - Advanced algorithm that calculates user credibility based on:
- Account verification status
- Rating average
- Task completion rate
- Dispute ratio
- Timeliness
- Community feedback
- System behavior
- π€ User Authentication - Secure registration and login system with JWT tokens
- π Personal Dashboard - Track your reports, verifications, and statistics
- π Real-time Notifications - Get instant updates about infrastructure issues
- π· Image Upload - Attach photos to reports for better documentation
- π Geolocation - Auto-detect or manually enter location information
- π‘οΈ Admin Dashboard - Comprehensive admin panel for platform management
- π₯ User Management - Verify, moderate, and manage user accounts
- π Analytics & Statistics - View platform-wide metrics and trends
- π₯ Data Export - Export reports to CSV for analysis
- π¨ Report Moderation - Update status, verify, or delete reports
- π Multi-language Support - English and French (expandable)
- π± Responsive Design - Fully optimized for mobile, tablet, and desktop
- π Real-time Updates - Socket.IO integration for live updates
- π¨ Modern UI/UX - Beautiful gradient backgrounds with glassmorphism effects
- HTML5 - Semantic markup
- CSS3 - Custom styling with modern features (glassmorphism, animations)
- JavaScript (ES6+) - Client-side logic
- Leaflet.js - Interactive maps
- Socket.IO Client - Real-time communication
- Font Awesome & Bootstrap Icons - Icon libraries
- Node.js - Runtime environment
- Express.js - Web application framework
- PostgreSQL - Relational database
- Socket.IO - WebSocket server
- JWT - Authentication tokens
- bcryptjs - Password hashing
- Multer - File upload handling
- pg - PostgreSQL client
- cors - Cross-origin resource sharing
- dotenv - Environment variable management
InfraTrack-Global/
β
βββ server.js # Main backend server
βββ package.json # Node.js dependencies
βββ .env # Environment variables
β
βββ uploads/ # Uploaded images directory
β
βββ frontend/
β βββ homepage.html # Main landing page
β βββ login.html # Authentication page
β βββ report.html # Submit new report
β βββ report_feeds.html # Browse all reports
β βββ map.html # Interactive map view
β βββ Account.html # User profile & settings
β βββ Admin.html # Admin dashboard
β βββ aboutUs.html # About the platform
β βββ Account.css # Account page styles
β βββ image/ # Team photos
β βββ paul.jpeg
β βββ lea.jpeg
β βββ simon.jpeg
β βββ gety.jpeg
β βββ richard.jpeg
β
βββ database/
βββ schema.sql # PostgreSQL database schema
- Node.js (v14 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
git clone https://github.com/yourusername/infratrack-global.git
cd infratrack-globalnpm install- Create a PostgreSQL database named
InfraTrack - Run the database schema:
-- Create users table
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
full_name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
phone_number VARCHAR(20),
country VARCHAR(50),
city VARCHAR(50),
verified BOOLEAN DEFAULT FALSE,
total_reports INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Create reports table
CREATE TABLE reports (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
service_type VARCHAR(20) NOT NULL,
title VARCHAR(100) NOT NULL,
description TEXT,
status VARCHAR(20) DEFAULT 'outage',
severity VARCHAR(20) DEFAULT 'medium',
country VARCHAR(50) NOT NULL,
city VARCHAR(50) NOT NULL,
location_address TEXT,
location_latitude DECIMAL(10, 8),
location_longitude DECIMAL(11, 8),
image_path VARCHAR(255),
upvotes INTEGER DEFAULT 0,
downvotes INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Create notifications table
CREATE TABLE notifications (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
title VARCHAR(100),
message TEXT,
is_read BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Create verifications table (optional)
CREATE TABLE verifications (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
report_id INTEGER REFERENCES reports(id),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Create a .env file in the root directory:
PORT=3000
JWT_SECRET=infratrack-secret-key-2025
DB_USER=postgres
DB_HOST=localhost
DB_NAME=InfraTrack
DB_PASSWORD=Group
DB_PORT=5432
NODE_ENV=developmentUpdate database credentials in .env file:
DB_USER=your_postgres_username
DB_PASSWORD=your_postgres_password
DB_NAME=InfraTrackDefault admin code: INFRATRACK2025
To change the admin code, update it in:
server.js(if implementing server-side validation)login.html(line withconst ADMIN_CODE)
node server.jsServer will run on http://localhost:3000
Open your browser and navigate to:
http://localhost:3000/homepage.html
Or use a local development server for the frontend files.
Regular User:
- Email:
john@example.com - Password:
password123
Admin User:
- Email:
admin@example.com - Password:
password123 - Admin Code:
INFRATRACK2025
http://localhost:3000/api
POST /api/auth/register
Content-Type: application/json
{
"username": "string",
"full_name": "string",
"email": "string",
"password": "string",
"phone_number": "string",
"country": "string",
"city": "string"
}POST /api/auth/login
Content-Type: application/json
{
"email": "string",
"password": "string"
}GET /api/usersGET /api/users/:idPUT /api/users/:id
Content-Type: application/json
{
"full_name": "string",
"phone_number": "string",
"country": "string",
"city": "string",
"verified": boolean
}DELETE /api/users/:idGET /api/users/:id/statsGET /api/reports?service_type=power&status=outage&limit=50&offset=0POST /api/reports
Content-Type: multipart/form-data
{
"user_id": integer,
"service_type": "power|water|internet",
"title": "string",
"description": "string",
"status": "outage|partial|restored",
"severity": "low|medium|high|critical",
"country": "string",
"city": "string",
"location_address": "string",
"location_latitude": decimal,
"location_longitude": decimal,
"image": file
}GET /api/reports/:idPUT /api/reports/:id
Content-Type: application/json
{
"action": "upvote|downvote",
"status": "outage|partial|restored"
}DELETE /api/reports/:idGET /api/notifications/:userIdPUT /api/notifications/:id/readPUT /api/notifications/:userId/read-all- id (SERIAL PRIMARY KEY)
- username (VARCHAR UNIQUE)
- full_name (VARCHAR)
- email (VARCHAR UNIQUE)
- password_hash (VARCHAR)
- phone_number (VARCHAR)
- country (VARCHAR)
- city (VARCHAR)
- verified (BOOLEAN)
- total_reports (INTEGER)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP)- id (SERIAL PRIMARY KEY)
- user_id (INTEGER FOREIGN KEY)
- service_type (VARCHAR)
- title (VARCHAR)
- description (TEXT)
- status (VARCHAR)
- severity (VARCHAR)
- country (VARCHAR)
- city (VARCHAR)
- location_address (TEXT)
- location_latitude (DECIMAL)
- location_longitude (DECIMAL)
- image_path (VARCHAR)
- upvotes (INTEGER)
- downvotes (INTEGER)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP)- id (SERIAL PRIMARY KEY)
- user_id (INTEGER FOREIGN KEY)
- title (VARCHAR)
- message (TEXT)
- is_read (BOOLEAN)
- created_at (TIMESTAMP)- Submit infrastructure reports
- Browse and filter reports
- Upvote/downvote reports
- View interactive map
- Manage personal profile
- Receive notifications
- All regular user permissions
- Access admin dashboard
- Verify user accounts
- Moderate reports (update status, delete)
- View platform analytics
- Export data to CSV
- Manage all users
- Send broadcast notifications
TABI PAUL AGWE
Scrum Master
Software Engineering Student
YUYAR LEA-BABARA
Product Owner
Software Engineering Student
SIMON AKUMA ASONGWE
Chief Technology Officer
Software Engineering Student
NDZEKA GETRUDE BERINYUY
Front End Developer
Software Engineering Student
TANDIE FOMEKONG RISCHARD
Chief Financial Officer
Software Engineering Student
InfraTrack Global was born from a simple observation: communities in developing nations deserve better infrastructure accountability. We're building a platform that gives power back to the people β a transparent, real-time system where every citizen can report infrastructure issues, verify others' reports, and hold service providers accountable.
We envision a world where infrastructure transparency is the norm, not the exception. By 2030, we aim to be operating in 50+ developing nations, with millions of active users creating a global network of infrastructure accountability.
The platform uses a comprehensive trust scoring system:
Formula: (10ΓV) + (6ΓR) + (20ΓC) - (15ΓD) + (10ΓT) + (5ΓFΓ100) + (10ΓB)
Components:
- V - Verification (0-1): Account verification status
- R - Rating (1-5): Average user rating
- C - Completion (0-1): Task completion rate
- D - Disputes (0-1): Dispute ratio (negative weight)
- T - Timeliness (0-1): On-time report rate
- F - Feedback (-1 to +1): Community feedback ratio
- B - Behavior (0-1): System behavior score
Trust Levels:
- 0-39: Low Trust β
- 40-69: Moderate Trust βββ
- 70-89: Trusted ββββ
- 90-100: Elite βββββ
- JWT Authentication - Secure token-based authentication
- Password Hashing - bcrypt with salt rounds
- Input Validation - Server-side validation for all inputs
- SQL Injection Protection - Parameterized queries
- XSS Prevention - Input sanitization
- CORS Configuration - Controlled cross-origin requests
- File Upload Restrictions - Type and size validation
- None currently reported
- Email verification system
- SMS notifications
- Mobile applications (iOS/Android)
- Advanced analytics dashboard
- API rate limiting
- Multi-language support expansion
- Report comments/discussion threads
- Service provider dashboard
- Automated report resolution tracking
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, questions, or feedback:
- Email: support@infratrack.global
- Website: infratrack.global
- OpenStreetMap for mapping data
- Leaflet.js for map visualization
- Font Awesome & Bootstrap Icons
- The open-source community
Built with β€οΈ by Software Engineering Students
Empowering communities through infrastructure transparency