midday-ai / midday

Run your business smarter 🪄
https://midday.ai
GNU Affero General Public License v3.0
5.75k stars 517 forks source link

Incomplete Local Development Setup Documentation #218

Open shashankshet opened 3 months ago

shashankshet commented 3 months ago

I attempted to set up the local development environment for the Midday project, but it seems the documentation isn't fully updated. Some steps, particularly those related to environment variables, are missing. It would be great if we can have the end to end local setup documented.

pontusab commented 3 months ago

Hey! Correct, I will write that after our v1 is done!

absolutegravitas commented 2 months ago

@shashankshet - i managed to just have a local version running(sort of) . I've currently got a db / ui bug #248 with supabase authenticated user & team views.

See how you go with below -- this assumes some level of knowledge about these linked services, getting and setting keys etc. I can navigate the website static pages (had some trouble with the component complaining about making their key visible (because of NEXT_PUBLIC prefix on the NEXT_PUBLIC_TRIGGER_API_KEY which is Trigger.dev so i commented that out for now). I can login with Google oAuth and GitHub (which i set up myself by adding to the .src/apps/api/supabase/config.toml file but havent managed to get to the vanilla dashboard due to #248 mentioned above.

  1. find and set keys in .env files for the various integrated services by visiting the requisite sites - for mine I set up the following:
    • apps/api/.env with oAuth id / key for Google (you will have to follow google cloud oAuth instructions to do this). Callback URL to supply on google side is the supabase auth callback (shown when you fire up supabase locally)
  1. install supabase cli https://supabase.com/docs/guides/cli/getting-started?queryGroups=platform&platform=linux - i dont think you dont need to do anything including after supabase init as the midday repo already has supabase config

  2. run bun i in project root to install packages

  3. run bun dev in project root (first time takes a while in case supabase needs to pull docker images and start the container and run the migrations & seed scripts). This message contains details about your postgres server, the supabase keys to set in the .env files above and the callback URL for supplying to google oAuth (or other providers that you configure in supabase auth) image

  4. assuming you've done this correctly

    • the website aka ./src/apps/website is available at localhost:3000
    • the dashboard aka after you login aka ./src/apps/dashboard is available at localhost:3001
    • other links e.g. local supabase studio / inbucket email sim / storybook etc. are in the terminal under various localhost ports.

image

luchoster commented 3 weeks ago

have you been able to connect to a bank account with Plaid?

I have the project running for a while but I can't get the Plaid connection to work. Whenever I click the connect, I get this error

Screenshot

Console:

Screenshot

absolutegravitas commented 2 weeks ago

sorry bud not a North American -- got no plaid account / access to test any of the bank integrations with