dash/app- web admin dashboard (Vite Single Page Application)site- main site: marketing and docs (next.js app)storybook- storybook for all react components
dash/ambient- ambient typescript types for dashboard (pkg name@types/dash-ambient)dash/components- react components for dashboarddash/datetime- date/time fns for dashboarddash/keys- logic/domain knowledge around keysdash/types- shared types (non-ambient) for dashboarddash/utils- misc helpers (string, etc.) for dashboardshared/components- react components used by more than one appshared/datetime- date/time fns used by more than one appshared/tailwind- shared tailwind presetshared/ts-utils- shared typescript utilities
node18pnpm8just1.9
Clone the gertrude-app/swift repository. Follow the instructions in the api/readme.md.
From the api directory of that repository, execute just run-api Next, create a file
called .env.local in the dash/app directory. The file should have a line with
VITE_API_ENDPOINT=http://127.0.0.1:8080 Once you've installed the above node and pnpm
environment dependencies, run pnpm i from the web directory. Then run just dash to
run the dashboard. Create a test parent account email in the parents table of the
database. If running in debug mode, the password good will login. Login via
http://localhost:8081
Run just for an overview of the most commonly used dev commands. Check out the
justfile for even more.
pnpmrequires that the lib be explicitly listed as a dependency, so in other apps/libs that need it, you'll need to runpnpm --filter @some/pkg install @new/pkg- if the lib has react components using tailwind, be sure to updated the
contentsection of thetailwind.config.jsfor the app consuming it, so that JIT works correctly. - add the new package to the
justfiletypechecking commands:ts-checkandts-watch
- the "next" devDependency in the monorepo root is required for typechecking the shared storybook instance
I spent about 6 hours trying to get typescript project references setup to avoid the
huge conglomerate typechecking commands in the Makefile, but ultimately failed. There is
no way to typecheck a monorepo in one command (see
here), so you have to do a
build, but then I had to jump through all sorts of hoops to not get any output from
the build. I ultimately solved the output issues, but found that I was getting super
obscure TS errors that I couldn't solve, so gave up. Maybe try again, but I think that
using nx to speed up the typecheck command would be good enough.