Giter Site home page Giter Site logo

fuzzy-bunny's Introduction

Supabase Fuzzy Bunny Organizer

Learning Objectives

  • In response to a user event, make a fetch call to delete an item in the array and display the new state to the user (i.e., delete a todo).
  • Create foreign key relationships in Supabase and fetch related data using a single query

Demo

Fuzzy Bunny Organizer

Getting Started

Here is the schema for the fuzzy_bunnies table

Here is the schema for the loving_families table

Enable row level security and add policies that only allow authenticated users to perform CRUD actions on the tables.

Acceptance Criteria

Task Points
Users should be able to see the list of families on the /families page with their fuzzy bunnies 2
Clicking a bunny should delete it from supabase 1
On /create users should see a dropdown that allows users to attach bunnies to families 1
On /create, submitting the form should create a new bunny attached to the selected family and redirect to the main family page 2
Impure: fetchAndDisplayFamilies() function to display the families and bunnies 1
ASYNC: getFamilies(): returns all families with their bunnies 1
ASYNC: createBunny(bunny) : create bunny in supabase and attach it to a family 1
ASYNC: deleteBunny(id) : delete a bunny in supabase 1

Stretch Goals Ideas

  1. Please don't create new families. Let's just stick with the families we have.
  2. On click, don't delete the bunny--go to the bunny's "detail page". The detail page will have an interface that lets the user update the bunny. This includes allowing the user to change which loving family the bunny belongs to.
  3. Automatically generate the bunny form using a bunny fetched from the database. That way if new properties end up added to the bunny table, the front end dev doesn't need to update the front end later.
  4. Add filter/sort functionality to the families page? Let the user decide to only show bunnies who are larger than 7 lbs, for example? Only show families with more than 2 bunnies?
  5. Mega ambitious: I want to able to drag and drop bunnies to different families.

fuzzy-bunny's People

Contributors

chrischandfw avatar

Watchers

 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.