For Developers¶
Itching to add a new feature or tweak the app? Look no further.
Tech Stack¶
PurpleOps uses the following components:
- Flask (python webserver backend)
- Flask-Security (manages auth/MFA)
- Jinja (HTML templating engine)
- MongoDB (database)
File Structure¶
blueprints/
- Houses the backend python / flask code, broken up per area. Large files are broken e.g.assessment_import.py
custom/
- Houses custom data, sample data comes bundled, but this is for you to add your own custom filesknowledgebase/
- Houses custom writeups to overwrite default MITRE TTP descriptions / remedial advicereports/
- Houses custom Jinja.docx
files for reportingtestcases.json
- Houses custom testcases templates to inject alongside Atomic Red Team testcase templates
files/
- Houses engagment evidence and exports<assessmentid>/
<testcaseid>/
static/
- Houses JS (broken up by area) and imagesimages/
scripts/
templates/
- Houses HTML marked up with Jinja to be rendered by the backend code - broken up by area - large files are further fragmented e.g.testcase_modals.html
master.html
- Rendered with every page, contains JS libs and styling...
.env
- Houses environment variables. Secret related vars are populated byseeder.py
flask.cfg
- Stores oodles of flask configuration settingsmodel.py
- Database object schema definitions and object helper functions e.g.TestCase.to_json()
purpleops.py
- The "main" file. Loads dependencies and starts flaskREADME.md
- Pretty page for GitHubrequirements.txt
- Python dependanciesseeder.py
- Populates the database (KBs, testcases, MITRE writeups, secrets, users...)utils.py
- Backend helper functions shared between app areas