Git Product home page Git Product logo

podnotes's Introduction

PodNotes — Markdown Notes with Encrypted Pods

An ANU Software Innovation Institute demo project for Solid Pods.

Authors: Anushka Vidanage, Graham Williams, Jessica Moore

ANU Software Innovation Institute

License: GNU GPL V3

Introduction

The podnotes app is an example of a Solid Pods app written in Flutter to read, write, and share encrypted notes stored on your personal online data store (Pod) hosted on a Solid Server. Since you control where your notes (in standard Markdown) are stored, other apps can also interact with your notes. You maintain full control over your data, not the app developer collecting and hoarding your data.

This first beta release (version 0.1.0) is functional and usable. Use cases include writing quick notes while on the move to come back to later on, capturing shopping lists that can be shared with your family and called up the next time anyone of the family is at the shops, and much more.

The current podnotes code base includes a lot of low level code that is being migrated to the solidpod package for Flutter. Once migrated it will be even easier to build your first Pods-based Flutter app.

Shopping List

Login Screen

Obtaining a Pod

To use the app you will need your own Pod hosted on a Solid server. To try it out you can get yourself a Pod at our experimental server, the Australian Solid Community Pod Server or any one of the available Pod Providers world wide.

Online Demo

Once you have your own Pod visit https://podnotes.solidcommunity.au and login to your Pod. Write and save a few notes, edit saved notes, and maybe share some notes with other users. That's it! Simple but useful.

Install the App Locally

You can install the app onto your own device using one of our installers. The app will then run locally on your own device rather than hosted on a web server. The installers are available for all platforms from github. The installers we make available are ready to run executable files or else operating system specific installation packages. Stay tuned for links to repository distribution.

App Startup

On starting up the app you will see the login screen where a user's WebID is to be entered. Your login will be remembered through the browser for future app activity.

On clicking the Login button your browser will popup to authenticate you on the Solid server of choice, not on the device. The device does not get to know your login details.

Login Screen

Install Flutter and Podnotes

You can run the app directly from its source yourself with a little setup. You could then also modify the app to suit your own needs, or to add functionality that you may like to contribute back to the community.

Begin with the Flutter Dev instructions to install flutter for your preferred platform at Flutter Dev Getting Started

After setup, run flutter doctor to check your setup, and flutter devices to see which devices you have configured, with the device name in the 2nd column

flutter devices
Found 4 connected devices:
  iPhone 15 Pro Max (mobile)      • 8978937B-AC64-44B8-8B26-CA6142091678 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
  iPad (10th generation) (mobile) • 6B849753-743F-4F66-8F46-0396CA4BCFBE • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
  macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.1.2 23B92 darwin-arm64
  Chrome (web)                    • chrome                               • web-javascript • Google Chrome 120.0.6099.62

Then git clone the podnotes repository from github.

Run the podnotes app in debug mode on your chosen device by specifying enough of the device name to be uniquely identifiable. E.g. for chrome use:

flutter run -d chrome

When you have completed the setup of your platform, you are ready for the PodNotes Getting Started exercises where you can create a Pod, make and share notes.

Extra setup for MacOS

Running the app on MacOS requires, additional configuration in Xcode. Open the project macos folder in Xcode with

cd podnotes/macos
xed .

Select Signing & Capabilities. In Team, choose Add an Account and sign in with your Apple ID account. In Network, select Incoming Connections (Server) and Outgoing Connections (Client). The latter is needed to login to your Pod.

Extra setup for iOS

For iOS, you will also need to set the deployment platform to match the iOS version on your simulator.

Open the Simulator app, select your simulated device with File -> Open Simulator -> pick a device.

open -a Simulator

Then in the simulated device check the iOS version number by clicking on the Settingsapp and going to General -> About to look up the iOS.

Open the project iOS folder in Xcode and add the iOS version used by your simulator.

cd podnotes/ios
xed .

Select General. In iOS, change it to match the Simulator iOS version, e.g. v17.0.

Useful resources

Packages:

These dart packages are under construction to support the development of Pods-based apps with flutter

  • solid package (not yet available on pub.dev): Implementation of the core high-level functionality.

  • solid-auth package: Implementation of the Solid-OIDC flow which can be used to authenticate a client application to a Solid Pod. Solid OIDC is built on top of OpenID Connect 1.0. Also provides a suite of tools and widgets to support typical app workflows.

  • solid-encrypt package: The Software Innovation Institute has a focus on the security of our stored data. This package implements data encryption which can be used to encrypt, on device, the content of turtle files to be stored in a Solid Pod. Data is also only decrypted on device.

  • rdflib package: A dart package for working with RDF. Features include find and create triple instances, create a graph to store triples, export graph to ttl, etc.

Related APps

https://notepod.vincenttunru.com/

podnotes's People

Contributors

anushkavidanage avatar gjwgit avatar jesscmoore avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

podnotes's Issues

PERMISSION: Issue with write only data

When a note is shared with Write only permission, the receiver is not allowed to view the note. So without viewing the note, how can the receiver edit the note?

Maintain dart code metrics

Description

make prep is giving the following issues at this time

