This monorepo includes many of PoolTogether's apps and packages in order to facilitate code sharing and maintainabiliy.
Make sure you have pnpm installed, as it is the package manager used throughout this monorepo.
pnpm install
pnpm dev
Each app is already setup with its own port through its package.json
dev script.
app
: App w/ core PoolTogether Hyperstructure functionality.ecosystem
: App to highlight parts of the PoolTogether ecosystem.landing-page
: PoolTogether's landing page.tools
: App for extra PoolTogether tooling.
All apps above are Next.js apps with Tailwind CSS support, written in TypeScript.
pt-client-js
: Protocol-specific functions to easily interact with on-chain data.pt-components
: More complex React component library utilizing some components frompt-ui
.pt-generic-hooks
: Shared React hooks.pt-hyperstructure-hooks
: Shared React hooks specific to Hyperstructure functionality.pt-types
: Shared Typescript types.pt-ui
: Stub React component library with Tailwind CSS used throughout many apps, using Flowbite.pt-utilities
: Shared Typescript utilities.tailwind-config
: Sharedtailwind
configs.tsconfig
: Sharedtsconfig.json
setups.
All packages above are written in TypeScript.
When making changes to packages, running pnpm i
will run the prepare
scripts on each one, properly building them for use in the apps.
This Turborepo has some additional tools already setup:
- Tailwind CSS for styles
- TypeScript for static type checking
- Prettier for code formatting
When adding/updating apps and/or packages, duplicate dependencies may be created, creating versioning issues. This can be resolved through running pnpm up -r
as described here, or just looking through pnpm-lock.yaml
to identify version discrepancies.
The biggest culprit of the above is @tanstack/react-query
, which sometimes is installed as two different versions and apps can no longer utilize hooks from the hooks package. This has been solved through the method described here.
If editing component themes in pt-ui
or pt-components
, having the Tailwind CSS IntelliSense
plugin for VSCode is recommended. In order to enable it for custom Flowbite themes, add theme
to the Class Attributes
setting.