A minimal backend API for tracking engineering issues — think stripped-down GitHub Issues. Engineers can report bugs, assign priorities, and track statuses through a set of REST endpoints testable in Postman.
Built with Django and Django REST Framework. Data is modelled using OOP principles and stored in JSON files.
1. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate2. Install dependencies
pip install django djangorestframework3. Create the data files
mkdir data
echo "[]" > data/reporters.json
echo "[]" > data/issues.json4. Start the server
python manage.py runserverThe API will be available at http://127.0.0.1:8000.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/reporters/create/ |
Create a new reporter |
| GET | /api/reporters/all/ |
Get all reporters |
| GET | /api/reporters/?id=1 |
Get a reporter by ID |
POST /api/reporters/create/
{
"name": "Alice",
"email": "alice@example.com",
"team": "backend"
}| Method | Endpoint | Description |
|---|---|---|
| POST | /api/issues/create/ |
Create a new issue |
| GET | /api/issues/all/ |
Get all issues |
| GET | /api/issues/?id=1 |
Get an issue by ID |
POST /api/issues/create/
{
"title": "Login bug",
"description": "Users cannot login with Google",
"status": "open",
"priority": "high",
"reporter_id": 1
}Valid values:
status:open,in_progress,resolved,closedpriority:low,medium,high,critical
Both status and priority are optional — they default to open and low respectively.
Place your screenshots inside a docs/screenshots/ folder at the project root, then they will display here.
Success — Create Reporter (201)
Failure — Missing Title (400)
Success — Create Issue (201)
Failure — Issue Without Title (400)
All entities (Reporter, Issue) extend a BaseEntity abstract class. Rather than duplicating file read/write logic and ID generation in every view, three class methods were added directly to BaseEntity:
BaseEntity.read_all(file_path) # reads and parses the JSON file
BaseEntity.save_all(file_path, data) # writes data back to the JSON file
BaseEntity.generate_id(data) # returns len(data) + 1 as the next IDThis means every subclass inherits these for free without any extra code. Views call Issue.read_all(...) or Reporter.save_all(...) directly — the logic lives in one place and any future entity gets it automatically by extending BaseEntity.



