benediktscheffel / nodocs

Mobile App for scanning Documents and save them as pdf.
0 stars 0 forks source link

NoDocs

NoDocs is a Flutter app designed to scan, store, and manage documents efficiently. It allows users to scan documents and save them as PDFs, making the content searchable using Optical Character Recognition (OCR). Users can organize their documents in folders and utilize a powerful search function to find PDFs by name, tags, or text content.

Abstract

NoDocs is a document management app that simplifies the process of scanning, storing, and organizing documents. By leveraging OCR technology, it makes PDFs searchable, enhancing productivity and reducing the time spent on managing paperwork.

Detailed Description

NoDocs provides a comprehensive solution for managing documents. Users can scan physical documents or upload existing PDFs, categorize them with tags, and store them in organized folders. The app's OCR functionality ensures that all stored documents are searchable by text, making it easy to retrieve information quickly. Additionally, NoDocs offers an intuitive interface for navigating through collections and viewing documents.

Problem Solved

NoDocs addresses the common challenge of managing physical and digital documents. It reduces the clutter of paper documents, helps organize digital files, and saves time by making documents easily searchable. This streamlines the document management process for users who struggle with disorganization or want to enhance their productivity.

Target Persona

NoDocs is ideal for individuals who:

Main Features

Store Documents

Manage Documents and Collections

View Documents

By offering these features, NoDocs streamlines the document management process, making it a valuable tool for anyone looking to efficiently handle their paperwork and digital documents.

User Guide

The following guide describes how to use the App.

Home Screen

This is the first page you will see if you start the App. The page itself contains two features and the navigation bar. The two features are the Search feature and the Collection Menu feature.

guide_home1

Collection Menu

The Collection Menu is kind of a file explorer. You will see all your Collections and PDF documents there. You can open Collections to see what's inside them by clicking on them. You can also click on PDF documents to open them in the PDF Viewer of the app which will be described later.
An unfolded collection with documents inside may look like this:
guide_home2

You also have a context menu which you are able to activate with a long press on the collection or the document.

Collection Context Menu

When long pressing a collection you will have those options:
guide_home3

guide_home4

guide_home5

guide_home7

Also, you can access the settings by clicking on Settings.

And you can scan your documents with the integrated scan feature by clicking on Scan Document.

The Settings page and the Scan page are described below.

Search

The search feature can be opened by pressing the search bar on the home page. In the input field you are able to search for the following things:

guide_home8

guide_home9

When you have found the document you were looking for you can open it in the PDF viewer by clicking on it.

PDF viewer

The PDF viewer can be opened as described above. It contains two features. The Edit Tags feature and the Search feature which can be accessed by pressing this button:
guide_pdf_viewer1

Search

The Search feature allows you to search for a text in the document. After typing in your text you have to click the search button of your keyboard. You jump to the next occurrence of a word with the right arrow button, and you can jump to the previous occurrence on the left arrow button:
guide_pdf_viewer2

Edit Tags

The Tag feature allows you to create new Tags and directly link them to your document. Also, you can remove existing Tags from the document. If you remove a Tag and confirm with Save the Tag might be deleted if no other document is linked to this Tag. Another feature is to add an existing Tag from another document to it by selecting them.

All changes made in the Edit Tags Dialog must be confirmed with Save in order to persist.

Create new Tag

To create a new Tag type in the name of it. Then confirm the Tag with the add Button.
guide_pdf_viewer3

Select/Remove an existing Tag

To select an existing Tag just tap it. To unselect it just tap it again. This way you can also remove Tags from documents.
guide_pdf_viewer4

Scan Page

The Scan Page can be used to make photos of documents and upload existing photos in order to convert them into a document later. guide_scan
Those are the features:

  1. The Scan Document button captures a photo
  2. The gallery icon allows you to add a photo from your gallery
  3. The Last Image Preview can be clicked to finish scanning your documents and continue with the PDF creation, Tag adding, Collection selecting, ... (As described under Save Page)

After making the photo or uploading it you will land on the Crop Page.

Crop Page

This page allows you to give your image the final adjustment, so it looks good in the PDF later. Therefore, you have to click on the Crop button. This will open the Cropper where you can make those adjustments.

