Skip to content

Mobilná aplikácia Autogram v mobile umožňujúca podpisovanie dokumentov novým občianskym preukazom cez NFC rozhranie.

License

Notifications You must be signed in to change notification settings

slovensko-digital/avm-app-flutter

Repository files navigation

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í:

  • Server
    • AVM server - Ruby on Rails API server poskytujúci funkcionalitu zdieľania a podpisovania dokumentov.
    • AVM service - Java microservice využívajúci Digital Signature Service knižnicu pre elektronické podpisovanie a generovanie vizualizácie dokumentov.
  • Mobilná aplikácia
  • Autogram extension - Rozšírenie do prehliadača, ktoré umožňuje podpisovanie priamo na štátnych portáloch.

Dart aplikácia

Entry points

Key concepts

  • Business logic should be separated in Bloc and placed in lib/bloc/
    • NameCubit
    • separate sealed class NameState
  • For services and Bloc using @injectable and also Provider
  • For persistent app preferences use ISettings
  • Custom widgets:
    • are placed in lib/ui
    • should have reasonable previews with @widgetbook.UseCase without relying on any Bloc or Provider types

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

About

Mobilná aplikácia Autogram v mobile umožňujúca podpisovanie dokumentov novým občianskym preukazom cez NFC rozhranie.

Resources

License

Stars

Watchers

Forks