Code Monkey home page Code Monkey logo

andrevneves / askless-flutter-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rodrigobertotti/askless-flutter-client

0.0 0.0 0.0 29.77 MB

Build Flutter Apps with PostgreSQL, MySQL, or any database, stream data changes through websockets effortlessly, handle websocket authentication like a pro and elevate your Flutter Chat App with video and audio calls!

License: MIT License

Objective-C 0.07% Kotlin 0.22% Dart 92.61% Swift 0.70% HTML 6.41%

askless-flutter-client's Introduction

Askless for Flutter

Build Flutter Apps with PostgreSQL, MySQL, or any database, stream data changes through websockets effortlessly, handle websocket authentication like a pro and elevate your Flutter Chat App with video and audio calls!

๐ŸŒŸ If you want to build your Flutter App without Firebase and stream data from a database (like SQL) to the Flutter App, Askless will save you a lot of time!

This is the Flutter side, click here to access the Backend side in Node.js

Built with Askless

Check the example of a Flutter Chat App with PostgreSQL / MySQL databases and Node.js. Supports video and audio calls.

commented_askless_example.mp4

๐Ÿ”Š The video above contains audio, click on the right side to turn it on

Why Askless?

๐Ÿ“น Add Video and Audio calls to elevate your Flutter Chat App

Easily implement WebRTC live calls in your App, no third-party services are required *

* Some users may be behind symmetric NAT, so to avoid problems in this scenario add your own or third-party TURN server, please check the documentation for more info

๐Ÿ’ช Stream data from PostgreSQL, MySQL or other database to your Flutter App through websockets

The Askless Framework (Backend in Node.js) is designed to make your Flutter App stream data in without Firebase, create your own routes that interact with your database, call route.notifyChanges(..) when something changes so the users will receive the changes!

โœˆ๏ธ Skip websocket details and focus in your application!

Askless Design is a result of thorough analysis to make websockets in Flutter easy and productive. It can be tricky to build websockets to transport data from a database from scratch for your Flutter App:

โ• you need to add logic to handle different kinds of data that will move through the websockets

โ• Authentication events come first, so you don't want to your client receive data he doesn't have permission to.

โ• If the websockets disconnect, either because of the user device or because of the server, we need to try to connect back again as soon as possible

โ• Ops! The user was receiving data by websockets, but he lost connection for a second and connected again, now we need to handle authentication BEFORE sending data again

โ• We may want to know once the user started streaming data and when the user received data, so we can know data was received, so an additional event like "message_received" needs to be added and handled in the App and backend, more work to simply add a double-check icon in your chat app once the message is delivered

โœ… You don't need to mull over implementing these details anymore ๐Ÿ˜€ Askless is here to make your life easier!

Important links

Examples

Getting Started

The "Getting Started" is an example of the Flutter client, an example is executed locally.

1 - First create the server, click here and follow the server instructions in the section "Getting Started"

2 - (Optional) To use an unencrypted connection in a test environment such as this example (ws:// connection instead of wss://) follow these instructions. Do not apply this on a production environment.

3 - (Optional) If you want to add video and audio calls for your Flutter App, follow these instructions to set it up

4 - Install

pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
    
  # Add this line:
  askless: ^3.0.2

5 - Import the package

import 'package:askless/askless.dart';

6 - Initialize informing the server URL with port (default: 3000). You can also access the myAsklessServer.localUrl attribute on your server-side in node.js to discover what the local URL of your server is.

7 - Start Askless with AsklessClient.instance.start()

Example:

void main() {
  AsklessClient.instance.start(serverUrl:"ws://192.168.0.8:3000"); // TODO: replace with the URL of your Askless Server
  runApp(MyApp());
}    

8 - Here we go! Now you can start using building your Flutter App with Askless, check the documentation and examples!

Issues

Feel free to open an issue about:

  • โ” questions

  • ๐Ÿ’ก suggestions

  • ๐Ÿ“„ documentation improvements

  • ๐Ÿœ potential bugs

Thanks

Thank you for using Askless!

Thanks also ALL the developers who developed the libraries that Askless uses and the authors of these two very good articles! A Comprehensive Guide to Flutter WebRTC and Flutter-WebRTC: A Complete Guide.

License

MIT

Contacting me

๐Ÿ“ง [email protected]

askless-flutter-client's People

Contributors

rodrigobertotti avatar

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.