---
description: Akan page routing conventions
globs: apps/**/page/**/*.{ts,tsx,js,jsx}
alwaysApply: false
---

# Akan Page Routing

- `apps/<app>/page` may contain route modules only. Do not add helper logic or component-only files there.
- Route source files under `page/` must use `.tsx`. Do not add `logic.ts`, `.js`, or `.jsx` files under `page/`.
- Route pages use `_index.tsx`; layouts use `_layout.tsx`.
- Reserved `_*.tsx` route filenames are limited to `_index.tsx` and `_layout.tsx`; do not add files like `_Component.tsx` or `_helper.tsx`.
- Page filenames must not start with an uppercase letter. Move helper components like `Component.tsx` to app `ui`, `common`, or `lib` instead.
- Dynamic segments use `[id]`; route groups use directories like `(user)`, `(public)`, `(tab)`, or `(detail)`.
- Page modules should usually export `default`, `pageConfig`, `head`, `generateHead`, or `Loading`.
- Prefer `export default function Page` or `export default async function Page` for page components.
- Before changing route behavior, check `pkgs/akanjs/server/src/routeTree.tsx` and nearby routes for the expected pattern.
