Code Monkey home page Code Monkey logo

supabase_example's Introduction

Simple CRUD Notes with Authentication & Authentication

Tech Stack

SUPABASE

FLUTTER

GETX

Features

  • CRUD Notes (title, description)
  • Foreign key from users table in notes table
  • Authentication & Authorization
  • Fully Getx cli pattern implementation
  • Automatic logout based on time after login

Environment Variables

To run this project, you will need to add the following environment variables to your .env file or change .env.example to .env and don't forget to set the environment key

SUPABASE_URL= "Your Supabase URL"

SUPABASE_ANONKEY= "Your Supabase anonKey"

Run Locally

Clone the project

  git clone https://github.com/fridolinf/supabase_example.git

Go to the project directory

  cd supabase_example

Install getx cli globally

  pub global activate get_cli

see full implementation: https://pub.dev/packages/get_cli

Install dependencies

  • using flutter cli and vscode
  flutter pub get

DB Schema

  • Table

image

  • Notes Table

image

  • Users Table

image

Run without debug

  • Windows user
  ctrl + f5

Related

Here are some related projects

  • Build and release flutter project

macOS

Windows

Screenshots

App Screenshot

Authors

@fridolinf

supabase_example's People

Contributors

fridolinf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pujakhalika

supabase_example's Issues

"Bad state: No element Map" error After login

Hi.
I'm very new flutter and supabase.
I found your app and I really interested so I cloned.
but I'm having problem. May I ask question?

I made tables and tryed to login.
Seems like I loggined succesfully
but A loading icon show up center and app stoped.
Then I got this error at Homecontroller.dart
Bad state: No element Map<String, dynamic> user = (res).first as Map<String, dynamic>;

List<dynamic> res = await client
        .from("users")
        .select("id")
        .match({"uid": client.auth.currentUser!.id});
  Map<String, dynamic> user = (res).first as Map<String, dynamic>;

I read README file. but I'm not sure tables schema.
Could you teach me solution and I would like to make sure Table shema that users and notes column name ?

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.