oscklm
oscklmβ€’3w ago

TS Project References and Convex for big codebases

Just started taking a look at TS Project References, this caught my attention "can greatly improve the speed of typechecking and compiling, reduce memory usage when using an editor, and improve enforcement of the logical groupings of your program." just what im looking for, as our fairly big codebase is starting to bring TS to its knees, at least it feels that way. Does anyone have any experiences using it in a monorepo setup, like convex as a library and some client side apps referencing that convex lib? I'm very keen to start a thread on this, as it seems none exists already πŸ‘€
4 Replies
oscklm
oscklmOPβ€’3w ago
I'm gonna try and setup a repo like this, will share the repo once i succeed:
my-monorepo/
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ consumer-client/ # React Native
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”‚ β”œβ”€β”€ admin-client/ # React Native
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”œβ”€β”€ libs/
β”‚ β”œβ”€β”€ backend/ # Convex Backend
β”‚ β”‚ β”œβ”€β”€ convex/
β”‚ β”‚ β”œβ”€β”€ _generated/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”‚ β”œβ”€β”€ shared-ui/ # Shared Native UI
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”œβ”€β”€ tsconfig.base.json # Shared TS Config TypeScript
β”œβ”€β”€ tsconfig.json
└── package.json
my-monorepo/
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ consumer-client/ # React Native
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”‚ β”œβ”€β”€ admin-client/ # React Native
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”œβ”€β”€ libs/
β”‚ β”œβ”€β”€ backend/ # Convex Backend
β”‚ β”‚ β”œβ”€β”€ convex/
β”‚ β”‚ β”œβ”€β”€ _generated/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”‚ β”œβ”€β”€ shared-ui/ # Shared Native UI
β”‚ β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ tsconfig.json
β”‚ β”‚ └── package.json
β”œβ”€β”€ tsconfig.base.json # Shared TS Config TypeScript
β”œβ”€β”€ tsconfig.json
└── package.json
JuliΓ‘n David
JuliΓ‘n Davidβ€’3w ago
I’m always using Convex with Turborepo, and it works great. Your structure looks solid!
ibrahimyaacob
ibrahimyaacobβ€’3w ago
Hey @oscklm ive been looking for someone to finally share a turbo+convex Let me know when you have publish it
oscklm
oscklmOPβ€’3w ago
That’s not what im doing though. But what u are talking about, is a template already published by convex team. But it’s not what this thread is about. Im talking about TS Project References here. Here is a template with turbo: https://www.convex.dev/templates/monorepo

Did you find this page helpful?