How pratikthisside/campops works
Project type and purpose
• This is a full-stack web application called “Campus Maintenance Scheduling System.”
• Purpose: allow users (students, teachers, admins) to raise maintenance requests, schedule and track them, and notify stakeholders (e.g. via WhatsApp).
File structure
Top-level
• README.md – project summary
• api.py, app.py, db_config.py – a Python service (likely a microservice for scheduling or data processing)
• __pycache__ – Python bytecode cache
• node_modules – Node.js dependencies (used by the Backend folder)
Backend/ (Node.js)
• server.js – main Express app
• routes/requests.js – REST endpoints for CRUD on requests
• db.js – database connection (MySQL/Mongo/etc.)
• sendWhatsApp.js – integration module to send WhatsApp notifications
• package.json & package-lock.json – Node dependencies & scripts
Frontend/ (UI)
• index.html, login.html, admin-home.html, teacher-dashboard.html, raise-request.html, view-request.html, completedRequest.html, manage-users.html, report.html, etc.
• CSS/SCSS for styling each view
• app.js, login.js, script.js – client-side logic
• campus-maintenance.component.ts/.html/.scss – an Angular component (single-page app piece)
README
• Confirms it is a “Campus Maintenance Scheduling System” focused on scheduling requests by users.
Main components & relationships
a. Components
1. Browser-based Frontend (static HTML/CSS/JS + Angular bits)
2. Node.js Backend API
3. Python Scheduling Service (api.py/app.py)
4. Database (configured via db.js in Node and db_config.py in Python)
5. External WhatsApp API (via sendWhatsApp.js)
b. Data flows
• User → Frontend UI → HTTP REST → Node.js Backend
• Node.js → reads/writes → Database
• Scheduled tasks or triggers in Python service → read pending requests → Database
• Python service → HTTP REST or messaging → Node.js sendWhatsApp module → WhatsApp API → User’s phone
• Admin dashboard views → API calls → Backend → Database
c. Architectural patterns
• Layered architecture: Presentation (Frontend), Application (Node.js + Python services), Data (Database)
• Microservice-style split: Node.js handles request lifecycle; Python handles scheduling logic.
• MVC flavor in Node.js: routes/controllers (routes/requests.js) + data layer (db.js)
d. Key technologies
• Frontend: HTML5, CSS3/SCSS, JavaScript, Angular component
• Backend: Node.js, Express.js
• Scheduling/Processing: Python (Flask or similar)
• Database: MySQL or MongoDB (see db.js / db_config.py)
• External API: WhatsApp Business API
Detailed capture of essential elements
• Frontend sub-components: login page, raise-request page, admin dashboard, Angular component.
• Node.js modules: routes/requests.js (CRUD controller), sendWhatsApp.js (notification service), db.js (data access).
• Python files: app.py/api.py (scheduling endpoints or background worker), db_config.py (DB connection).