{"id":19842870,"url":"https://github.com/deemp/nix-stores-explorer","last_synced_at":"2026-03-04T19:31:37.558Z","repository":{"id":233177112,"uuid":"786146058","full_name":"deemp/nix-stores-explorer","owner":"deemp","description":"Requirements for a BS SQR project","archived":false,"fork":false,"pushed_at":"2024-04-13T20:17:24.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-14T10:47:57.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deemp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-13T15:18:12.000Z","updated_at":"2024-04-14T10:48:02.396Z","dependencies_parsed_at":"2024-04-14T10:58:04.020Z","dependency_job_id":null,"html_url":"https://github.com/deemp/nix-stores-explorer","commit_stats":null,"previous_names":["deemp/nix-stores-explorer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deemp/nix-stores-explorer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemp%2Fnix-stores-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemp%2Fnix-stores-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemp%2Fnix-stores-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemp%2Fnix-stores-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deemp","download_url":"https://codeload.github.com/deemp/nix-stores-explorer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deemp%2Fnix-stores-explorer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30090518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T18:31:08.343Z","status":"ssl_error","status_checked_at":"2026-03-04T18:31:07.708Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-12T12:35:54.871Z","updated_at":"2026-03-04T19:31:37.531Z","avatar_url":"https://github.com/deemp.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nix Stores Explorer\n\nThe project goal is to build a service for exploring Nix stores ([link](https://nixos.org/)).\n\n## Technical Stack\n\n- Python 3.11\n- Poetry as an environment and module management\n- FastAPI for the REST\n- OpenAPI for REST docs\n- SQLite for persistency\n- Streamlit for the front\n- GitHub for repo and CI\n- Nix for dependency management\n\n### Functionality\n\nA user should be able to:\n\n- Register\n- Log in\n- Log out\n- Perform tasks with Nix stores (using a `nixpkgs` version installed on the server):\n  - Create a store with a given name\n    - A store name exists only for a user\n    - Use a local store ([link](https://nixos.org/manual/nix/unstable/store/types/local-store.html#local-store))\n      - In case of problems try to `nix profile install` ([link](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-profile-install)) another `nix` version ([link](https://search.nixos.org/packages?channel=unstable\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=nix)).\n    - Or, use the default store with user profiles - see `nix profile install --profile` and `nix profile remove --profile` ([link](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-profile-install))\n  - Get a list of existing stores\n  - Remove a store with a given name\n  - Add a package to a store\n  - Remove a package from a store\n  - Get the difference of sets of paths in two given stores\n  - Get the difference of closures of two given packages\n    - [1](https://zero-to-nix.com/concepts/closures), [2](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-path-info), [3](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-derivation-show)\n    - Given `nixpkgs#bash` and `nixpkgs#hello`, find the paths that are dependencies of `nixpkgs#bash` (including its `out`), but aren't dependencies of `nixpkgs#hello`\n    - Packages can be in different stores\n  - Get the size (in bytes) of a package closure\n  - Check whether a package is in the store\n\n## Back end\n\n- Respond with `JSON` to requests for known functionality (see [Functionality](#functionality)).\n  - Example: send a `JSON` with a reason why a user could not be registered.\n- Respond with errors to requests for unknown functionality.\n\n## Front end\n\nThis is a minimum:\n\n- Input field for a JSON request\n- A button to submit the request\n- A field to pretty-print the server response\n\n## Deployment\n\nThe service should be runnable on a Linux machine.\n\n## GitHub Actions\n\nSuggested actions:\n\n- [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)\n- [nix-community/cache-nix-action](https://github.com/nix-community/cache-nix-action)\n\n## Nix Stores\n\nNote that performing tasks with Nix stores does not go beyond:\n\n- Querying an SQLite database located in `/nix/var/nix/db/db.sqlite` of a store\n- Running [Nix commands](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix)\n- Keeping track of associations between users and their stores in an SQLite database\n\n## Nix Flake\n\n- Permanently enable flakes during development ([link](https://nixos.wiki/wiki/Flakes#Other_Distros.2C_without_Home-Manager)).\n\n- Provide a basic [Nix flake](https://nixos.wiki/wiki/Flakes) using [flake-utils](https://github.com/numtide/flake-utils) or [flake-parts](https://flake.parts/).\n\n## Scripts\n\nIn the flake, provide scripts for testing your application according to the [Quality Requirements](#quality-requirements).\n\nScripts should be defined in Nix via [writeShellApplication](https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication).\n\n## Quality Requirements\n\nQuality requirements are expressed as quality attribute scenarios.\n\nQuality characteristics source - [ISO/IEC 25010](https://iso25000.com/index.php/en/iso-25000-standards/iso-25010).\n\n### Maintainability\n\n#### Testability\n\n- **Source:** developer\n- **Stimulus:** developer creates a new function\n- **Environment:** normal development\n- **Artifact:** a module\n- **Response:** developer adds unit tests (doctests or anything else)\n- **Response measure:**\n  - [Coverage](https://www.atlassian.com/continuous-delivery/software-testing/code-coverage)\n  - Statement coverage is over 60%\n  - Branch coverage is over 60%\n  - Function coverage is over 60%\n\n### Reliability\n\n#### Recoverability\n\n- **Source:** developer\n- **Stimulus:** developer stops the server\n- **Environment:** normal operation\n- **Artifact:** each store\n- **Response:** store database agrees with the store contents\n- **Response measure:**\n  - 100% of ValidPaths listed in the store database are in the store.\n\n### Performance Efficiency\n\n#### Time Behavior\n\n- **Source:** users\n- **Stimulus:** 10 requests per second for 1 minute\n- **Environment:** normal operation\n- **Artifact:** server\n- **Response:** server response\n- **Response measure:**\n  - Server responds to each request within 1 second\n\n### Security\n\n#### Confidentiality\n\n- **Source:** user\n- **Stimulus:** registers with a name and a password\n- **Environment:** normal operation\n- **Artifact:** the server\n- **Response:**\n  - server stores the user name and an encrypted password in the database and responds about successful registration\n  - server responds that the username is taken, suggests to log in\n- **Response measure:**\n  - server\n    - within 1 second\n    - successfully retrieves the encrypted password from the database via the username\n    - successfully verifies the password supplied by the user using `bcrypt` ([link](https://gabrieleromanato.name/python-how-to-use-bcrypt-for-encrypting-passwords), [link](https://stackabuse.com/hashing-passwords-in-python-with-bcrypt))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeemp%2Fnix-stores-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeemp%2Fnix-stores-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeemp%2Fnix-stores-explorer/lists"}