Git Product home page Git Product logo

jem's Introduction

Setup supabase

The database provider we will use is Supabase and we need to install the Supabase CLI. For ease of use, we are using npm to install this cli tool.

The following command will install the tool and start supabase.

NOTE: This assumes that docker is running on your machine

$ npm i && cd supabase && npx supabase start

You can visit the Supabase Studio once supabase is up at http://localhost:54423/project/default/editor

DB Seed

You should see seed data populated in the organizations and users tables from the Supabase Studio above.

In case you don't see the seed data, you can run the reset command below which will trigger the supabase/seed.sql script.

$ npx supabase db reset

Build FastAPI application

Build the container using the following command

$ docker-compose build --no-cache

Run FastAPI application

Bring up the container using this

$ docker-compose up --build

Dashboard simulation - creating announcements

We will use Postman or similar tool to create announcements.

The following curl can be use to create an announcement in the database. You can update the publish_at field to specify the time you want the announcement to go out.

curl --location 'http://localhost:8002/announcement' \
--header 'Content-Type: application/json' \
--data '{
    "body": "Our end of year party is on Saturday evening!",
    "organization_id": "11116e73-1c03-5de6-9130-5f9925ae8ab4",
    "publish_at": "2024-05-08T09:30:00Z"
}'

The seed data has the following organizations with the corresponding UUID to use in the curl above

  • Jem: 11116e73-1c03-5de6-9130-5f9925ae8ab4
  • Root: 1087ebe8-1ef8-5d97-8873-735b4949004d

jem's People

Contributors

tatendamugadza avatar

Watchers

Mbele Lebohang 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.