$ make prep
dart format lib/
Formatted 21 files (0 changed) in 0.23 seconds.

--
Dart Code Metrics: NULLABLE
dart run dart_code_metrics:metrics check-unnecessary-nullable --disable-sunset-warning lib
Building package executable... (4.1s)
Built dart_code_metrics:metrics.
✔ Analysis is completed. Preparing the results: 2.0s

✔ no unnecessary nullable parameters found!

--
Dart Code Metrics: UNUSED CODE
dart run dart_code_metrics:metrics check-unused-code --disable-sunset-warning lib
✔ Analysis is completed. Preparing the results: 1.9s

lib/constants/app.dart:
    ⚠ unused top level variable loginTimeoutTitle
      at /home/gjw/git/github/anusii/podnotes/lib/constants/app.dart:38:1
    ⚠ unused top level variable loginTimeoutError
      at /home/gjw/git/github/anusii/podnotes/lib/constants/app.dart:39:1

lib/constants/colours.dart:
    ⚠ unused top level variable darkGold
      at /home/gjw/git/github/anusii/podnotes/lib/constants/colours.dart:30:1
    ⚠ unused top level variable brickRed
      at /home/gjw/git/github/anusii/podnotes/lib/constants/colours.dart:32:1
    ⚠ unused top level variable exLightBlue
      at /home/gjw/git/github/anusii/podnotes/lib/constants/colours.dart:36:1
    ⚠ unused top level variable darkCopper
      at /home/gjw/git/github/anusii/podnotes/lib/constants/colours.dart:37:1
    ⚠ unused top level variable lightGray
      at /home/gjw/git/github/anusii/podnotes/lib/constants/colours.dart:40:1

lib/constants/crypto.dart:
    ⚠ unused function genPubKeyStr
      at /home/gjw/git/github/anusii/podnotes/lib/constants/crypto.dart:12:1

lib/constants/file_structure.dart:
    ⚠ unused top level variable cardMe
      at /home/gjw/git/github/anusii/podnotes/lib/constants/file_structure.dart:43:1
    ⚠ unused top level variable sharedKeyFile
      at /home/gjw/git/github/anusii/podnotes/lib/constants/file_structure.dart:46:1

lib/constants/turtle_structures.dart:
    ⚠ unused top level variable sessionKeyPred
      at /home/gjw/git/github/anusii/podnotes/lib/constants/turtle_structures.dart:29:1
    ⚠ unused function genPrvFileAclBody
      at /home/gjw/git/github/anusii/podnotes/lib/constants/turtle_structures.dart:58:1

✖ total unused code (classes, functions, variables, extensions, enums, mixins and type aliases) - 12

NOTE LIST: add a "+" for creating a new note

In the Note List view there are 2 common functions I want to do, add a new note or edit an existing note. Instead, currently I have to go to the Home Page to create a new note. Whereas in future, we may want the MyNotes page to be home, just with the option from there of clicking '+' to create a new note.

  • add a "+" icon which takes me into the write new note view

The '+' create new note icon could be top right in the title bar, or in a new menu bar on the bottom of the UI

SHARE: Using 'Add Permission' to edit existing access causes hang

Attempting to use Add Permission to give R+W to karen-reep on a note, when karen-reep already has R access, is causing the widget to hang. It appears, we currently need to delete a recipient's existing permissions and then add the new permissions.

If this is the problem, adapt the Add Permission widget to remove an existing sharing to that recipient before adding the new access permissions.

Hangs forever on Granting Access indicator.
Platform: web

Image

MYNOTES: red screen if user has no notes

