This repo contains 4 apps that have some 'frontend' utility to the company.
custom-graphqlthis is where our 8base custom logic lives. 8base logic allows you to deploy custom functionality and is the baseline for committing database migrations. In our case we have an invite link trigger and updater. In order to use this repo, you'll need to be familiar with the 8base CLI.og-cardsis a frontend micro-service that generates dynamic images for the sharing cards shown on socials for our website. It is deployed on Vercel and so far has needed little to no maintainance.webappthis is the most active app in this repo. It is the meeshkan webapp (https://app.meeshkan.com) which is deployed on Vercel.websitethis is here in a hopeful measure but not currently in use. Currently our live website repo is https://github.com/meeshkan/website. We'd like to transition this here to share the chakra-ui library.
This repo also contains 3 libs or NX libraries which are shared code between all of the frontend projects.
chakra-themeserves as the custom Chakra UI setup that we use accross any frontend projects.downloadable-scriptis the microservice that converts the user story events/commands in 8base into a Puppeteer script.meeshkan-typesis a centralized place for custom TypeScript interfaces we use. Some are built custom but most come from 8base using a package calledgraphql-code-gen.
This guide will use yarn. Feel free to use the npm equivalent to my instructions if that works better for you!
- After cloning this repo to your computer —
cdinto the base repository (meeshkan). - Duplicate the
.env.templatefile, renaming it to.env.AUTH0_CLIENT_ID,AUTH0_CLIENT_SECRET, andSESSION_COOKIE_SECRETcan all be found in Auth0. If you do not have access to Auth0, contact @k4m4 or @KenzoBenzo to get you the tokens. The value ofAUTH0_DOMAINis "meeshkan.eu.auth0.com".- The token
NEXT_PUBLIC_EIGHTBASE_ENDPOINTchanges the 8base environment betweenstaging"https://api.8base.com/ckhqdz5mu01r307mn6szcbdke_staging" andMaster"https://api.8base.com/ckhqdz5mu01r307mn6szcbdke". - The token
EIGHT_BASE_AUTH_PROFILE_IDcan be found in 8base (log in found in 1pw). - The
TEST_URLdepends on how you serve your webapp locally. If you use the commandyarn start webappthe value will be "localhost:3000". Change accordingly for a different port. - The
COOKIEtoken can be found in Auth0, or https://app.meeshkan.com under our internalMeeshkan webappproject, auth tokens. - The
MIXPANEL_TOKENcan be found in Mixpanel, but for local development (to not pollute production analytics) I'd suggest you use theTest dataproject token of "dd7febc8c2697fca8ed2d5523409a281".
- While still in the base repository, install the project dependencies with
yarn. - Start a development server of the webapp using the command
yarn start webapp. You should then see a message that the port 3000 is now open and you can visitlocalhost:3000.