Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

276 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notepad Mono

An open source app to write and sync your monospace notes everywhere.

Features

  • Use a simple notepad with the same editing experience of an advanced text editor
  • Cross platform with Windows, Linux and Android binaries
  • Data syncronization across multiple devices using your Google, Github and Microsoft accounts
  • Pretty UI and status bar

Release changelog

You can find the release changelog file here.

Clone repository

git clone https://github.com/mrsinho/notepad-mono.git

Easy flutter build

cd app
flutter build linux --release

cd app
flutter build windows --release

Build from source with Nix flake

The Nix flake will download the required packages, compile and patch the Linux and Android binaries. The flutter packages can be cached from pub.dev for Linux builds through pkgs.flutter.buildFlutterApplication, but for Android binaries you must disable the sandbox option to allow "impure" builds.

If you don't have installed nix on your system, you can follow the official guide for all platforms.

Linux:

mkdir -p nix/out/linux
nix build ./nix/linux --out-link ./nix/out/linux/result
./nix/out/linux/result/app/Notepad-Mono/notepad_mono

Android:

mkdir -p nix/out/android
nix build ./nix/android --option sandbox false --out-link ./nix/out/android/result

Note

If you are running the application on NixOS, be sure you have enabled the UDP port 4516.

networking.firewall = {
  enable = true;
  allowedTCPPorts = [
    # [...]
  ];
  allowedUDPPorts = [
    # [...]
    4516
  ];
};

mkdir -p nix/out/android
nix build --option sandbox false --verbose ./nix/android --out-link ./nix/out/android/result

For some reason during the build Gradle might fail/crash unexpectectly, and this might happen also in the Github actions job. For now rerunning the flake build will solve the issue.

Enter Nix dev environment

  • For Linux only build environment:
cd nix/linux

nix develop --command bash
  • For Linux and Android build environment:
cd nix/android

nix develop --command bash

Update flake and pubspec locks (devs only)

Update flake build inputs and packages:

cd nix/linux
nix flake update

Update pubspec.lock and convert it into JSON format for nix builds:

cd app
flutter pub upgrade
yq -o json pubspec.lock > pubspec.lock.json

Build for android using release keystore jks (devs only)

cd nix/android

nix develop --command bash

cd ../../app

flutter build apk --release
flutter build appbundle --release

cd ../
mkdir -p build/release/android

cp app/build/app/outputs/flutter-apk/app-release.apk build/release/android/Notepad_Mono.apk
cp app/build/app/outputs/bundle/release/app-release.aab build/release/android/Notepad_Mono.aab

Check Android Manifest in the .apk file

# Starting from repo root directory, after nix build
cd result/android
aapt dump xmltree notepad_mono.apk AndroidManifest.xml

Android diagnostic

  • Enable the developer options on your Android device
  • Enable USB debug in the developer options
  • Connect the device to a USB data port with a USB data cable
  • From the terminal with the Android Debug Bridge (adb) installed these commands might be useful.
# Check devices
adb devices

# Find package relative to the newly installed app
adb shell pm list packages | grep notepad_mono

# Send redirect action
adb shell am start -a android.intent.action.VIEW -d "notepad-mono://login-callback"

Start dummy session

For testing purposes, if you do not want to create a new account you can have access to all the application features using a special URI:

  • On desktop devices:
curl http://localhost:4516//dummy/?key=WQBjbIwEEpxhqCPhxwEFIAivcFdlCXpa
  • On Android:
# From any browser or API client you can enter this link: notepad-mono://dummy/?key=WQBjbIwEEpxhqCPhxwEFIAivcFdlCXpa

# Or using the Android Debug Bridge (only debug builds)
adb shell am start -a android.intent.action.VIEW -d "notepad-mono://dummy/?key=WQBjbIwEEpxhqCPhxwEFIAivcFdlCXpa"

This key parameter corresponds to an environment variable which is read during the compilation of the application.

This "dummy" session is temporary but unlocks all the application features including note creation and editing.

External packages

All the external packages are pulled from pub.dev listed with their relative version in the [pubspec.yaml].

Data hosting and transparency

Currently the notes and databases are hosted by Supabase. While the database is encrypted and has RLS enabled, there is not E2E encryption enabled. admin devs could theoretically have access to the notes content. For safety reasons it's highly recommended to NOT save sensitive data such as passwords and personal information.

For more information about the privacy policy see the related page.

License

This project is licensed under the GNU General Public License v3.0

About

Write and sync monospace notes everywhere

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages