Configuration

Paths configuration

Learn how to configure the paths of your app.

The paths configuration is set at apps/mobile/config/paths.ts. This configuration stores all the paths that you'll be using in your application. It is a convenient way to store them in a central place rather than scatter them in the codebase using magic strings.

It is unlikely you'll need to change this unless you're heavily editing the codebase.

apps/mobile/config/paths.ts
const pathsConfig = {
  index: "/",
  tabs: {
    auth: {
      login: `/${TABS_PREFIX}${AUTH_PREFIX}/login`,
      register: `/${TABS_PREFIX}${AUTH_PREFIX}/register`,
      forgotPassword: `/${TABS_PREFIX}${AUTH_PREFIX}/password/forgot`,
      updatePassword: `/${TABS_PREFIX}${AUTH_PREFIX}/password/update`,
      error: `/${TABS_PREFIX}${AUTH_PREFIX}/error`,
    },
    billing: `/${TABS_PREFIX}/billing`,
    ai: `/${TABS_PREFIX}/ai`,
    settings: `/${TABS_PREFIX}/settings`,
  },
} as const;

Fully type-safe

By declaring the paths as constants, we can use them safely throughout the codebase. There is no risk of misspelling or using magic strings.

Last updated on

On this page

No Headings
Ship your startup everywhere. In minutes.Get TurboStarter