Getting red screen error on clicking 'My Notes'

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _TypeError was thrown building FutureBuilder<dynamic>(dirty, state:
_FutureBuilderState<dynamic>#72ff9):
Null check operator used on a null value

The relevant error-causing widget was:
  FutureBuilder<dynamic>
  FutureBuilder:file:///Users/u9904893/Documents/podnotes/lib/notes/list_notes_screen.dart:99:16

This is caused by a null being returned from the future builder.
Which is odd as I have 1 note.

NOTE: On SAVE NOTE can we stay with the current note rather then start a fresh note?

Description

After I click the SAVE NOTE button I seem to "lose" my note since the note is cleared and at first I am not quite sure what just happened 😊. Perhaps have a SAVE NOTE and a NEW NOTE button. SAVE NOTE simply updates the saving of the note (though I think that should just happen automatically these days - a topic for another issue).

Why

So that the user workflow does not present surprises to the user.

Closing Crieteria

  • SAVE NOTE does not clear the current note.

LOGIN: app hangs on auth 'Cancel' with null error

On pressing 'Cancel' in the authorisation pop up, the app crashes with null value error

It opens a login successful window, and the podnotes app hangs, whereas it should close the window and go back to the app login.

Tested on: macos, chrome, web - all hang on press 'Cancel'

Image

Image

chrome error:

flutter run -d chrome
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...             24.1s
This app is linked to the debug service: ws://127.0.0.1:53066/OFMrOr6dr_E=/ws
Debug service listening on ws://127.0.0.1:53066/OFMrOr6dr_E=/ws

🔥  To hot restart changes while running, press "r" or "R".
For a more detailed help message, press "h". To quit, press "q".

A Dart VM Service on Chrome is available at: http://127.0.0.1:53066/OFMrOr6dr_E=
The Flutter DevTools debugger and profiler on Chrome is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:53066/OFMrOr6dr_E=
Error: Unexpected null value.
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 806:18  nullCheck
packages/solid_auth/src/openid/src/model/token_response.dart 25:66                get idToken
packages/solid_auth/src/openid/src/openid.dart 231:39                             <fn>
packages/solid_auth/src/openid/src/openid.dart 234:40                             generateLogoutUrl
packages/solid_auth/solid_auth_client.dart 220:34                                 authenticate
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50                <fn>
dart-sdk/lib/async/zone.dart 1661:54                                              runUnary
dart-sdk/lib/async/future_impl.dart 162:18                                        handleValue
dart-sdk/lib/async/future_impl.dart 838:44                                        handleValueCallback
dart-sdk/lib/async/future_impl.dart 867:13                                        _propagateToListeners
dart-sdk/lib/async/future_impl.dart 643:5                                         [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 713:7                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                                  _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                                   _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 181:7                <fn>

macos error

flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-0016091821C3401E }
{ platform:macOS, arch:x86_64, id:00006000-0016091821C3401E }
Building macOS application...
2023-12-11 07:28:51.218 podnotes[78857:1212617] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
Syncing files to device macOS...                                   120ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on macOS is available at: http://127.0.0.1:53358/5mQ79ARPK5Y=/
The Flutter DevTools debugger and profiler on macOS is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:53358/5mQ79ARPK5Y=/
flutter: server started 4400
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      TokenResponse.idToken (package:solid_auth/src/openid/src/model/token_response.dart:25:66)
#1      Credential.generateLogoutUrl (package:solid_auth/src/openid/src/openid.dart:231:31)
#2      authenticate (package:solid_auth/solid_auth_client.dart:220:35)
<asynchronous suspension>
#3      LoginScreen.createSolidLoginRow.<anonymous closure> (package:podnotes/login/screen.dart:201:19)
<asynchronous suspension>

BUG: When sharing in Linux/Web/macos it hangs

Image

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Failed to load data! Try again in a while.
#0      fetchPubFile (package:podnotes/common/rest_api/rest_api.dart:280:5)
<asynchronous suspension>
#1      checkPublicProf (package:podnotes/common/rest_api/res_permission.dart:272:21)
<asynchronous suspension>
#2      addPermission (package:podnotes/common/rest_api/res_permission.dart:107:9)
<asynchronous suspension>
#3      _ShareNoteState._displayPermissionInputDialog.<anonymous closure>.<anonymous closure> (package:podnotes/notes/share_note.dart:588:17)
<asynchronous suspension>

Lost connection to device.

NOTE LIST: Allow notes to be sorted

Description

Add options to sort notes by title, creation date, modification date.

Why

So that the user can quickly view the list of notes in different ways.

MAC LOGIN: Connection failed (OS Error: Operation not permitted

Mac app is failing on press of Login button with

A Dart VM Service on macOS is available at: http://127.0.0.1:60898/E7g0qTKiXGM=/
The Flutter DevTools debugger and profiler on macOS is available at:
http://127.0.0.1:9102?uri=http://127.0.0.1:60898/E7g0qTKiXGM=/
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: ClientException with SocketException: Connection failed (OS Error: Operation not permitted, errno = 1), address = pods.solidcommunity.au, port = 443, uri=https://pods.solidcommunity.au/.well-known/openid-configuration
#0      IOClient.send (package:http/src/io_client.dart:119:7)
<asynchronous suspension>
#1      BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:32)
<asynchronous suspension>
#2      _withClient (package:solid_auth/src/openid/src/http_util.dart:56:12)
<asynchronous suspension>
#3      get (package:solid_auth/src/openid/src/http_util.dart:18:7)
<asynchronous suspension>
#4      Issuer.discover (package:solid_auth/src/openid/src/openid.dart:127:16)
<asynchronous suspension>
#5      authenticate (package:solid_auth/solid_auth_client.dart:118:19)
<asynchronous suspension>
#6      LoginScreen.createSolidLoginRow.<anonymous closure> (package:podnotes/login/screen.dart:193:19)
<asynchronous suspension>

VIEWER: Allow an edit option

Description

The current note viewer does not allow editing of notes. This task will add an EDIT button to allow the note the be updated.

DEMO: add install section

  • Link to flutter getting started for different platforms
  • provide extra step required for macos development of Solid apps in flutter

ABOUT: Add an about popup

Description

Display an About text box that includes a simple description, lists the current version, a link to the github repository, and a list of the authors.

There is a standard About widget for flutter.

NOTE LIST: not returning list of existing notes

In macos and chrome, the MyNotes note list is not returning the list of existing notes. Instead snapshot.data is null, despite my having 2 notes in my pod

  • Fix the page to return and display the notes list

snapshot.data

Performing hot restart...
Restarted application in 748ms.
flutter: server started 4400
flutter: snapshot.data: null

Pod listing

Image

MyNotes note list
Image

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.