- Siddhanth Singh (Team Leader)
- Devansh Tilala
- Dax Patel
- Tirth Soni
Problem statement - GearGuard: The Ultimate Maintenance Tracker
A maintenance tracker application built with Django backend and React frontend.
- Python 3.13+
- Node.js and npm
- Virtual environment
-
Install Python Dependencies
# Create and activate virtual environment python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install Django and dependencies pip install -r requirements.txt
-
Install Node Dependencies
npm install
-
Run Database Migrations
python manage.py migrate
-
Create a Superuser (for Django admin access)
python manage.py createsuperuser
-
Build React Frontend
npm run build
Option 1: Django Server Only (serves built React app)
source venv/bin/activate
python manage.py runserverThen visit: http://127.0.0.1:8000/
Option 2: Separate Frontend & Backend (for React development)
# Terminal 1 - Django Backend
source venv/bin/activate
python manage.py runserver
# Terminal 2 - React Frontend
npm run devThen visit: http://localhost:5173/ (Vite dev server with HMR)
Gardgear/
├── gardgear_backend/ # Django project settings
│ ├── settings.py # Django configuration
│ └── urls.py # URL routing
├── mainapp/ # Django app
│ ├── models.py # Database models (Equipment, Maintenance, etc.)
│ ├── views.py # API ViewSets
│ ├── serializers.py # DRF serializers
│ ├── urls.py # API routes
│ └── admin.py # Django admin config
├── src/ # React source files
│ ├── App.jsx # Main React component
│ ├── main.jsx # React entry point
│ └── assets/ # Static assets
├── dist/ # React build output (served by Django)
├── manage.py # Django management script
├── requirements.txt # Python dependencies
└── package.json # Node dependencies
All API endpoints are available at /api/:
-
Equipment:
/api/equipment/- List, create, view, update, delete equipment
- Custom endpoint:
/api/equipment/{id}/maintenance_history/
-
Maintenance Requests:
/api/maintenance-requests/- List, create, view, update, delete maintenance requests
- Custom endpoint:
/api/maintenance-requests/by_status/
-
Maintenance Logs:
/api/maintenance-logs/- List, create, view, update, delete logs
- ✅ Filtering by status, category, priority
- ✅ Search functionality
- ✅ Ordering/sorting
- ✅ Pagination (10 items per page)
- ✅ CORS enabled for local development
Access the Django admin panel at: http://127.0.0.1:8000/admin/
Manage:
- Equipment inventory
- Maintenance requests
- Maintenance logs
- Users and permissions
- Tracks equipment/gear with serial numbers
- Status: Operational, Under Maintenance, Retired
- Includes warranty and purchase information
- Maintenance tasks and requests
- Priority levels: Low, Medium, High, Urgent
- Status tracking: Pending, In Progress, Completed, Cancelled
- Assignment to users and due dates
- Historical records of maintenance work
- Parts replaced and costs
- Linked to maintenance requests
The React app is built with:
- ⚡ Vite for fast development
- 🎯 Direct API integration with Django backend
- 📱 Responsive design
- 🔄 Live connection status indicator
- Add a model: Edit
mainapp/models.py - Create migrations:
python manage.py makemigrations - Apply migrations:
python manage.py migrate - Add serializer: Edit
mainapp/serializers.py - Add ViewSet: Edit
mainapp/views.py - Register routes: Edit
mainapp/urls.py
- Edit React components in
src/ - Run
npm run devfor hot module replacement - Build for production with
npm run build - Django will serve the built files automatically
Create a .env file from .env.example:
cp .env.example .envThen edit .env with your values.
- Set
DEBUG=Falsein Django settings - Configure
ALLOWED_HOSTS - Run
python manage.py collectstatic - Use a production WSGI server (gunicorn, uwsgi)
- Serve static files with nginx or whitenoise
Feel free to extend the models, add new features, or improve the React UI!
This project is open source and available for modification.