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.
- 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.
βββ 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
Before running the application, ensure you have the following installed:
- Clone the Repository (after downloading/pushing your code):
git clone <your-repository-url>
cd campusfix
- Install Dependencies:
npm install
- Configure Environment Variables:
Duplicate the
.env.examplefile and rename it to.env. Populated it with your MongoDB credentials:
MONGODB_URI=your_mongodb_connection_string
PORT=5000
To spin up both the Vite frontend development server and the backend server:
npm run dev
To compile the highly-efficient build paths and start the production application:
npm run build
npm start