A digital tally sheet for use in trusted environments. https://demo.strichliste.rs
This repository has been archived on 2026-04-12. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Rust 86.1%
  • Python 6.2%
  • Nix 3.3%
  • CSS 3.2%
  • TypeScript 0.9%
  • Other 0.2%
Find a file
DestinyofYeet a731094dc7
All checks were successful
Build / build (pull_request) Successful in 8s
Check / check_commit_format (pull_request) Successful in 4s
Check / check (pull_request) Successful in 25s
fix(workflows): fix pipelines
2025-12-23 21:24:47 +01:00
.github fix(workflows): fix pipelines 2025-12-23 21:24:47 +01:00
.sqlx prepare-sqlx 2025-10-16 09:05:33 +02:00
diagramm feat(diagramm): Adds svgs 2025-06-23 20:11:57 +02:00
end2end chore(fmt): Ran "nix fmt" 2025-09-10 13:28:47 +02:00
migrations Adds migration script 2025-10-16 09:05:33 +02:00
nix fix(workflows): fix pipelines 2025-12-23 21:24:47 +01:00
public feat(sounds): Added dynamic sounds 2025-09-02 00:15:47 +02:00
scripts feat: added prefix filter 2025-11-12 23:52:53 +01:00
src refactor: re-writes check 2025-11-13 01:56:26 +01:00
.envrc feat(build): makes project buildable with nix 2025-06-20 13:52:29 +02:00
.gitignore fix(caching): Fixes the sound caching 2025-10-29 15:23:20 +01:00
Cargo.lock chore(version): Bump version 2025-11-07 14:09:30 +01:00
Cargo.toml feat: added prefix filter 2025-11-12 23:52:53 +01:00
config_example.yaml feat(sounds): Adds ability to set withdraw and deposit sounds 2025-10-19 22:26:33 +02:00
flake.lock fix(workflows): fix pipelines 2025-12-23 21:24:47 +01:00
flake.nix fix(workflows): fix pipelines 2025-12-23 21:24:47 +01:00
LICENSE Update LICENSE 2025-10-04 21:25:34 +02:00
README.md feat(scan_input): Adds scaninput_manager 2025-11-10 11:00:04 +01:00

General information

This is a digital tally sheet for use in trusted environments.

You can test it out on https://demo.strichliste.rs

Build

Build with nix

nix build

Build with cargo-leptos

SQLX_OFFLINE=true cargo leptos build --release

Development

With nix

If you have nix direnv

direnv allow .

Otherwise just do

nix develop

then do

mkdir tmp
sqlx database setup
cargo leptos watch -- -d ./tmp/db.sqlite -c ./config_example.yaml

Without Nix / Other instructions

Install the following dependencies:

  • rust
  • cargo-leptos
  • sqlx (sqlx-cli)
  • tailwind
  • sqlite
# could also be present in a .env
export DATABASE_URL="sqlite:tmp/db.sqlite" # not needed with nix (env is in flake.nix)

mkdir tmp
sqlx database setup
cargo leptos watch -- -d ./tmp/db.sqlite -c ./config_example.yaml

Preparing for build

We use sqlx and compile-time checked queries. This has the drawback of needing a live db to check the queries, which is not possible in build environments. So we "cache" the sqlx queries using the following command:

# this is an alias to scripts/prepare-sqlx
prepare-sqlx

This step is needed in order for the build instructions to work. This step should be done after changing queries and before merging into main.

Project structure

Rules for extending the folder structure

  • In each folder that contains other folders it is allowed to add a shared folder (if its not a folder named shared itself)
  • Folders should not contain a folder with the same name or a file with the same name. (clippy will enforce this by default for rust files / folders)
  • always use singular for folder names

Folder structure

  • src

    everything rust related should live inside here

    • backend

      server functions

      • database

        things only related to database interactions

        • model

          structs, new, trait implementation for general purpose traits (Display, Debug)

        • behaviour

          a interaction with the database that can be performed i.e.: create_user.rs send_money.rs

        • misc

          things that don´t fit into either models or behaviours

        • convert

          conversion between foreign or database only types

      • convert

        conversion between database types and backend types
        prefer implementing the From
        file name: {StructNameA}_from_{StructNameB}.rs

      • core

        code that does not interact with the database directly

        • model

          structs, new, trait implementation for general purpose traits ( Display, Debug)

        • behaviour

          a interaction with a backend
          may include multiple interactions with the database

        • misc

          things that don´t fit into either models or behaviours

      • shared

        helper functions that are shared in the entire backend)

    • convert

      conversion between frontend types and backend types
      prefer implementing the From
      file name: {StructNameA}_from_{StructNameB}.rs

    • model

      Models shared by backend and frontend It is allowed to implement functions on these in both frontend and backend Can be DTOs

    • frontend

      code run on the client / at hydration

      • cachinglayer

        client side caching of data while re-fetching from the server

      • style

        tailwind css configs

      • behaviour

        implementations of structs that aren't components

      • component

        reusable components (most things go here)

        • icon

          all used icons should be extracted into a own component

        • user

          everything related to displaying users

        • transaction

          everything related to displaying transactions

        • article

          everything related to displaying articles

      • route

        page views composed of components the files in this directory should be tiny if they get to complex create a component instead

        • articles

          everything related to article only interaction lives under /articles

        • user

          everything related to users only interaction lives under /user

      • shared

        helper functions that are shared in the entire frontend

      • model

        structs, new, trait implementation for general purpose traits (Display, Debug)

    • shared

      helper functions that are needed in the backend and in the frontend

  • nix

    all realted to nix except flake.nix and flake.lock

  • diagramm

    some uml diagrams made to sketch the db layout

  • end2end

    end 2 end test infrastructure

    • tests

      actual end 2 end tests

  • migrations

    db migrations generated by sqlx

  • public

    all files publicly served by the webserver

    • sounds

      sound files for development

  • scripts

    small helper scripts for development and checks