{"id":24513519,"url":"https://github.com/zacharlie/osgs-admin","last_synced_at":"2026-04-18T13:34:59.510Z","repository":{"id":46550115,"uuid":"410116710","full_name":"zacharlie/osgs-admin","owner":"zacharlie","description":"Admin UI for the Open Source Geospatial Stack","archived":false,"fork":false,"pushed_at":"2021-10-10T15:49:38.000Z","size":1065,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T10:25:04.013Z","etag":null,"topics":["admin","docker","docker-compose","gis","hacktoberfest","open-source","osgs","python"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zacharlie.png","metadata":{"files":{"readme":"README-DEV.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-24T22:23:34.000Z","updated_at":"2021-10-22T22:15:24.000Z","dependencies_parsed_at":"2022-09-01T17:13:25.448Z","dependency_job_id":null,"html_url":"https://github.com/zacharlie/osgs-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zacharlie/osgs-admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharlie%2Fosgs-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharlie%2Fosgs-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharlie%2Fosgs-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharlie%2Fosgs-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacharlie","download_url":"https://codeload.github.com/zacharlie/osgs-admin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacharlie%2Fosgs-admin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","docker","docker-compose","gis","hacktoberfest","open-source","osgs","python"],"created_at":"2025-01-22T00:55:23.105Z","updated_at":"2026-04-18T13:34:59.476Z","avatar_url":"https://github.com/zacharlie.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OSGS Admin Development\n\nThis serves as the basic developer info documentation for the OSGS Admin app (at least until there is a proper docs project instantiated).\n\n## Design\n\nThe core concepts of the application is building a docker-compose app that is used to manage a particular docker-compose app in an intuitive and user-friendly way, especially for users with more limited development expertise.\n\nThe requirements and considerations for it's design are therefore outlined as:\n\n- Requires connecting application containers to host resources\n- Asynchronous tasks are needed to perform system calls from web application\n- Due to it's nature, it is not designed to be exposed publicly over the internet\n\nAs a result, the app focusses on achieving the following design objectives:\n\n- Minimalist design - do one thing well\n- Minimise utilisation of extraneous dependencies\n- Package or provide all static resources to be offline-capable\n\n## Security\n\nObviously, mounting various host system resources is incredibly dangerous for a webapp. There's not much else to say about this tbh.\nWe can try to keep dependencies to a minimum, and use flask-login, but at the end of the day I don't think this could be considered a secure app.\n\n## Structure\n\nThe core backend application is Nginx + Flask as a web application/ UI, with Redis + Celery as task brokers for asynchronous operations.\n\nThe core of the frontend uses bulma css, animate.css, charts.js, material icons, and alpine.js for async and reactivity.\n\nThe application structure mostly tries to make things decoupled between the front and backends, in that most of the metrics etc are delivered to a rest endpoint which is consumed by the frontend.\nMucking around with async complexity seems redundant, so we rather just poll a rest endpoint for updates instead. even if it's not super efficient it's simple.\nBecause the endgame is to move to a more distributed cloud based platform, most operations are expected to use rest api endpoints eventually anyway.\n\nThe operations are also mostly just post functions which call celery tasks. Where things aren't configured this way, the intention is to change them to do so.\n\nThe flask application structure is also split up into various logical components to keep things a bit neater.\nOf course this means if you're extending the app you need to understand the structure for imports.\n\nThis is supposed to help:\n\n```text\n├── app                                         The application directory that is bound\n│   │                                           to the stack instance at /app/ by default\n│   │\n│   ├── app.py                                  Flask app runner\n│   │\n│   ├── reloader                                Blank reloader which restarts uWSGI when touched\n│   │                                           and is used by watchdog for hot reloading in dev\n│   │\n│   ├── osgs                                    The OSGS repo directory (default is osgs)\n│   │   │\n│   │   └── docker-compose.yaml                 The stack is currently based on docker-compose\n│   │\n│   ├── osgs_admin                              Core OSGS Admin application directory\n│   │   │\n│   │   ├── static                              Flasks static assets\n│   │   │\n│   │   ├── config                              Application configuration\n│   │   │   │\n│   │   │   ├── __init__.py                     Base setter and getter methods for configs\n│   │   │   │\n│   │   │   ├── config.json                     Default user config file\n│   │   │   │\n│   │   │   └── osgs_default_config.py          Default app config for database bootstrap and\n│   │   │                                       reset operations - not user editable\n│   │   │\n│   │   ├── auth.py                             Blueprint for flask login and user operations\n│   │   │\n│   │   ├── main.py                             Main blueprint for public pages and dashboard\n│   │   │\n│   │   ├── ops.py                              Operations blueprint for osgs-admin config tasks\n│   │   │\n│   │   ├── db.sqlite                           Default database location\n│   │   │\n│   │   ├── models.py                           Flask models\n│   │   │\n│   │   ├── tasks                               Jobs, tasks, and related utilities for Celery\n│   │   │\n│   │   ├── templates                           Flask html templates\n│   │   │   │                                   Template pages intended to be reused or extended\n│   │   │   │                                   will have a leading underscore by convention.\n│   │   │   │                                   The main pages stored within this root will be\n│   │   │   │                                   core app pages such as login.html, error.html etc\n│   │   │   │\n│   │   │   ├── components                      Component templates and jinja macros, such as loaders,\n│   │   │   │                                   progress bars, modals, toasts, and other ui/ ux elements.\n│   │   │   │\n│   │   │   ├── config                          Configuration and settings page templates\n│   │   │   │\n│   │   │   ├── dashboard                       Dashboard page templates\n│   │   │   │\n│   │   │   ├── ops                             Operation specific pages, designed for performing\n│   │   │   │                                   functions and checking status, such as cloning\n│   │   │   │                                   a git repository or resetting some configurations\n│   │   │   │\n│   │   │   ├── users                           User operation templates, including the users\n│   │   │   │                                   data table and CRUD operations like password resets\n│   │   │   │\n│   │   │   └── utils                           Jinja macros, utilities, and helper functions for\n│   │   │                                       use in templates, such as generic type casting or\n│   │   │                                       uuid generation for DOM component ids etc\n│   │   │\n│   │   └── utils                               Utilities and helper functions for use within flask,\n│   │                                           such as retrieving docker, git, or system stats\n│   │\n│   ├── tests                                   What it says on the box\n│   │\n│   └── uwsgi.ini                               The uwsgi app config. Note that this is for the\n│                                               admin app itself and not the stack, so threading\n│                                               etc is not going to affect the OSGS stack performance\n│\n└── docker-compose.yml                          Get going with just `docker-compose up -d`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacharlie%2Fosgs-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacharlie%2Fosgs-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacharlie%2Fosgs-admin/lists"}