Illust.space
Last updated
Was this helpful?
Last updated
Was this helpful?
The monorepo for the Illust Space marketplace and WebAR map webapp.
Install:
Node 16
Yarn
Java (for the database emulator)
You can use to install the versions in the .tool-versions
file.
You may also want to install the current version of bash
with brew install bash
, to fix issues with running pre-commit hooks.
This monorepo uses Lerna and Yarn Workspaces to manage shared node packages. Most commands should be run from the root of the project. See the for available commands, and for other useful commands.
Download a Service Account JSON file ). Then move it to
Then copy over the .env
and .runtimeconfig.json
files to the matching packages/package-name
directories.
You can also manually generate keys from the different services:
https://console.firebase.google.com/project/illust-marketplace-staging/settings/general
https://dashboard.portis.io
https://dashboard.fortmatic.com
https://infura.io/dashboard/ethereum
Install npm dependencies for all packages. This uses Lerna and Yarn Workspaces, so most dependencies will be installed in the root node_modules
:
Generate TypeScript files and types for the marketplace contract ABIs.
To add a dependency to a particular package:
Add a dependency to all packages:
Add a dev dependency to the root only:
If there's a problem with your node_modules and you need to delete them all and start over:
When setting up the local project for the first time, you will need to build the API server:
And also run the following command to set the default firebase project:
After running those commands once, you can run the following command to start the firebase emulator for the cloud functions and webpack-dev-server for the marketplace and webar frontends:
You can also run these in separate terminals, which can make debugging easier:
Use flag --https for when needed. ex: yarn start:webar --https
Use a chrome flag chrome://flags/#allow-insecure-localhost
to remove https warnings
Note that in general you should set up your code editor to show eslint errors and to format with prettier. The pre-commit hooks also should catch any linting errors. But if you want to manually auto-format the codebase with eslint --fix
and prettier
:
To check that everything is linted correctly and should pass CI:
You can manually build and deploy the api
functions, marketplace
frontend, and webar
frontend to Firebase.
When doing a release to production, you want to generate new version numbers on the release/
branch before merging to main. To do that on public packages that have changed since the last release, run:
Download the folders in .
marketplace
will run on , webar
on , scraper
on , pvnp
on , and api
on . You can see the firebase function logs at .
We're using and to automatically format and lint files during a git commit. This should automatically install when you yarn bootstrap
, and will run prettier
, eslint
, and tsc
only on changed files.
In general, you should rely on the to build and deploy the apps. Merging to development
will deploy to staging, and merging to main
will deploy to production.