Code Monkey home page Code Monkey logo

half-baked-web-01-character-designer-supabase's Introduction

Supabase Dropdown Character Maker

Learning Objectives

  • In response to a user event, make a fetch call to mutate a single object in a state array and display the new state to the user (i.e., complete a todo).

Buggy Supabase Character Designer

Here is the schma for the characters table:

Live Example:

https://alchemycodelab.github.io/web-01-character-designer-supabase/

User should be able to . . .
Visit the deployed pages on GitHub pages, with link in the About section of the Github repo .5
Events
On the home page ('/'), Login and Signup using the login and signup form. On success, redirect to the /character page .5
Logout by clicking the logout button .5
If a non-logged-in user tries to visit the character page, redirect them to the login page .5
On the character page load, fetch the character from supabase and render their details (including all catchphrases) to the page 1
On the character page load, if a charaacter does not exist for this user, create a default one in supabase to be updated later 1
On change of the dropdown, update the character in supabase. Then fetch from supabase to update the UI to show the right image 1
On click of the catchphrase button, update the character's catchphrases in supabase. This means you will fetch the old character's catchephrases, push the new catchpnrases to these old catchphrases, and send the mutated array to your updatCatchphrases function 1
On any dropdown change, see displayed how many times each dropdown has been changed in the current session (NOT tracked in supabase -- just like the previous iteration of this project) .5
Functions
ASYNC / IMPURE: fetchAndDisplayCharacter() : fetches character and sets the images and catchphrases in the DOM 1
ASYNC: fetchCharacter() : fetches character for currently logged in user from supabase .5
ASYNC: updateHead(newHead) : updates head of character for currently logged in user from supabase .5
ASYNC: updateMiddle(newMiddle) : updates middle of character for currently logged in user from supabase .5
ASYNC: updateBottom(newBottom) : updates bottom of character for currently logged in user from supabase .5
ASYNC: updateCatchphrases(newCatchphrases) : updates catchphrases of character for currently logged in user from supabase .5

half-baked-web-01-character-designer-supabase's People

Contributors

dpcairns avatar

Watchers

James Cloos avatar  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.