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

# Client Development

> Developer guide for the Posthoot client

# Development

## Code Style

* TypeScript strict where possible
* Prefer functional components and hooks
* Keep components small and composable
* Co-locate component styles

## Useful Paths

```text theme={"dark"}
client/app/           # routes and pages
client/components/    # UI + feature components
client/lib/           # services, utils, api layer
client/hooks/         # custom hooks
client/types/         # shared types
```

## API Layer

Use the API service wrapper in `client/lib/services` for authenticated requests.

```ts theme={"dark"}
import { APIService } from '@/lib/services/api';

const api = new APIService('files');
// await api.get('/');
```

## Auth

* Config in `client/auth.ts` and `client/auth.config.ts`
* Server components can use cookies/session via NextAuth

## Testing

* Jest + Testing Library configured

```bash theme={"dark"}
pnpm test
```

## Common Scripts

```bash theme={"dark"}
pnpm dev
pnpm build
pnpm start
pnpm test
```