The Navigation Bar offers those features:
guide_crop

  1. The Retake Photo button allows you to discard the photo.
  2. The Keep Scanning button saves the image and allows you to make or upload another image to the document.
  3. By clicking the Save Document button you will be forwarded to the Save Page which is described below.

Save Page

The Save Page is used to do the following:
guide_save

  1. Set the title of the document
  2. Select the Tags which will be linked to the document
  3. Select the destination Collection
  4. Crop a single page again selected by the current slide of the Carousel
  5. Retake the photo of a single page selected by the current slide of the Carousel
  6. Save the document as a PDF
  7. Save the document as a OCR'ed PDF (internet connection required)

Set the Title

This can be done by clicking into the line or on the button. Then just type in the title you want to set. Confirm with OK on the keyboard.

Select Tags

This can be done by tapping on the Select Tags field. There you can select or unselect existing Tags. You can also remove selected Tags by clicking on the Tag Chip.

Select Collection

This can be done by tapping on the Select Collection field. There you can see your directories previously defined on the Home Page. Please select the directory of destination there.

Crop Again

This works exactly like on the Crop Page described above.

Retake

This works exactly like on the Scan Page described above. The only difference is, that you don't have the Last Image Preview there.

Save

You can save the document as a normal PDF there (without OCR).

OCR & Save

You can save the document as a OCR'ed PDF there. This will take a few seconds and requires internet connection.

Settings Page

To get on this page you have to be on the Home Page before. On this page you can set the Appearance of the app (DarkMode), the App Language and the Text recognition language for the OCR.

Architecture

The app is build with the MVCs paradigm. Each page has their own controller and model. All controllers use additional services. Those are the views, their controllers, their models, their services and the databases used for this project.

HomePage

home_arch

The Home Page needs two controllers. Those will be explained now.

SearchResultController

This controller focuses on the search feature of the home page.

For the search results the model SearchResultModel is used which updates the HomePage.

HomeController

The HomeController provides the file explorer feature and encapsulates those services:

The HomeModel contains the nodes for the filesystem entities which are displayed in the menu of the HomePage.

PdfViewerPage

pdf_arch

The PdfViewerPage uses those services to handle search results and Tag management:

The PdfViewerModel contains the Tags and some flags which have an influence on the PdfViewerPage.

ScanPage

scan_arch

The ScanPage uses one controller to handle the camera interactions and one controller to handle routing and the management of the images already taken.

CameraController

This controller enables the camera preview and making of photos. It comes from an own library so this is not described further.

ScanController

This controller uses those services:

The CropModel looks like this:

class CropModel with _$CropModel {
  const factory CropModel({
    required final List<String> imagePaths,
    required final CroppedFile? croppedFile,
    required final XFile? pickedFile,
  }) = _CropModel;
}

The imagePaths list is used to replace the cached image after cropping it. The croppedFile object contains the cropped version of the image. The pickedFile object contains the original image before cropping.

SavePage

save_arch

The SavePage is used to set the properties of the document, to change single pages of the document and to save it as an PDF file. It contains two controllers. The CameraController which is the same one as in the ScanPage and the SaveController. Both will be described now.

CameraController

On the Page you have the option to retake a single photo. That is supported by the CameraController. It uses the identical view as the ScanPage.

SaveController

The SaveController contains those services:

In the SaveModel the index of the carousel is saved, the image paths, the Tags, a flag if the camera should be enabled, the title of the document and the destination save path for the document.

SettingsPage

settings_arch

The SettingsController is used to change the app settings. It contains those services:

The SettingsModel contains the information if the Pages should be shown in light mode or dark mode.

LanguageSettingsPage

lan_settings_arch

The LanguageSettingsController is used to change the language of the app. It contains those services:

The LanguageSettingsModel contains the selected language code and a map of the available languages.

TextRecognitionLanguageSettingsPage

tr_lan_settings_arch

The TextRecognitionLanguageSettingsController is used to change the text recognition language of the OCR feature. It contains those services:

The TextRecognitionLanguageModel contains the selected language code and a map of the available languages.

Development

Useful commands

Regenerate generated sources

dart run build_runner build

Regenerate splash screens

dart run flutter_native_splash:create

Regenerate icon files

flutter pub run flutter_launcher_icons

Regenerate translation keys

dart run easy_localization:generate -S assets/translations -f keys -O lib/gen -o locale_keys.g.dart