Hosting
Hosting
Our apps are hosted either on firebase or vercel. marketplace
, webar
, webar/admin
, and api
are hosted on firebase. scraper
is a Next.js app, hosted on Vercel.
We're using Vercel for Next.js apps because doing SSR with Firebase requires some tricky configuration to get a firebase cloud function to run Next.js - and even when that's set up, it seems to be pretty slow due to sometimes slow cold starts for firebase cloud functions.
Redirects
Since most of our apps are SPAs, firebase.json
is configured to redirect requests to paths handled by the client-side router to the index.html
, so things like React Router (marketplace and studio) or the custom getSlugFromPath
function (webar) can handle showing different data/pages based on the route.
API Hosting
The API is built with Firebase Cloud Functions, running and express server for each group of end points (/users
, /pieces
, etc.). Then we use the firebase.json
file to set up a Firebase hosting app (api.illust.space
) that redirects traffic to the functions, so we have a custom domain.
Enviornments
We current have two deployed enviornments for each app - production and staging. Each has its own Firebase project
Accessing Cloud Storage
User-generated files are stored in Google Cloud Storage, and accessed via Firebase. Each enviornment
You can manually
Env Vars
All client apps are configured with environment variables
You can log into Vercel with the dev.illust.space
Google email group. Here, you can
Last updated