Skip to content

wiggnash/devTrack

Repository files navigation

DevTrack

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.

How to Run

1. Create and activate a virtual environment

python -m venv venv
source venv/bin/activate

2. Install dependencies

pip install django djangorestframework

3. Create the data files

mkdir data
echo "[]" > data/reporters.json
echo "[]" > data/issues.json

4. Start the server

python manage.py runserver

The API will be available at http://127.0.0.1:8000.


API Endpoints

Reporters

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"
}

Issues

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, closed
  • priority: low, medium, high, critical

Both status and priority are optional — they default to open and low respectively.


Screenshots

Place your screenshots inside a docs/screenshots/ folder at the project root, then they will display here.

Success — Create Reporter (201)

Create Reporter Success

Failure — Missing Title (400)

Create Reporter Failure

Success — Create Issue (201)

Create Issue Success

Failure — Issue Without Title (400)

Create Issue Failure


Design Decision: Shared File I/O and ID Generation on BaseEntity

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 ID

This 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.

About

A minimal backend API for tracking engineering bugs — report issues, assign priorities, and track statuses. Built with Django REST Framework, modelled with OOP.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages