slovensko-digital / avm-app-flutter

Mobilná aplikácia Autogram v mobile umožňujúca podpisovanie dokumentov novým občianskym preukazom cez NFC rozhranie.
https://sluzby.slovensko.digital/autogram-v-mobile/
European Union Public License 1.2
9 stars 0 forks source link

Autogram v mobile (AVM)

Flutter aplikácia pre Android a iOS. Podpisovač Autogram v mobile umožňuje podpisovanie elektronickým občianskym preukazom s NFC rozhraním. Detailnejšie info o arhitektúre projektu sa nachádzajú v repozitári AVM server.

Autogram v mobile vytvorili freevision s.r.o., Služby Slovensko.Digital s.r.o. s dobrovoľníkmi pod EUPL v1.2 licenciou. Prevádzkovateľom je Služby Slovensko.Digital s.r.o.. Prípadné issues riešime v GitHub projekte alebo rovno v tomto repozitári.

Celý projekt sa skladá z viacerých častí:

Dart aplikácia

Entry points

Key concepts

Implemented app flows

Onboarding

User onboarding - started with Onboarding:

  1. Accept Privacy Policy using OnboardingAcceptDocumentScreen
  2. Accept Terms of Service using same OnboardingAcceptDocumentScreen
  3. optionally OnboardingSelectSigningCertificateScreen
  4. Presenting finish - OnboardingFinishedScreen

Sign single document

Signing of single (PDF, TXT, image, eForms XML, ...) document using Eidmsdk and AutogramService.

  1. MainScreen - to present app features and consume shared File.
  2. OpenDocumentScreen - to open File using system file picker dialog or passed File. In here, the Document is created.
  3. PreviewDocumentScreen - here, the document visualization is shown.
  4. SelectCertificateScreen - here, the Certificate using Eidmsdk is read from ID card. It may be skipped when it was saved.
  5. SignDocumentScreen - here, the document is signed using Eidmsdk and AutogramService.
  6. PresentSignedDocumentScreen - here, the (success / error) result is presented and signed document is saved into "Downloads".

Remote document signing

Started with RemoteDocumentSigning. It's similar to Sign single document, but starts with:

Scripts

FVM init and Pub get:

fvm install

Activate flutterfire_cli for local Dart (NOT system Dart):

fvm dart pub global activate flutterfire_cli
fvm flutter pub get

Run all Flutter tests:

fvm flutter test

Generate i18n code:

fvm flutter gen-l10n

Generate code:

fvm dart run build_runner build --delete-conflicting-outputs

Build Android APK:

eid-mSDK binaries are hosted on GitHub package registry. To access the package during build process environment variable EIDMSDK_ACCESS_TOKEN needs to be set to a GitHub Personal Access Token that has permission to read package registry.

fvm flutter build apk

Build iOS IPA:

fvm flutter build ipa

Build WEB:

fvm flutter build web --target=lib/preview.dart

Identifiers and links