
Apps
JTBDOS contains a number of apps that make up your project. Each app is a self-contained application that can be deployed independently. While you can choose to run these apps on the subdomain of your choice, the recommended subdomains are listed on each page. Remember to add them to your environment variables underNEXT_PUBLIC_APP_URL
, NEXT_PUBLIC_WEB_URL
, and NEXT_PUBLIC_DOCS_URL
.
Each app should be self-contained and not depend on other apps. They should have an env.ts
file at the root of the app that composes the environment variables from the packages it depends on.
Packages
JTBDOS contains a number of shared packages that are used across the monorepo. The purpose of these packages is to isolate shared code from the main app, making it easier to manage and update. Additionally, it makes it easier to swap out parts of the app for different implementations. For example, thedatabase
package contains everything related to the database, including the schema and migrations. This allows us to easily swap out the database provider or ORM without impacting other parts of the app.
Each package should be self-contained and not depend on other packages. They should export everything that is needed by the app — middleware, hooks, components and even the environment variables.