Storefront | Components | Admin | Dashboard
The Montessori Woodshop is a family owned and operated woodshop that specializes in hand made montessori style furniture and toys that puts an extreme focus on craftsmanship, sustainability, and generational sustainability.
- TBD
Category | Name | Platforms |
---|---|---|
Build | NODE_ENV |
Used for build time development |
Admin | GATSBY_MEDUSA_BACKEND_URL |
API URL for access |
Medusa | JWT_SECRET |
Secret for authentication |
Medusa | COOKIE_SECRET |
Secret for cookie transmission |
Medusa | MEDUSA_PORT |
API Port for access |
Medusa | MEDUSA_ADMIN_CORS |
URL of Admin Application |
Medusa | MEDUSA_STORE_CORS |
URL of Storefront Application |
Medusa | MEDUSA_REDIS_HOST |
Redis URL |
Medusa | MEDUSA_REDIS_PORT |
Redis Port |
Medusa | MEDUSA_STRIPE_API_KEY |
Secret for Stripe Access |
Medusa | MEDUSA_STRIPE_WEBHOOK_SECRET |
Secrete for Stripe Webhook Access |
Medusa | CLOUDFLARE_IMAGE_API_TOKEN |
Token to upload images to CF |
Medusa | CLOUDFLARE_IMAGE_HASH |
Image account hash |
Cloudflare | CLOUDFLARE_ACCOUNT_ID |
Token used for CI deployments to CF |
Cloudflare | CLOUDFLARE_API_TOKEN_WORKERS |
Token used for CI deployments to CF |
Cloudflare | CLOUDFLARE_API_TOKEN_PAGES |
Token used for CI deployments to CF |
Auth0 | WOODSHOP_AUTH0_API_ISSUER |
Issuer of ID |
API | WOODSHOP_API_DATABASE_URL |
URL of Database* |
API | WOODSHOP_API_MIGRATE_DATABASE_URL |
Migration URL when developing |
Auth0 | WOODSHOP_AUTH0_AUDIENCE |
Audience of the API |
Auth0 | WOODSHOP_AUTH0_DASHBOARD_CALLBACK_URL |
Callback URL after Code Grant |
Auth0 | WOODSHOP_AUTH0_DASHBOARD_DOMAIN |
Domain of code grant |
Auth0 | WOODSHOP_AUTH0_DASHBOARD_CLIENT_ID |
Auth0 Client ID |
Auth0 | WOODSHOP_AUTH0_DASHBOARD_CLIENT_SECRET |
Auth0 Client Secret |
Auth0 | WOODSHOP_AUTH0_API_ISSUER |
Issuer of ID |
Should be set to either development
or production
. This tells the application at build time what target it's building for. This can be set either in the .env
file or on the path of the process will be using it. The later is the most important.
- Github Actions (migrate)
- Github Actions (deploy)
- Github Actions (deploy)
This token is created on the Cloudflare dashboard and is then used with the Medusa API to enhance the admin function for how images are stored. This is also used for the woodshop api to manage images that are going to be used inside of the blog and website.
.env
- Render
- Wrangler
- Render
This is the token that is used to tell wrangler what account it should be targeting when running wrangler commands. This can go on the path of the process that is executed from yarn / npm scripts.
@woodshop/api
@woodshop/dashboard
(Remix)@woodshop/components
(Storybook)medusa-admin
(Gatsby)medusa-storefront
(Remix)
- Github Actions (deploy)
This is the token that is used to use with the wrangler CLI to upload cloudflare workers assets to the Cloudflare network.
- Github Actions (deploy)
This is the token that is used to use the direct upload feature of angular to deploy static assets and function folders to cloudflare pages. This token is used in Github Actions and included on the path of the script that is used to kick off of the wrangler CLI.
@woodshop/dashboard
(Remix)@woodshop/components
(Storybook)medusa-admin
(Gatsby)medusa-storefront
(Remix)
- Github Actions (deploy)
This URL is the environment variable that is used to tell Prisma where it should be connecting to the DB. This is a single environment variable that changes depending upon how it's used and where it is used. Since we're only using this database in the serverless environment, we need to make sure it is added to wrangler and that's done a little differently than putting it on the path of the process.
However, this is also needed when migrating the DB in CI so this should also go on the path when running the migrate commands
- Github Actions (migrate)
- Wrangler (development)
- Wrangler (production)
This URL is used only when developing locally. Since (as of this moment) the local workflow is using the Prisma data proxy, we cannot use the data proxy URL to migrate the DB. Instead we must use the external query string of the
- Pages EnvVars
- Pages EnvVars
- Pages EnvVars
- Pages EnvVars
- Pages EnvVars
Below is a matrix of where each of the solutions are deployed
Category | Service | Method | CF Pages | CF Workers | Render | Prisma Studio |
---|---|---|---|---|---|---|
Medusa API | Redis | 1-Click | X | |||
Medusa API | Postgres | 1-Click | X | |||
Medusa API | NodeJS API | 1-Click | X | |||
Storefront | Remix | GH Action | X | |||
Admin | Gatsby | 1-Click | X | |||
Woodshop API | Postgres (Dev) | 1-Click | X | X | ||
Woodshop API | Postgres (Prod) | 1-Click | X | X | ||
Woodshop API | Postgres Shadow DB | |||||
Woodshop API | Serverless API | GH Action | X | |||
Docs | Components | GH Action | X (sites) |
- Create
.env
file at/
(refer to the values in the.env-sample
) - Create
.env
file at/packages/woodshop-api/
(refer to the values in the.env-sample
) - Run
docker-compose up -d
to:- Create the Medusa API PostgreSQL DB and run migrations and seed scripts
- Create the Medusa API Redis cache and link it to the DB instance
- Build and run the Medusa Administrator console
The below command will do the following:
- Generate a Prisma Client that can be consumed in your code
- Start the wrangler serverless service
- Listen for changes in the
packages/woodshop-api/src
folder
yarn api-dev
yarn api:push
Due to the limitations of the Prisma DataProxy, you'll need to switch the WOODSHOP_API_DATABASE_URL
to the direct query string of the database instead of the proxied URL. Also ensure that your ShadowDB is running using docker compose.
yarn api:migrate-dev
The below command will start the remix server using miniflare. Any changes that are made will automatically update the code and the page will refresh.
yarn dev
The below command will start up the Storybook solution so any components can be created in isolation.
yarn components-dev
Once you're satisfied with your components, in order to make sure that the Remix app can consume them, you'll need to run the below:
yarn components-build