Home

Awesome

SimpleNotes

SimpleNotes is a Flutter project that provides a simple note-taking application with authentication and data synchronization features using Appwrite. The app is designed to allow users to create and store notes in a secure and organized manner.

https://github.com/davidnwaneri/simple_notes_app/assets/48889672/3bb37c7d-1f9e-4c5e-a659-7411cc62d1cf

Dependencies

The following dependencies were used in the development of this project:

Development Dependencies

The following development dependencies were used in the development of this project:

Getting Started

To get started with SimpleNotes, follow these steps:

  1. Clone the repository to your local machine.
  2. Run flutter pub get to install the project dependencies.
  3. Run build_runner to generate the code for the freezed classes:
flutter pub run build_runner build
  1. Create a new Appwrite project and configure the project settings. (See the Setting up Appwrite section)

  2. Run the app using the command:

flutter run --dart-define=APPWRITE_ENDPOINT=[your_appwrite_endpoint_url] --dart-define=APPWRITE_PROJECT_ID=[your_appwrite_project_id] --dart-define=APPWRITE_NOTE_DATABASE_ID=[database-id] --dart-define=APPWRITE_NOTE_COLLECTION_ID=[collection-id]

Setting up Appwrite

To use Appwrite with SimpleNotes, you need to create a new Appwrite project and configure the project settings. Note: Appwrite is packaged as a set of Docker images, so you need to have Docker installed on your machine to run Appwrite. Once that is done, proceed with the following steps:

  1. Open your browser and access the Appwrite console at localhost
  2. Create an account and sign in.
  3. Create a new project by clicking the Create Project button on the Appwrite dashboard.
  4. In the Overview tab, scroll down to the Integrations section and add a platform by clicking the Add Platform button. Select Flutter App from the list, and then proceed to register your flutter app for the whatever environment your flutter app will run on (Android, iOS, Web, etc.).
  5. Confirm that Email/Password authentication method is enabled by going to the settings section of the Auth tab.
  6. Retrieve the project ID from the project settings page and set it as the APPWRITE_PROJECT_ID environment variable. And also the endpoint URL and set it as the APPWRITE_ENDPOINT environment variable. Note: When running on Android you may need to use the IP address of your machine instead of localhost as the endpoint URL.
  7. Create a new database by going to the Database tab and then proceed to retrieve the database ID and set it as the APPWRITE_NOTE_DATABASE_ID environment variable.
  8. Create a new collection by clicking on the newly created database and then clicking Create Collection. Proceed to retrieve the collection ID and set it as the APPWRITE_NOTE_COLLECTION_ID environment variable.
  9. In the newly created collection, go to the Attributes section and create the following attributes:
    • (String) [Attribute Key]: title || [Size]: 40 || [Default value]: [empty][Null]
    • (String) [Attribute Key]: body || [Size]: 2000 || [Required]: true
    • (String) [Attribute Key]: id || [Size]: 40 || [Required]: true
    • (String) [Attribute Key]: ownedId || [Size]: 40 || [Required]: true
  10. Do not forget to enable CREATE, READ, UPDATE and DELETE permissions for the created collection by navigating to the settings section of the collection.

For more information on how to use Appwrite, check out the Appwrite documentation.

Note: The --dart-define flag allows you to pass environment variables to your Flutter app at runtime. Make sure to replace [your_appwrite_endpoint_url], [your_appwrite_project_id], [database-id], and [collection-id] with the appropriate values.

License

This project is licensed under the GNU GPLv3 License - see the LICENSE file for details.

The GNU GPLv3 is a free and open-source software license that gives users the freedom to use, modify, and distribute the software as they see fit, as long as they also distribute the modified software under the same license. If you choose to use this project or any of its code, please make sure to read and understand the terms of the license.

Contributing

Contributions of all kinds are welcome and encouraged! Whether you want to report a bug, submit a feature request, or make changes to the code, we value your input and appreciate your help in making SimpleNotes better.