GithubHelp home page GithubHelp logo

sankethbk / diaryvault Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 58.0 40.9 MB

A personal diary application written in Flutter

Home Page: https://play.google.com/store/apps/details?id=me.sankethbk.dairyapp

License: MIT License

Kotlin 0.10% Swift 0.23% Objective-C 0.08% Dart 96.82% HTML 0.44% CMake 0.64% C++ 1.28% C 0.10% Ruby 0.19% JavaScript 0.01% CSS 0.04% Shell 0.06%
android dart flutter hacktoberfest

diaryvault's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @SankethBK
  • ๐Ÿ‘€ Iโ€™m interested in Web development and Mobile App development.
  • ๐ŸŒฑ Iโ€™m currently learning Dart and Flutter. I have previously worked with React, Django, Node.js.

Github Stats

github stats

Github Streaks

Top Languages

Top Langs

Stackoverflow stats

profile for Sanketh B. K at Stack Overflow, Q&A for professional and enthusiast programmers

diaryvault's People

Contributors

ayato91 avatar berserkduck avatar bibekpanda55 avatar bonber avatar droidbg avatar gantanikhilraj avatar harikab11 avatar izzysoft avatar kmayank02 avatar kundai10 avatar marek-jakub avatar markandey1414 avatar maryammansour avatar mbfannan avatar micedreams avatar minna-xd avatar nenzan avatar nikolai1312 avatar nishchayshakya1 avatar nobkd avatar nokacper24 avatar pratyushchauhan avatar r4ygm avatar saanvibk avatar sameer1612 avatar sankethbk avatar tikugaelle avatar tomerpacific avatar vaibhavppandey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diaryvault's Issues

Add new themes

Refer the documentation of themes.

To add a new theme

  • Decide if it's a dark theme or a light theme.
  • Prepare a background image and a color palette that matches / compliments colors in the background image.
  • If it's light theme, most of the colors from lib/app/themes/coral_bubble_theme.dart can be reused. If its a dark theme, most of the colors from lib/app/themes/cosmic_theme.dart can be re-used

Start by altering the background image and colors of any existing theme, when its finalized create a new class in lib/app/themes/theme_extensions.

Reference PR for adding a new theme: #36

Support export to plaintext

Refer documentation of notes schema

We need to display "Export your notes as text file" option in settings, on clicking it it should create a text file by fetching the contents of all notes using fetchNotes function from NotesRepository and write it to a text file and download it.

We don't need to worry about rich text here as these are plain text files. We store plain text for a note in plainText column. So the contents to be displayed for a note would be

Create an accordion with title "Export your notes", it should display two options on expanding "Export as Text file", "Export as PDF" (This issues is only for text file)

On clicking "Export as Text file" all notes will be written into a text file in this format

$title
$created_timestamp
$plaintext_body

and a popup should show the option to download / share that text file (using share_plus package) (refer to the 2nd screen recording)

export_your_notes.webm

Sample code to generate a text file and download it using share_plus.

String fileContent = "$title \n\n $created_at \n\n $plainText"
  Future<String> createAndWriteToFile(String content) async {
    final directory = await getApplicationDocumentsDirectory();
    final file = File('${directory.path}/my_file.txt');
    await file.writeAsString(content);
    return file.path;
  }

  void shareFileWithUser(String filePath) {
    Share.shareXFiles([XFile(filePath)], text: 'Great picture');
  }
  
  ElevatedButton(
  onPressed: () async {
    final filePath = await createAndWriteToFile('Hello, this is your text content.');
    shareFileWithUser(filePath);
  },
  child: Text('Export your notes as text file'),
)

I did a POC with dummy content, it works

export_to_Text.webm

Message on note delete

The message on note(s) delete is always in English, irrespective of chosen language. Please, refer to screenshots:

01_delete_note
02_delete_note
03_delete_note

Support export to PDF

Refer documentation of notes schema

We need to generate a PDF with note's title, created_at, body or plainText. We can use [pdf](Refer documentation of notes schema) package to generate PDF.

Flutter quill also supports converting contents of rich_text editor to HTML. So there it might be possible to show rich text into PDF instead of plainText.

Challenge is to introduce images. We can retrieve all external asset paths of a note from NoteDependencies table.

Implement Text-to-Speech Feature for Note Content Reading

In the NotesReadOnlyPage, we can introduce a "Play" button that, when clicked, will read aloud the contents of the note, including both the title and the body.

To accomplish this, we can leverage the flutter_tts library, which provides text-to-speech capabilities for Flutter applications.

Additionally, as part of this enhancement, we can explore the possibility of enabling background playback for the audio. This means that users can continue to listen to their notes being read even when the app is not in focus or running in the background.

For now we can use hardcoded voice type, we can make voice, pitch and other things configurable in future.

Body of the note will be in delta form, it can be converted to plainText by state.controller!.document.toPlainText().

Auto save notes for every "x" seconds

Refer to the documentation of notes schema

Notes bloc is defined in lib/features/notes/presentation/bloc/notes. We need to emit the SaveNote event with a timer of "x" seconds.

Use Timer.periodic to emit this event in lib/features/notes/presentation/pages/note_create_page.dart.

Next step would be to make "x" configurable by taking an input from settings

Add "tags" support

We need to introduce a new column of type json into notes table, which will store all the tags for a note.

We should also support filter by tags eventually.

Question on permissions

My scanner got a few additional checks last week, so on today's update of your app it reported:

! repo/me.sankethbk.dairyapp_2018.apk declares risky permission(s): android.permission.RECORD_AUDIO android.permission.READ_EXTERNAL_STORAGE

May I ask what those permissions are needed for? I could not find a matching feature in the app description (but might simply have missed it). Thanks in advance!

Save Note not working after delete.

Describe the bug

Whenever you delete all the notes and then create a new note and try to save it, you will get toast of "Note saved successfully" but the note will not be visible in home page.

To Reproduce

  1. Create 1 or more notes in home page.
  2. Delete all notes
  3. Create one more new note, and save it.
    You will be able to reproduce this.

Expected behavior

New Saved Note should be visible in home page

Screenshots/Video

save_note_bug.mp4

Display version number in settings

Settings page widget can be found at lib/core/pages/settings_page.dart. We need to show app's version number as defined in pubspec.yaml.

Create a new widget AppVersion in lib/core/widgets and display the app's version like this (Since this widget is not related to any particular feature).

You can either use package_info package from pub.dev or directly retrieve it from pubspec.yaml

Running application through `flutter run`

Hello, I'd love to contribute to this project, however, every time I attempt to run the application I receive the error messages denoted in the screenshot below. I realize that this is a result of dependency issues from the pubspec.yaml. I've been attempting to resolve this for a prolonged time, and I'm wondering if anyone may have faced a similar issue @SankethBK.

image

Refactor settings page

Settings page is getting cluttered with lot of options.

Instead of displaying all options linearly, we can group bunch of related options into an accordion.

For now we can group these options Change password, Change Email and Enable Fingerprint login into Security Settings

Initially Security settings will be shown

On clicking it will expand to show all 3 options

Screenshots are just for reference. Feel free to use accordion package or implement your own widget

Fix calendar theme

Calendar appears in white color, even if we select dark mode themes. Need to check which attribute of ThemeData is used by datetime_picker for displaying the color here and set it to dark color accordingly

Note: The datetime_picker is displayed from within flutter_quill library. But it is reading one of the colors from ThemeData which is somehow white in all 3 themes.

Translation Contributions: Help Us Translate DiaryVault into Your Language

Steps

  1. Get the language code for the language you want to translate from here. For eg: its en for English, es for Spanish, etc.
  2. Create an .arb File: In the lib/l10n/ directory, create a new .arb file named intl_<language_code>.arb. For eg: if you are contributing Spanish, then your filename would be intl_es.arb.
  3. Translate Messages: Refer to the template file intl_en.arb as a reference. Inside this file, you will find key-value pairs where the keys should remain the same, but you should translate the corresponding values into your target language.
  4. Install Flutter-intl VSCode extension for autogenerating files

Download options

First thanks for providing your app the FOSS way: open source, and without any trackers! Would you also consider making it available outside of Google's walled garden, for those who have no access to PlayStore? Like, attaching the APKs to their corresponding releases โ€“ or even bring the app to F-Droid?

Show "share feedback" option in settings

An option to share feedback from within the app.

Add "Share Feedback" button in settings

