stelae 0.6.5

A collection of tools in Rust and Python for preserving, authenticating, and accessing laws in perpetuity.
Documentation

- get stelae onboarding documentation in shape
 
goals:

- onboarding
- get open source contributors (low priority)

- overview of each docs.rs/stelae module in better detail


TAF (The Archive Framework) -> TUF

- manages law repository
- iterates through targets/<org-name>/<repo-name> commit hashes and validates the state of data repositories

# law repo


stelae serve && stelae git

## targets/


Ideal workflow:

- TAF retries/validates/authenticates the data repositories on your disk
- stelae serves those data repositories (in whichever state they are in!)

### repositories.json


- Configures which data repositories are managed by the law repository
- One to many relationship between law and law-* data repositories
- taf looks at each `repositories` keys entry. e.g "cityofsanmateo/law-docs". Then clones/updates the data repository
- Each entry ("cityofsanmateo/law-docs") has a "custom" attribute. "custom" is NOT managed by taf!!!

Some parts of "custom" field are managed by stelae!

- "routes"
  - glob patterns used to match the API request from browser to the correct data repository
- "serve"
  - "latest" or "historical"
    - currently stelae only supports latest! (serves from HEAD commit of the authentication repository)

- "serve-prefix"
   - prefix to the URL used to search for in that particular data repository. e.g.
     - "_rdf" -> stelae looks at the law-rdf repository when that prefix is added!

- "is_fallback"
 -  fallback data repository when url request is not matched against any other data repository!

stelae 

- single tenant (on one instance, serve one partner)
- multitenancy (on one instance, serve multiple partners (jurisdictions))



(low priority)
TODO: `repositories.json` is consistent with stelae

- validate that serve-prefix do not overlap. e.g. error if "_xml" appears twice in repositories.json
- error if multiple `is_fallback` exists in `repositories.json`

stelae git

- serve the archive from an arbitrary commit hash! (replicates some of the historical serve)

### dependencies.json


### mirrors.json


### info.json


### stelae multitenancy


- dependencies.json
- X-Stelae header


-> localhost:8080/_reader/js/main.js


_reader/js/main.js -> RepoData {
    archive_path: "D:\OLL\oll-test-repos\stelae-archive\"
    name: "cityofsanmateo/law-static-assets"
}

cwd

D:\OLL\oll-test-repos\stelae-archive

C:\users\stelae.exe serve


Go over guarded header

## current stelae frameworks


[actix-web](https://actix.rs/)
[clap](https://github.com/clap-rs/clap)
[serde](https://serde.rs/)
[sqlx](https://github.com/launchbadge/sqlx)
[sophia](https://docs.rs/sophia/latest/sophia/)

### <org-name>/<repo-name>


Stores commit hashes (with additional metadata) that TAF uses to authenticate data repositories



Not that important for stelae project (right now)

  - cityofsanmateo/law-html
  - */law-rdf
  - */law-xml-codified