Code Monkey home page Code Monkey logo

no_signal's Introduction

Flutter Logo     Appwrite Logo

NO Signal

A functional replica of Signal (chatting app) made using Flutter and Appwrite. To know more about it - how it was built and how it works, I have written some detailed blogs on it. Know more about it here: Part 1 | Part 2 | Part 3.

What is Appwrite?

Appwrite is a self-hosted solution that provides developers with a set of easy-to-use and integrate REST APIs to manage their core backend needs.

Features

  • Built on RiverPod Architecture Pattern
  • Authentication using OAuth and OAuth 2.0
  • Users can send text to users
  • Users can view other Profiles(See their bio and picture)

Installation

Appwrite

Appwrite backend server is designed to run in a container environment. Running your server is as easy as running one command from your terminal. You can either run Appwrite on your localhost using docker-compose or on any other container orchestration tool like Kubernetes, Docker Swarm or Rancher.

The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command make sure you have Docker installed on your machine:

Unix

docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="install" \
    appwrite/appwrite:1.1.1

Windows

CMD

docker run -it --rm ^
    --volume //var/run/docker.sock:/var/run/docker.sock ^
    --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
    --entrypoint="install" ^
    appwrite/appwrite:1.1.1

PowerShell

docker run -it --rm ,
    --volume /var/run/docker.sock:/var/run/docker.sock ,
    --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
    --entrypoint="install" ,
    appwrite/appwrite:1.1.1

Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.

For advanced production and custom installation, check out our Docker environment variables docs. You can also use our public docker-compose.yml file to manually set up and environment.

Setting up appwrite project

Flutter

To build and run this project:

  1. Get Flutter here if you don't already have it
  2. Clone this repository
  3. cd into the repo folder
  4. Run flutter pub get to get the dependencies
  5. Run flutter run-android or flutter run-ios to build the app

(Please note that a Mac with XCode is required to build for iOS)

Appwrite

To setup your Appwrite project:

  1. Open your browser and go to your http://localhost
  2. Create your account and login.
  3. Click on Create Project.
  4. Enter a Name and custom Project ID for your project and click create.

At this moment your Dashboard is ready to use.

Setup Project Dashboard

We need to setup some collections and need to define its attributes so our app will be ready to use.

There are two ways of doing this. First, manually creating a collection from the dashboard and defining the attributes.

Secondly, I have a created a program which does that work for you. All you need is create an API key with all the permissions and replace it in the setup_appwrite.dart files.

Open your terminal in the project folder and run the following commands to setup the User Collection . Make sure to replace all the neccessary fields left blank.

cd lib/utils
dart setup_appwrite.dart

Also in utils folder create a file called api.dart to store all your details in the following way:

class ApiInfo {
  ApiInfo._();
  static const String url = "http://localhost/v1";
  static const String projectId = "[PROJECT_ID]";
  static const String secretKey = "[SECRET_KEY]"; // You can get this from your Appwrite dashboard
  static const String databaseId = "[YOUR_DATABASE_ID]";
  static const String userCollectionId = '[USER_COLLECTION_ID]';
  static const String storagebucketId = '[STORAGE_BUCKET_ID]';
}
}

Now your Project is ready to run.

File Structure

.
├── android # android files
├── assets # assets 
│   ├── images
│   └── lottieassets       
├── ios # android files
└── lib
    ├── api 
    │   ├── auth # Client Authentication
    │   └── database # Database API
    ├── models # Custom Models
    ├── pages
    │   ├── chat
    │   ├── error
    │   ├── home
    │   ├── loading
    │   ├── login
    │   └── settings
    ├── providers 
    ├── utils # Misc tools and stuffs
    └── widgets

App Flow

app flow

Chat architecture

chat arch

Screenshots

Contributors ✨

Thanks goes to these wonderful people (emoji key):


kelvin kavisi

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

no_signal's People

Contributors

2002bishwajeet avatar allcontributors[bot] avatar imgbot[bot] avatar kekavc24 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

Watchers

 avatar  avatar  avatar

no_signal's Issues

throws exception for missing bucket

I'm trying to run your app with appwrite, but it fails on the final part of create a user when trying to upload the profile image as there's no bucketId.

Exception has occurred.
AppwriteException (AppwriteException: Bucket not found (404))

I also tried using your collections creator script instead of doing it manually, and had same error thrown

Feature Consideration: Group Chat

Hello Biswa. Forked this repo to help you migrate to v0.15.x and noticed the approach for creating personal chats. Would you consider creating adding group chat to this project using databases. Where you have 2 databases:

  • For users
  • For groups

Just like personal chats, for every group created you preset the values and have a collection that has a record of the groups the user is part of.

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.