A comprehensive Django REST API for tracking vehicle maintenance schedules, service history and reminders with JWT authentication.
- π JWT Authentication & Authorization
- π₯ User Management (Registration, Login, Profile)
- π Vehicle Management
- π§ Maintenance Tracking & Scheduling
- π Service Reminders
- π Service History & Records
- π RESTful API Endpoints
- π Interactive API Documentation
- Backend: Django 4.2 & Django REST Framework
- Database: SQLite (Development) / PostgreSQL (Production-ready)
- Authentication: JWT (Simple JWT)
- API Documentation: DRF Spectacular (Swagger/OpenAPI)
- Package Management: pip
- Python 3.8+
- pip (Python package manager)
- (Optional) PostgreSQL for production
-
Clone the repository
git clone https://github.com/RitvikPatil/maintenance-tracker.git cd maintenance-tracker -
Create and activate virtual environment
# Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the project root and add:SECRET_KEY=your-secret-key-here DEBUG=True -
Run migrations
python manage.py migrate
-
Create superuser (optional, for admin access)
python manage.py createsuperuser
-
Run the development server
python manage.py runserver
Once the server is running, access the interactive API documentation at:
- Swagger UI: http://localhost:8000/api/schema/swagger-ui/
- ReDoc: http://localhost:8000/api/schema/redoc/
/api/users/- User management/api/auth/- Authentication (login, register, token refresh)/api/vehicles/- Vehicle CRUD operations/api/maintenance/- Maintenance records and scheduling
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
π GitHub: github.com/RitvikPatil/maintenance-tracker π§ Contact: [Your Email] π‘ Issues: Please use GitHub issues for any bugs or feature requests source venv/bin/activate # On Windows: venv\Scripts\activate
3. Install dependencies:
pip install -r requirements.txt
4. Create a `.env` file in the project root with the following variables:
SECRET_KEY=your-secret-key DEBUG=True DB_NAME=maintenance_tracker DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=localhost DB_PORT=5432
## Running the Project
1. Run migrations:
python manage.py migrate
2. Create a superuser:
python manage.py createsuperuser
3. Run the development server:
python manage.py runserver
## API Documentation
Once the server is running, access the API documentation at:
- Swagger UI: http://localhost:8000/api/docs/
- ReDoc: http://localhost:8000/api/redoc/
## Testing
To run tests:
python manage.py test