This repository contains the source code for the app to be used at the registration desk of the Kirpal Sagar Charitable Hospital.
The Registration Desk is used by nurses and clerks. The tasks they need to do there are around the patient registration and billing.
The app depends upon the Backend for the reading and writing of its data. For this purpose, it is accessing the REST API of the backend with the help of the K.S.C.H. Dart Client.
The following section gives an overview of the code in this repository. For the big picture view, please refer to the K.S.C.H. Workflows architecture documentation.
The Registration Desk app is a single-page web application, powered by Flutter Web.
/doc
: Miscellaneous files for the project documentation./lib
: Main home of the application's source code./api
: Provides services and data structures for the access of the REST API of the app's backend./l10n
: Files required for the localization of the app./pages
: Every page of the web app gets a directory here./util
: Non-UI related tools which may be accessed from all other parts of the app./widgets
: UI components which may be access from all pages of the app.
/test
: The code in the/test
directory reflect the structure of the/lib
directory./web
: HTML scaffold for the generated web page.
Clean code always looks like it was written by someone who cares. There is nothing obvious you can do to make it better. - Michael Feathers
- TDD: Enable a stable code base which supports regular refactoring by test-driven development.
- SOLID: Keep the code base clear to understand by the application of the SOLID design principles.
git clone git@github.com:ksch-workflows/registration-desk.git \
-o upstream \
registration_desk
cd ../backend
./gradlew bootRun
For local development, the Registration Desk app can be started like this:
flutter run -d chrome
dart format .
dart analyze
During development it might be useful to start the app in desktop mode, so that hot reload can be used. To enable this, you need to enable desktop support in your global Flutter configuration.
See https://flutter.dev/desktop
macOS
$ flutter config --enable-macos-desktop
Ubuntu
$ sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
$ flutter config --enable-linux-desktop
It is recommended to add the following Git hooks to your local repository:
.git/hooks/pre-commit
:
#!/bin/bash
set -e
dart format . --set-exit-if-changed
flutter test
.git/hooks/pre-push
:
#!/bin/bash
set -e
flutter analyze
For demos and quality assurance, the Registration Desk app is deployed on GitHub Pages:
https://ksch-workflows.github.io/registration-desk
This gets automatically updated with every change on the repository with the help of GitHub Actions.
There is no production deployment, yet. It is planned that the Registration Desk web app is packaged together with a web server in a Docker image so that it can be started with Docker Compose.
K.S.C.H. Workflows is maintained by KS-plus e.V., a non-profit association dedicated to supporting the Kirpal Sagar project.
It is licensed under the Apache License Version 2.0.