Metadata-Version: 2.4
Name: org-unit
Version: 0.1.0
Summary: organizational structure digitalization
Project-URL: Homepage, https://github.com/roebi/org-unit
Project-URL: Repository, https://github.com/roebi/org-unit.git
Project-URL: Issues, https://github.com/roebi/org-unit/issues
Author-email: roebi <your.email@example.com>
License: MIT
Keywords: fastapi,organization,sqlite,structure
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Natural Language :: German
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business
Requires-Python: >=3.13
Requires-Dist: aiosqlite<0.23,>=0.22
Requires-Dist: fastapi<0.137,>=0.136.1
Requires-Dist: sw-dev-agent-framework<0.2,>=0.1.1
Requires-Dist: uvicorn[standard]<0.48,>=0.47
Provides-Extra: dev
Requires-Dist: httpx<0.29,>=0.28; extra == 'dev'
Requires-Dist: pip-audit; extra == 'dev'
Requires-Dist: pytest-asyncio<1.4,>=1.3.0; extra == 'dev'
Requires-Dist: pytest<10,>=9.0.3; extra == 'dev'
Description-Content-Type: text/markdown

# org-unit

Digitalize the organizational structure (Aufbauorganisation) of a juristical person.

Built using the [sw-dev-agent-framework](https://pypi.org/project/sw-dev-agent-framework/)
development process, starting from `concept.md`.

## Development phases

| Phase           | Skill                    | Status      | Output          |
|-----------------|--------------------------|-------------|-----------------|
| 1. Requirements | `gather-requirements-en` | in progress | requirements.md |
| 2. Design       | `design-architecture-en` | pending     | architecture.md |
| 3. Implement    | `apply-tdd-loop-en`      | pending     | src/ + tests/   |
| 4. Review       | `code-review-en`         | pending     | review.md       |
| 5. Release      | `release-sw-project-en`  | pending     | tagged release  |

## Setup

```bash
uv sync
uv run sw-dev-agent start "Digitalize the organizational structure of a juristical person - see concept.md"
```

## Run (Podman)

```bash
podman build -t org-unit .

podman run -d \
  -p 8000:8000 \
  -v org-unit-data:/app/data \
  --name org-unit \
  org-unit:latest
```

- OpenAPI spec: [http://localhost:8000/openapi.json](http://localhost:8000/openapi.json)
- Swagger UI:   [http://localhost:8000/docs](http://localhost:8000/docs)
- Web GUI:      [http://localhost:8000](http://localhost:8000)

## Key design decisions

See `concept.md` for the full agreed concept.

Short summary:

- One OrgUnit tree (self-referencing parent_id)
- Flat Person table (no hierarchy)
- Assignment bridge table (N:M, carries role_label)
- No hard delete - deactivate via valid_until
- Bi-temporal: valid_from / valid_until (9999-12-31 = active) / updated_at
- mutation_reason mandatory on every POST and PATCH
- History tables: org_unit_history, person_history, assignment_history
- SQLite in /app/data/org-unit.db (Podman volume)
- DE/EN language switch in GUI