On clicking it, it should launch email app with subject and sender preconfigured as
sender: "[email protected]"
Subject: "Feedback for diaryvault"

This can be url_launcher package


  final String emailAddress = '[email protected]';
  final String subject = 'Feedback for DiaryVault';

  void _launchEmailApp() async {
    final Uri emailLaunchUri = Uri(
      scheme: 'mailto',
      path: '[email protected]',
      queryParameters: {'subject': 'Feedback for DiaryVault'},
    );```

Implement PIN based authentication - 1

Currently, we support email+password and fingerprint login. PIN-based authentication will help in devices that don't support fingerprint login, as typing email+password every time would be tedious.

I have broken down this into two issues since this is a relatively big feature.

1. Add "Enable PIN-based login" SwitchListTile in security settings

We store all user-based settings in UserConfigModel, add a new field isPINLoginEnabled to store the value of SwtichListTile

When user enables this switch we need to check if userId (present in UserConfigCubit) is not equal to guest_user_id. Becuase if guest users forget their PIN, there is no way to recover the data (Same check is also added to "Enable Fingeprint Login" SwitchListTile).

2. Display a popup like this to collect 4-digit PIN

Keyboard should only display numbers, add validation to check if both PINs are matching, otherwise display error in a error message. Refer passwordResetPopup, most parts of this widget can be re-used.

3, Saving the PIN

Create a new repository PINAuthRepository in lib/features/auth/data/repositories and implement savePIN in PINAuthRepository and store it in flutter_secure_storage in the form of key:value pairs, Include userId in key (eg: _PIN) so that it PIN's of two user's don't clash.

Fix fingerprint login glitch

Fingerprint login works, but when app is opened fingerprint login prompt appears, disappears and then appears again. Ideally it should not disappear. Refer to this screen recording at 0:07

bug.webm

Fingerprint login is initiated in AuthPage widget located at lib/features/auth/presentation/pages/auth_page.dart.

This is the line of code starting the fingerprint login

widget.fingerPrintAuthRepository.startFingerPrintAuthIfNeeded();

Somehow entire AuthPage widget is getting re-rendered, logs might help to debug.

Localise text

All the text (copy) in the app should be localized to make it easier to support multiple languages.

The first step would be to extract all strings into a JSON file.

You can implement it using the l10n package also.

Pasting images by link is not working

We use Flutter Quill for rich text editor. It has support for adding images from gallery or in the form of links. Pasting images by link used to work earlier, but something might have changed in recent upgrade, "Ok" button disappears after passing image link or it appears and not clickable.

image_links_2.webm

We are using flutter_quill locally. Relevant widget to look for is LinkDialogState in packages/flutter_quill/flutter_quill_extensions/lib/embeds/toolbar/image_video_utils.dart. It seems to have some regex based validation for links, which is somehow rejecting valid links as well

Add scroll padding

Some websites have extra padding at the end of the page, so that users don't have to change their eye level while reading the content at the end of the page (even VSCode allows has an option to allow scroll beyond the last line).

This design element is used to enhance the user experience by ensuring that the last lines of text or content are not too close to the bottom of the viewport, making it more comfortable for users to read.

Currently when writing a note as we hit the last line we are forced to change the eye level to the bottom of the screen as we cannot scroll beyond the last line, or we have to insert blank lines every time we hit the bottom of the page just for scrolling.

Refer to this screen recording for demo.

scroll_padding.webm.

Text editor is in this widget RichTextEditor (lib/features/notes/presentation/widgets/rich_text_editor.dart)

I am thinking adding a SizedBox(height: 200) to GlassPaneForEditor widget and wrapping it with SingleChildScrollView might solve the issue.

Support for "daily reminders"

Option to send daily reminder notifications in settings at a particular time. User should be edit the reminder time, disable / enable the reminders.

User can enable daily reminders by toggling the switch and select a time (they ahouldn't be allowed to select time if switch isn't on).

daily_remainder.webm

We can add two new properties to UserConfigModel

  • bool isDailyReminerEnabled: to store if daily remainders are enabled
  • TimeOfDay remainderTime: to store the time at which we should send remainder

flutter_local_notifications supports scheduling recurring notifications:


  // Schedule the daily notification
  await flutterLocalNotificationsPlugin.zonedSchedule(
    0, // Unique ID for the notification
    'Your Notification Title',
    'Your Notification Body',
    scheduledTime,
    const NotificationDetails(
      android: AndroidNotificationDetails(
        'your_channel_id', // Use the same channel ID as above
        'Your Channel Name',
        'Your Channel Description',
      ),
    ),
    androidAllowWhileIdle: true,
    uiLocalNotificationDateInterpretation:
        UILocalNotificationDateInterpretation.absoluteTime,
    matchDateTimeComponents: DateTimeComponents.time,
  );

Testcases Failing

Describe the Issue

Testcases in test folders are failing due to different schemas changes.

To Reproduce

  1. Clone Repo.
  2. Inside Test folder, we can see many test files are red.

Expected behavior

Testcases should have proper schemas.

Screenshots/Video

Screenshot 2023-10-02 at 1 51 17 PM

Display welcome note

Currently when app is opened for first time, the home page is empty. A note which explains all features of app would be nice.

We need to run an INSERT query when app is installed in lib/core/databases/sqflite_setup.dart

[Feature]: Make it available for windows, Macos and Linux app as well

Since Flutter is cross platform and single code runs on all platform, we can make the other versions as well.
Not all people like to keep diary in the mobile as it is difficult to write using mobile keyboards. Making the desktop version available will help them writing the diaries easily on their desktops as well

Add integration tests for basic CRUD operations

We can add integration tests using integration_test package. Refer this docs for more details.

We can add integration tests around CRUD operations for notes. Initially we can use Continue as guest as option in signup page, create a new note with title and body, save it and check it is displayed in home page.

We can similarly check by updating an existing note to check if updation is working, and delete a note and check if it is removed from home page

Customizable fonts

Currently, static fonts are used throughout the app. An option to customize font family and font size in the settings page should be provided. When user changes font family / size, it can be stored in lib/features/auth/data/models/user_config_model.dart class. UserConfigModel will be persisted in shared preferences

Add multi-language support

Use flutter_localizations / l10n for adding multi-language support. Currently hardcoded strings are scattered throughout the app, need to find them and translations.

By default it should use language as device's language. If the device's language is not supported, English should be used.

Typo in splash screen image

The image assets/images/splash_screen.png has a typo in the app name. It says "Dairy Vault" instead of "Diary Vault"

splash_screen

Coloured backgrounds

As a way to group or tag a entry.
Select and add to a label assigned colour.

Easy to sort and group

Noob to git - sorry of not a great issue report

Customizable Sort order for notes in home page

Relevant widgets

Notes fetch cubit: lib/features/notes/presentation/bloc/notes_fetch
Home Page: lib/core/pages/home_page.dart
Home Page Appbar: lib/core/widgets/home_page_app_bar.dart

Define a sort_by button in home page appbar. It should open a popup (use showCustomDialog DropDown) which shows three options

  • Sort by latest first (sort by created_at, this is the default behaviour as of now)
  • Sort by last_modified (sort_by last_modified of notes)
  • Sort alphabetically

Define a new function sortNotes in NotesFetchCubit which sorts the notes which are already present in notePreviewList and emits NotesFetchSuccessful state with the newly sorted array

Implement PIN based authentication - 2

In first part of this issue, user enables the PIN based authentication and has setup a 4 digit PIN.

In this part we need to implement the authentication screen to collect and validate PIN during login.

1. Create a new screen to collect 4 digit PIN, (something like this, keep it consistent with themes)

image

If the "PIN-based authentication" is enabled, we should redirect user to PIN login screen instead of email+password login screen.
In order to check if PIN based authentication is enabled, we need to read userConfigModel from shared preferences and check its isPINLoginEnabled (similar thing is done to check if fingerprint login is enabled, check shouldActivateFingerPrint)

Create shouldredirectToPINAuthScreen in PINAuthRepository similar to shouldActivateFingerPrint.

2. Verifying PIN and login

Create verifyPIN method in PINAuthRepository, this method should read the PIN stored in flutter_secure_storage in the form of key:value pairs (key would be in the form of <user_id>_PIN) If the PIN stored in secure_storage matches the PIN entered by user, we need to emit UserLoggedIn event on authSessionBloc to start a login session with given user.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.