The legacy, statically generated frontend that is the face of L2BEAT.
This is the legacy frontend and most of the work is now happening in ../frontend2
. Some pages will return 404, in which case it (probably) means that the page has been migrated to the new Next.js codebase.
To run or develop the frontend you need to install and build its dependencies. You can do it by running the following commands in the repository root:
yarn
yarn build:frontend
yarn start
- run the development serveryarn build
- compile the production static siteyarn format
- check if formatting is correct with biomeyarn format:fix
- run biome automatic formatteryarn lint
- check if the code satisfies the biome configurationyarn lint:fix
- run biome automatic fixeryarn tinify-logos
- resizes and optimizes logosyarn typecheck
- check if the code satisfies the typescript compiler
TINIFY_API_KEY
- API key for Tinify, useful if you are adding/changing logo of a project (500 compressions per month are free)
TINIFY_API_KEY=
Production build requires (for some unknown reason) rebuilding dependencies with ESM. Use yarn storybook:build
to do exactly that.
You should not import files that depend on node-related modules (e.g. fs) in stories. That will cause much pain searching for why the storybook is not working. For example you should not import layer2s from config as it imports all projects and some of them use ProjectDiscovery that uses fs.