Skip to content

Latest commit

Β 

History

46 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⟁ CampuSync

CampuSync Banner

πŸš€ Next-Gen Campus & Hostel Management Platform built with FastAPI, React 18, PostgreSQL, Firebase Auth, Apache Kafka & Docker


🌟 Overview

CampuSync is an enterprise-grade Campus & Hostel Management Ecosystem engineered using a decoupled FastAPI Microservices Architecture. It digitizes hostel complaints, automates maintenance worker job allocation, provides an AI-vision-powered Lost & Found engine, and enforces gender-segregated privacy filters for hostel residents.

πŸ”’ Live Production Site: https://campusync.tech (Secured with HTTPS & Nginx Reverse Proxy)


✨ Key Platform Features

πŸ” 1. Firebase Authentication & Granular RBAC

  • Token Verification: Custom JWT middleware validating Firebase ID tokens across all microservices.
  • Three Distinct System Roles:
    • πŸŽ“ STUDENT (Hostel Resident vs Day Scholar / College Student)
    • πŸ› οΈ WORKER (Maintenance Technicians with specialized skill sets & workload caps)
    • πŸ‘¨β€πŸ’Ό ADMIN (System Managers with full user & role management capabilities)

πŸ” 2. AI-Powered Lost & Found Engine

  • Google Gemini 1.5 Vision AI: Automated image tag generation and multi-item visual similarity matching.
  • Location Context Selection: Reporters specify where an item was lost or found (🏫 College Campus vs 🏠 Hostel Area).
  • Gender-Segregated Hostel Privacy Filters:
    • πŸ‘¦ Hostel Male Students: View only Hostel Male items + universal College Campus items.
    • πŸ‘§ Hostel Female Students: View only Hostel Female items + universal College Campus items.
    • 🏫 Day Scholar (College) Students: View universal College Campus items with classroom location details.
  • Safe Claim Contact: Replaces raw email display with a secure "I think this is mine! πŸ“ž" contact pop-up.

⚑ 3. Intelligent Complaint Management & Worker Dispatch

  • Skill-Based Auto-Assignment: Complaints are automatically assigned to available workers matching the required work type (Electrical, Plumbing, Cleaning, AC Repair, Carpentry, Painting, Pest Control, General Maintenance).
  • Workload Capacity Engine: Enforces max active complaint limits per worker to prevent technician burn-out.
  • Retroactive Task Assignment: When a worker registers or updates their capacity, unassigned queue complaints are automatically assigned.

πŸ“’ 4. Event-Driven Kafka Messaging System

  • Asynchronous Event Pipeline: Apache Kafka event producer/consumer decouples complaint status changes and AI match alerts.
  • Real-Time Notifications: Instant updates delivered to student and worker dashboards.

πŸ—οΈ Microservices Architecture

CampuSync implements a strict Database-per-Service Architecture inside Docker containers, managed via docker-compose.

πŸ“¦ CampuSync Ecosystem
β”œβ”€β”€ 🌐 Nginx Reverse Proxy (Ports 80 / 443 SSL/TLS)
β”‚   └── Certificate mounting, HTTPS redirection & API routing
β”‚
β”œβ”€β”€ 🎨 Frontend Service (React 18 + Vite)
β”‚   └── Ocean Glassmorphism UI, Responsive Mobile Bottom Navigation
β”‚
β”œβ”€β”€ πŸ” Auth Microservice (FastAPI - Port 8081)
β”‚   β”œβ”€β”€ Database: hostelhub_auth (PostgreSQL)
β”‚   └── Profile sync, gender & student type tracking, RBAC role management
β”‚
β”œβ”€β”€ ⚑ Complaint Microservice (FastAPI - Port 8082)
β”‚   β”œβ”€β”€ Database: hostelhub_complaint (PostgreSQL)
β”‚   └── Complaint engine, capacity-aware worker dispatcher, Kafka producer
β”‚
β”œβ”€β”€ πŸ€– Lost & Found Microservice (FastAPI - Port 8083)
β”‚   β”œβ”€β”€ Database: hostelhub_lostfound (PostgreSQL)
β”‚   └── Gemini Vision AI tagger, location context & gender filter engine
β”‚
β”œβ”€β”€ πŸ“’ Notification Microservice (FastAPI - Port 8084)
β”‚   β”œβ”€β”€ Database: hostelhub_notifications (PostgreSQL)
β”‚   └── Apache Kafka Consumer & real-time notification broadcaster
β”‚
└── 🐘 Infrastructure Containers
    β”œβ”€β”€ PostgreSQL (Multi-database container)
    └── Apache Kafka & Zookeeper Cluster

πŸ› οΈ Technology Stack

Domain Technologies
Frontend UI React 18, Vite, Vanilla CSS (Custom Ocean Glassmorphism), Context API, Axios
Backend API Python 3.10+, FastAPI, Uvicorn, Pydantic v2, SQLAlchemy 2.0
Databases PostgreSQL (4 isolated databases per microservice)
Authentication Firebase Admin SDK, JWT Token Interceptors, Role-Based Access Control
AI / Computer Vision Google Gemini 1.5 Vision API
Message Broker Apache Kafka, Zookeeper
DevOps & Proxy Docker, Docker Compose, Nginx, Let's Encrypt SSL/TLS, DuckDNS

πŸ–ΌοΈ Dashboard Showcase & User Experiences

πŸ‘¨β€πŸ’Ό 1. Admin Dashboard

Provides system-wide user role management (Promote/Demote between Student, Worker, and Admin), real-time service health telemetry, and global complaint metrics.

image


πŸŽ“ 2. Student Dashboard

Allows students to file complaints, report lost & found items with location context, filter items by gender & campus area, and safely contact item finders.

image image


πŸ› οΈ 3. Worker Dashboard

Dedicated maintenance console for technicians to view assigned complaints based on work category specialization, monitor workload limits, and update task progress.

image


🚦 Local Setup & Deployment Guide

Prerequisites

  • Docker Engine & Docker Compose
  • Firebase Project Credentials (firebase-service-account.json)
  • Google Gemini API Key

1. Clone the Repository

git clone https://github.com/yashvanthbalaji/campusync-python-fullstack.git
cd campusync-python-fullstack

2. Environment Configuration

Create .env files in each service directory containing your database URLs, Firebase parameters, and Gemini API keys.

3. Launch with Docker Compose

docker compose up -d --build

4. Access the Microservices

  • Frontend App: http://localhost or https://campusync.tech
  • Auth Service: http://localhost:8081/docs
  • Complaint Service: http://localhost:8082/docs
  • Lost & Found Service: http://localhost:8083/docs
  • Notification Service: http://localhost:8084/docs

πŸ‘¨β€πŸ’» Developer & Author

Yashvanth Balaji
Python Full-Stack & Microservices Engineer
πŸ’» Python β€’ FastAPI β€’ React β€’ PostgreSQL β€’ Kafka β€’ Firebase β€’ Docker β€’ Cloud Architecture


⭐ Star this repository if you find it helpful!

Building high-performance, event-driven microservices for smart campuses.

About

CampuSync: An event-driven microservices architecture for hostel management. Features a React frontend, Python Flask APIs, PostgreSQL database-per-service, and Firebase Auth.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages