Skip to content

Latest commit

 

History

History
 
 

app

This project is the client "app" for Cabbage.

It's a create-react-app project, statically typed using Typescript, using MUI as the component library.

From a build perspective, the project is implemented as both a Gradle sub-project (of the larger Cabbage project) and a standalone Node.js project.

The Gradle functionality is mostly just for downloading node/npm. The main.yml file does have a node install step, but if the versions get out of sync - the Gradle tasks will use download and use whatever version is specified in build.gradle.

Running locally

Run the npm start script to start a local dev server, you will need to provide some env vars to connect to a dev supabase: REACT_APP_CABBAGE_ENV=DEV;REACT_APP_SUPABASE_ANON_KEY=xxadd intro contax.yyy.zzz

Look in the Supabase UI under /Settings/API/API Keys for your anon key. Remember that Supabase will "pause" your DB after it's been inactive for a while (1 week at the moment for free tier: https://supabase.io/pricing).

Generating types

Note: Type generation is a WIP. At the moment, I write the types used by Cabbage by hand.

Run the npm generate-types build script, you need to add the supabase swagger url as a command line arg:

 https://<db id>>.supabase.co/rest/v1/?apikey=<xxx.yyy.zzz> 

Architecture

App.tsx is the place to start to see how the app works. It's what I call a Funnel architecture.