UI Toolkit
The UI Toolkit can be found at: https://github.com/closerdao/closer-ui
The code is structured in a monorepo pattern and is built with a Turborepo - https://turbo.build/repo. The apps directory contains a few property apps that are deployed (i.e. traditionaldreamfactory.com, moos.garden etc), and the packages directory that contains Closer package, which contains reusable components and logic.
Apps:
tdf: TDF Next.js application ...
Packages:
closer: Closer Next.js applicationeslint-config-custom:eslintconfigurations shared across all projectstsconfig:tsconfig.jsons used throughout the monorepo
Run locally
Please, first find two files with the name.env.sample, clone them in the same directory (one in each app's directory, one in Closer) and rename to .env. Then, fill in the values for the variables (ask in the chat for secrets).
From root folder:
Install dependencies
yarnRun one of the apps
CD to app's directory (e.g. apps/tdf), then
yarn devTest
CD to app's directory (e.g. apps/tdf or packages/closer), then
yarn testBuild
To build all apps and packages, run the following command from the root:
yarn run buildTo build a specific app or package, run the following command from the root:
CD to app's directory (e.g. apps/tdf), then
yarn buildInstalling packages
Install packages in a respective app directory. Packages shared between apps should go to /packages/closer. CD into app directory, then
yarn -W add [package name]Same for removing packages:
yarn -W remove [package name]Remote Caching
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
npx turbo loginThis will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
npx turbo linkUseful Links
Learn more about the power of Turborepo:
Last updated