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.
simple_notes.mp4
The following dependencies were used in the development of this project:
appwrite
: a Flutter SDK for the Appwrite server.equatable
: a utility library for implementing equality without needing to explicitly override == and hashCode methods.flex_color_scheme
: a Flutter package that provides customizable color schemes for Flutter apps.flutter
: the core Flutter SDK.flutter_bloc
: a Flutter package that implements the BLoC (Business Logic Component) pattern to manage state in Flutter apps.formz
: a Flutter package that simplifies form validation and management.fpdart
: a collection of functional programming utilities for Dart.freezed_annotation
: a package that generates immutable classes for Dart with the freezed library.go_router
: a declarative and flexible router for Flutter apps.hydrated_bloc
: a Flutter package that adds support for state persistence to flutter_bloc.json_annotation
: a package that generates JSON serialization and deserialization code for Dart classes.lottie
: a Flutter package that provides support for Lottie animations.path_provider
: a Flutter package that provides platform-specific locations for storing files.shared_preferences
: a Flutter package that provides a persistent store for simple data.timeago
: a Flutter package that provides human-readable time intervals.
The following development dependencies were used in the development of this project:
build_runner
: a command-line tool for generating Dart code based on annotated source code.flutter_test
: the Flutter testing framework.freezed
: a code generator for generating immutable classes in Dart with the freezed library.json_serializable
: a code generator for generating JSON serialization and deserialization code for Dart classes.very_good_analysis
: a Flutter package that provides static analysis tools and style enforcement for Flutter projects.
To get started with SimpleNotes, follow these steps:
- Clone the repository to your local machine.
- Run
flutter pub get
to install the project dependencies. - Run build_runner to generate the code for the freezed classes:
flutter pub run build_runner build
-
Create a new Appwrite project and configure the project settings. (See the Setting up Appwrite section)
-
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]
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:
- Open your browser and access the Appwrite console at localhost
- Create an account and sign in.
- Create a new project by clicking the
Create Project
button on the Appwrite dashboard. - In the
Overview
tab, scroll down to theIntegrations
section and add a platform by clicking theAdd Platform
button. SelectFlutter 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.). - Confirm that
Email/Password
authentication method is enabled by going to the settings section of theAuth
tab. - 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 theAPPWRITE_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. - Create a new database by going to the
Database
tab and then proceed to retrieve the database ID and set it as theAPPWRITE_NOTE_DATABASE_ID
environment variable. - 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 theAPPWRITE_NOTE_COLLECTION_ID
environment variable. - 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
- (String) [Attribute Key]:
- Do not forget to enable
CREATE
,READ
,UPDATE
andDELETE
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.
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.
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.