> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launchtoday.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Project Structure

> How the Launch monorepo is organized

## Overview

Launch is a Turborepo monorepo that uses a single `pnpm` workspace to manage
dependencies across apps. A monorepo keeps related code in one place so you can
share types, reuse utilities, and ship features across the API and mobile app
without cross-repo overhead.

At the top level, `apps/` holds the product apps (mobile, api, and web — work in progress).
The root config files (`package.json`, `pnpm-workspace.yaml`, `turbo.json`) manage
dependencies and task orchestration across the workspace.

`pnpm-workspace.yaml` defines the workspace packages and `turbo.json` runs tasks
across them efficiently.

## Apps

<Columns cols={3}>
  <Card title="Mobile" icon="mobile" href="/mobile/file-structure">
    iOS and Android app built with Expo SDK 55 and Expo Router.
  </Card>

  <Card title="API" icon="server">
    Backend server with tRPC, Better Auth, and Prisma.
  </Card>

  <Card title="Web (Coming Soon)" icon="globe">
    Web app is planned, but not shipped yet.
  </Card>
</Columns>

***

## Mobile App

The mobile app uses Expo Router for file-based navigation. Screens go in `app/`, reusable components in `components/`.

```
apps/mobile/
├── app/
│   ├── _layout.tsx
│   ├── index.tsx
│   ├── (tabs)/          # Tab screens
│   ├── onboarding/      # Onboarding flow
│   └── auth/            # Auth screens
├── components/          # Reusable UI components
├── features/            # Feature modules (chat, etc)
├── lib/                 # API client, hooks, utilities
├── constants/           # Colors, spacing, typography
├── assets/              # Fonts, images
├── app.config.ts
└── package.json
```

| Folder | What goes here |
| - | - |
| `app/` | Screens and navigation. File name = route. |
| `components/` | Shared UI components used across screens. |
| `features/` | Self-contained feature modules with their own hooks and components. |
| `lib/` | API client, authentication, utilities, custom hooks. |
| `constants/` | Theme tokens, colors, spacing values. |

***

## API

The API uses Koa.js as the server framework with tRPC for type-safe endpoints and Prisma for database access.

The API source lives under `apps/api/src/` (routes, routers, services, middleware,
and shared clients), while `apps/api/prisma/` contains the database schema and
migrations.

| Folder | What goes here |
| - | - |
| `routers/` | tRPC routers. Each file exports procedures for a domain. |
| `routes/` | Traditional REST endpoints like auth callbacks and webhooks. |
| `services/` | Business logic. Keep routers thin, put logic here. |
| `lib/` | Database client, external service clients (Stripe, Twilio). |
| `prisma/` | Database schema and migrations. |

***

## Key Files

| File | Purpose |
| - | - |
| `apps/mobile/app.config.ts` | Expo configuration (app name, bundle ID, plugins) |
| `apps/mobile/app/_layout.tsx` | Root layout with auth provider and navigation |
| `apps/api/src/router.ts` | Main tRPC router combining all sub-routers |
| `apps/api/prisma/schema.prisma` | Database models and relationships |
| `turbo.json` | Turborepo build pipeline configuration |
| `pnpm-workspace.yaml` | Workspace package definitions |

## Troubleshooting

* **Can’t find a screen**: check `apps/mobile/app/`
* **Missing API route**: check `apps/api/src/router.ts` for registration

## Next Steps

<Columns cols={2}>
  <Card title="Start the Backend" icon="server" href="/quickstart">
    Run the API and database locally.
  </Card>

  <Card title="Start the Mobile App" icon="mobile" href="/getting-started/run-mobile">
    Launch Expo and open the app.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.