Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

UIET Connect - Smart Campus Infrastructure Platform

A full-stack web platform for University Institute of Engineering and Technology (UIET), Panjab University that centralizes campus operations.

🎯 Features

  • Authentication & RBAC - Multi-role system (Student, Teacher, Admin)
  • Classroom Tracker - Real-time classroom availability
  • AI Lost & Found - Image matching using embeddings
  • Project Showcase - Student project portfolio
  • Events System - Club events and registrations
  • AI Chatbot - Campus assistant for queries

πŸ› οΈ Tech Stack

Frontend

  • React 18 + Vite
  • TypeScript
  • Tailwind CSS
  • ShadCN UI Components
  • React Router v6
  • Axios
  • Zustand (State Management)

Backend

  • Node.js + Express
  • JWT Authentication
  • Prisma ORM
  • PostgreSQL
  • Role-based Access Control

AI Services

  • Python FastAPI (Lost & Found matching)
  • OpenCV / face_recognition
  • OpenAI/Gemini API (Chatbot)

Storage

  • Supabase Storage / AWS S3

πŸ“ Project Structure

uiet-connect/
β”œβ”€β”€ frontend/                 # React + TypeScript frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/      # Reusable components
β”‚   β”‚   β”œβ”€β”€ pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ hooks/           # Custom hooks
β”‚   β”‚   β”œβ”€β”€ services/        # API services
β”‚   β”‚   β”œβ”€β”€ types/           # TypeScript types
β”‚   β”‚   β”œβ”€β”€ layouts/         # Layout components
β”‚   β”‚   β”œβ”€β”€ store/           # Zustand store
β”‚   β”‚   └── utils/           # Utility functions
β”‚   β”œβ”€β”€ public/
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/                  # Node.js + Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/     # Route controllers
β”‚   β”‚   β”œβ”€β”€ routes/          # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/      # Auth, validation
β”‚   β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”‚   β”œβ”€β”€ utils/           # Helper functions
β”‚   β”‚   └── types/           # TypeScript types
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   └── schema.prisma    # Database schema
β”‚   └── package.json
β”‚
β”œβ”€β”€ ai-service/               # Python FastAPI microservice
β”‚   β”œβ”€β”€ main.py              # FastAPI app
β”‚   β”œβ”€β”€ model.py             # ML model
β”‚   β”œβ”€β”€ embeddings.py        # Image processing
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── .env
β”‚
└── docs/
    β”œβ”€β”€ API.md               # API documentation
    └── SETUP.md             # Setup instructions

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.9+
  • PostgreSQL 14+
  • npm or yarn

1. Clone and Install

# Clone repository
git clone <repo-url>
cd uiet-connect

# Install frontend dependencies
cd frontend
npm install

# Install backend dependencies
cd ../backend
npm install

# Install AI service dependencies
cd ../ai-service
pip install -r requirements.txt

2. Environment Setup

Backend (.env)

DATABASE_URL="postgresql://user:password@localhost:5432/uiet_connect"
JWT_SECRET="your-secret-key-here"
JWT_EXPIRES_IN="7d"
PORT=5000

# Storage
STORAGE_PROVIDER="supabase" # or "aws"
SUPABASE_URL="your-supabase-url"
SUPABASE_KEY="your-supabase-key"

# AI Service
AI_SERVICE_URL="http://localhost:8000"

Frontend (.env)

VITE_API_URL=http://localhost:5000/api
VITE_AI_SERVICE_URL=http://localhost:8000

AI Service (.env)

MODEL_PATH="./models"
EMBEDDING_DIM=512
SIMILARITY_THRESHOLD=0.75

3. Database Setup

cd backend

# Generate Prisma Client
npx prisma generate

# Run migrations
npx prisma migrate dev

# Seed database (optional)
npx prisma db seed

4. Run Services

Terminal 1 - Backend

cd backend
npm run dev

Terminal 2 - Frontend

cd frontend
npm run dev

Terminal 3 - AI Service

cd ai-service
uvicorn main:app --reload --port 8000

🎨 Design System

Colors

  • Primary: #1E3A8A (Deep Academic Blue)
  • Secondary: #F8FAFC (Light Background)
  • Accent: #0EA5E9 (Modern Blue Accent)
  • Success: #16A34A (Green)
  • Error: #DC2626 (Red)
  • Warning: #F59E0B (Yellow)

Typography

  • Font Family: Inter, system-ui
  • Headings: Bold, 600-700 weight
  • Body: Regular, 400 weight

πŸ“š API Documentation

See API.md for complete API documentation.

Base URL

http://localhost:5000/api

Authentication

All protected routes require JWT token in header:

Authorization: Bearer <token>

πŸ” User Roles

  1. Student

    • View classrooms
    • Upload/search lost items
    • Submit projects
    • Register for events
    • Use chatbot
  2. Teacher

    • All student permissions
    • Approve projects
    • Create events
  3. Admin

    • All permissions
    • Approve users
    • Manage classrooms
    • System configuration

πŸ§ͺ Testing

# Backend tests
cd backend
npm test

# Frontend tests
cd frontend
npm test

# AI Service tests
cd ai-service
pytest

πŸ“¦ Deployment

Production Build

Frontend

cd frontend
npm run build

Backend

cd backend
npm run build

Docker Deployment

docker-compose up -d

πŸ›‘οΈ Security Features

  • Bcrypt password hashing
  • JWT with expiration
  • Role-based access control
  • Input validation
  • SQL injection prevention (Prisma ORM)
  • File upload restrictions
  • Rate limiting

πŸ“ˆ Development Phases

  • βœ… Phase 1: Auth + Classroom Module
  • ⏳ Phase 2: Lost & Found with AI
  • ⏳ Phase 3: Projects + Events
  • ⏳ Phase 4: Chatbot Integration

🀝 Contributing

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

πŸ“ License

This project is licensed under the MIT License.

πŸ‘₯ Team

Developed for UIET, Panjab University

πŸ“ž Support

For issues and questions, please create an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages