Giter VIP home page Giter VIP logo

figma-plugin-with-supabase's Introduction

Figma Plugin with Supabase

Figma × Supabase

This repository shows how to integrate Supabase into figma plugin. Often we can use supabase-js in JavaScript project and the API is easy to use. Less code can do a lot. But, in Figma plugin the localStorage is not available, so we need to use clientStorage instead, which means we can't use supabase-js in Figma plugin because it need localStorage.

That's why I create this repository. In this template you can still use the same API to insert data or upload files, the difference is that you need to handle storing auth data in local. The core code is in src/app/utils/supabase.ts if you're interested.

Demo

https://twitter.com/leadream4/status/1439514151710179332

Prerequisites

  • In your Supabase dashboard SQL editor, select this template and run it to create profiles table and avatars bucket.

  • Create a .env file in root and write your SUPABASE_URL, SUPABASE_ANON_KEY inside.

SUPABASE_URL=YOUR_URL
SUPABASE_ANON_KEY=YOUR_KEY
  • Remember to set avatars bucket as public.

Quickstart

  • Run yarn to install dependencies.
  • Run yarn build:watch to start webpack in watch mode.
  • Open Figma -> Plugins -> Development -> New Plugin... and choose manifest.json file from this repo.

⭐ To change the UI of your plugin (the react code), start editing App.tsx.
⭐ To interact with the Figma API edit controller.ts.
⭐ Read more on the Figma API Overview.

Toolings

This repo is using:

  • React + Webpack
  • TypeScript
  • Prettier precommit hook

TODO

  • signUp API

figma-plugin-with-supabase's People

Contributors

hallee9000 avatar roppazvan 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.