From e0acef44c198e8c51047314990217038eeaed19b Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Thu, 30 Apr 2026 18:35:44 +0200 Subject: [PATCH] Add MIT license, contribution guide, and public repo docs --- CONTRIBUTING.md | 62 ++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 21 +++++++++++++++ README.md | 5 ++++ docs/REQUIREMENTS.md | 1 + 4 files changed, 89 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d74c711 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing + +Thanks for considering a contribution. + +## Setup + +```bash +python -m venv .venv +source .venv/bin/activate +pip install -e '.[dev]' +``` + +Copy env template: + +```bash +cp .env.example .env +``` + +Then set real values in `.env` and run: + +```bash +streamlit run app.py +``` + +## Development guidelines + +- Keep architecture boundaries clear: + - `clients/` for external integrations + - `domain/` for normalization/business logic + - `services/` for app services/indexing + - `ui/` for Streamlit rendering +- Avoid introducing optional fallback paths unless required. +- Prefer small, focused functions and explicit session-state keys. +- Preserve safe SSH behavior and path quoting. + +## Validation + +Before opening a merge request, run: + +```bash +PYTHONPATH=src python -m py_compile app.py src/media_library_viewer/*.py src/media_library_viewer/clients/*.py src/media_library_viewer/domain/*.py src/media_library_viewer/services/*.py src/media_library_viewer/ui/*.py +``` + +## Security / secrets + +Never commit: + +- `.env` +- `.streamlit/secrets.toml` +- private keys or API tokens + +Use `.env.example` for documented placeholders only. + +## Pull requests + +Please include: + +- what changed +- why it changed +- how it was tested + +If behavior/requirements changed, also update `docs/REQUIREMENTS.md`. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..14fac91 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 3cf07d8..36b72e4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ Small Streamlit app for browsing a remote Jellyfin library, inspecting files on See `docs/REQUIREMENTS.md` for the living requirements, decisions, and planning history. +Project policy/docs: + +- License: `LICENSE` (MIT) +- Contributing guide: `CONTRIBUTING.md` + ## Phase 1 features - Dashboard media counts for movies, series, and episodes, plus now-playing sessions (user, title, playback state, transcoding) diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index 4eec33b..5200601 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -314,3 +314,4 @@ Local app dependencies are declared in `pyproject.toml`; `requirements.txt` inst - Added configurable `REMOTE_PATH_PREFIX` support so Jellyfin paths can be mapped to SSH-visible paths when opening folders from Media/Library tabs (for example `/media/...` -> `/srv/media/...`). - Updated path handoff logic to prefer mapping through `REMOTE_MEDIA_ROOT` (anchor replacement using the root basename, e.g. `media`) and use `REMOTE_PATH_PREFIX` as fallback. - Added a public-repo readiness note in README describing what local/sensitive files must stay out of version control. +- Added `LICENSE` (MIT) and `CONTRIBUTING.md` for public-repo baseline documentation.