Skip to content

Latest commit

Β 

History

History
101 lines (65 loc) Β· 2.88 KB

File metadata and controls

101 lines (65 loc) Β· 2.88 KB

CampusFix

CampusFix is a real-time, end-to-end incident reporting and ticketing application designed for college campuses. It allows authenticated students to log infrastructure or facility incidents and enables authorized staff members to manage, track, and resolve them dynamically.


πŸš€ Features

  • Clean Slate Architecture: Completely wiped of historic mock data for a true 0-baseline production experience.
  • Dual-Database Support: Equipped with a seamless failover system leveraging both a local JSON database and remote MongoDB integration.
  • Dynamic Dashboard: Live front-end counters track active, pending, and resolved issues starting strictly from zero.
  • Real-time Alerts: Clear, reactive notification system to keep users updated on ticket status changes.

πŸ“‚ Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   β”œβ”€β”€ db.js             # MongoDB connection and cleanup routines
β”‚   β”‚   β”œβ”€β”€ ticketModel.js    # Mongoose schema definitions
β”‚   β”‚   └── local_db.json     # Local fallback database registry (empty array)
β”‚   β”œβ”€β”€ App.jsx               # Main dashboard UI component and state hooks
β”‚   β”œβ”€β”€ data.js               # Initial ticket registries and static data voids
β”‚   β”œβ”€β”€ main.jsx              # React DOM entry point
β”‚   β”œβ”€β”€ index.css             # Application styling
β”‚   └── utils.js              # Helper utilities
β”œβ”€β”€ .env.example              # Sample environment variables
β”œβ”€β”€ .gitignore                # Git untracked file configurations
β”œβ”€β”€ index.html                # Application entry HTML
β”œβ”€β”€ metadata.json             # Application metadata configuration
β”œβ”€β”€ package.json              # Project dependencies and script definitions
β”œβ”€β”€ server.js                 # Backend Node.js express server
└── vite.config.js            # Vite build tool configuration


πŸ› οΈ Prerequisites

Before running the application, ensure you have the following installed:

  • Node.js (v16 or higher)
  • MongoDB (Optional: for remote database state)

βš™οΈ Installation & Setup

  1. Clone the Repository (after downloading/pushing your code):
git clone <your-repository-url>
cd campusfix
  1. Install Dependencies:
npm install
  1. Configure Environment Variables: Duplicate the .env.example file and rename it to .env. Populated it with your MongoDB credentials:
MONGODB_URI=your_mongodb_connection_string
PORT=5000

πŸƒβ€β™‚οΈ Running the Application

Development Mode

To spin up both the Vite frontend development server and the backend server:

npm run dev

Production Build

To compile the highly-efficient build paths and start the production application:

npm run build
npm start