{"id":21900723,"url":"https://github.com/nwrenger/schiller-db","last_synced_at":"2025-04-15T19:54:16.091Z","repository":{"id":156782210,"uuid":"631004188","full_name":"nwrenger/schiller-db","owner":"nwrenger","description":"A repo with the backend and frontend of the Schillernova's Database Managment Software.","archived":false,"fork":false,"pushed_at":"2024-07-01T19:31:53.000Z","size":286475,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T19:54:09.293Z","etag":null,"topics":["db","rest-api","rocket","rusqlite","rust","server","swagger","swagger-ui","utoipa"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwrenger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-21T17:11:00.000Z","updated_at":"2025-02-06T19:47:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"7964cefe-e5e3-4cac-9fb8-344930f51bdd","html_url":"https://github.com/nwrenger/schiller-db","commit_stats":null,"previous_names":["nwrenger/sndm"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwrenger%2Fschiller-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwrenger%2Fschiller-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwrenger%2Fschiller-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwrenger%2Fschiller-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwrenger","download_url":"https://codeload.github.com/nwrenger/schiller-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249145296,"owners_count":21219966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["db","rest-api","rocket","rusqlite","rust","server","swagger","swagger-ui","utoipa"],"created_at":"2024-11-28T15:09:42.741Z","updated_at":"2025-04-15T19:54:16.074Z","avatar_url":"https://github.com/nwrenger.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Schillernover's Database Management or for short SchillerDB / schiller-db\n\nA repo with the server-side backend and the frontend of the Database Application of the Schillerschool for the upcoming project week.\n\n### Download\n\nThe latest builds can be downloaded from the [releases page](https://github.com/nwrenger/schiller-db/releases).\n\n### Usage\n\nJust run the binary/executable file provided in the release. Make sure it's in the same Directory as the dummy data files (benutzer.txt, logins.txt) and admin.env file otherwise it won't start. The Server Address and Port is defaulted to 0.0.0.0:80, you can change them with the flags -p (port) and -a (address). Run it with enough permissions (when using it with the default config, you have to run it as admin/sudo). In addition, using the admin.env file you can define your admin, which can't be deleted. This admin can add other Users and their permissions. Without those permissions you are unauthorized and can't interact with the Server/Database.\n\n## Architecture\n\nThis application follows the 3-tier principle.\n\n- **UI Layer:** Getting the Data from Server Calls.\n- **Application/Server Layer:** This is implemented using Rust and Rocket. Including a Swagger UI integration.\n- **Database Layer:** The SQLite database that stores the persistent data specific to a project.\n\n### UI Layer\n\nDeveloped by me and a few others (look to contributions). You can see a current state of the development by running it, look therefore into [Downloads](#Download).\n\nIt's developed by using intern Server Calls, Svelte and Bootstrap (for the UI). I finally finished the refactoring of the old plain JS version to this new and improved Svelte version. It's now way better structured and easier to develop new stuff. And Svelte generally is a big upgrade compared to old plain JS, it's a really good WebDev Framework.\n\nA Picture of the Main Page:\n\n\u003cimg src=\"images/website.png\" alt=\"Database Schema\" width=900/\u003e\n\n### Application/Server Layer\n\nThis layer is implemented in Rust ([src](src)) and [Rocket](https://rocket.rs) (0.5 rc-3).\n\nIt is responsible for the consistency checks and business logic.\nThis layer also manages the database connection to store and fetch the project data.\n\nBesides that, it also consists the management and logic for a server using [Rocket](https://rocket.rs), including Swagger UI (using the Utoipa Crate).\n\n#### Server\n\nThe Server calls are:\n\n- 8 for data table criminal and workless\n- 6 for data table user\n- 5 for logins (create, fetch, edit, delete, delete_all)\n- stats - getting general statistics/infos\n\nSwagger UI integrated via Utoipa:\n\n\u003cimg src=\"images/server_routes.png\" alt=\"Database Schema\" width=500 /\u003e\n\nSchemas:\n\n\u003cimg src=\"images/schemas.png\" alt=\"Database Schema\" width=500 /\u003e\n\nSecurity:\n\n- User System, an Admin, defined thought the admin.env file\n- Admin can add User with Permissions what they can do and cannot do like: Reading/Writing for each Data Type (User, Workless, Criminal)\n- each user can change their passwords\n- the passwords are internally hashed and cannot be directly red out of the database\n- logging every Server call (excluding Swagger UI - general GET requests) to separate file called 'log.txt' with Information who did what\n\n### Database Layer\n\nThe [SQLite](https://sqlite.org/index.html) database has the following schema:\n\n\u003cimg src=\"images/sqlite_dia.png\" alt=\"Database Schema\" width=600 /\u003e\n\n(The bold printed texts are the primary keys!)\n\n## Current Todo's\n\n- [x] DB Management\n- [x] Making a real/openable DB File\n- [x] Fetching User Data from IServ\n- [x] Server Integration\n- [x] Swagger UI Integration\n- [x] Testing, Fixing, etc.\n- [x] Logging? Why not!\n- [x] SideBar -\u003e User\n- [x] Searching (including workless, criminal, user)\n- [x] Main Input Container -\u003e Stats when nothing and User when one is selected -\u003e include changing and adding them\n- [x] Login -\u003e at the current Logout Button make a profile menu\n- [x] In profile menu: Logins Creator with permission selection (makes our job a lot easier)\n- [x] Workless Management\n- [x] Criminal Management\n- [x] fix Add Button (currently a little bit buggy)\n- [x] Better Criminal/Workless adding process\n- [x] Integration for Mobile\n- [x] Finished Criminals Extended Data Fields\n- [x] More specific search\n- [x] Network test (after we are finished with the UI)\n- [x] Using it in the project week -\u003e worked really well\n- [x] Changes due to customer feedback -\u003e absence into workless\n- [x] Moving Frontend to Svelte\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwrenger%2Fschiller-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwrenger%2Fschiller-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwrenger%2Fschiller-db/lists"}