mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-02-20 07:37:26 -05:00
* update landing packages & tailwind * move images * refactor to nextjs * doc stuff * rename markdown to mdx * working docs * Add math * fix pnpm-lock * Code highlighting * fix types * fix more stuff * Notice component and removed slot * delete editorconfig eslint rule * pnpm-lock * some fixes * fixed types (pls) * bump ui's typescript too * commit next-env.d.ts * fix doc links * Use next/head instead of react-helmet & rehype-external-links * fixes * fix unsub from list * add trim() to docs.excerpt * trim doc title too * fix titles * replace <a> to Link * hide .contentlayer & .next from vscode search
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
---
|
|
index: 2
|
|
---
|
|
|
|
# Guidelines
|
|
|
|
## `@sd/interface`
|
|
|
|
Most interface code should live inside the `app` directory,
|
|
with the folder structure resembling the app's routing structure.
|
|
We currently use [React Router](https://reactrouter.com/) and take full advantage of nested and config-based routing
|
|
|
|
### Casing
|
|
|
|
- All files/folders containing a route should be `lower-kebab-case`
|
|
- Dynamic routes should be `camelCase` and have their parameter name prefixed with `$`
|
|
- All other files/folders should be `PascalCase` (expect for `index` files inside `PascalCase` folders)
|
|
|
|
### Layouts
|
|
|
|
If a folder of routes has a component that should be applied to _every_ sub-route,
|
|
the component's file should be named `Layout.tsx` and applied in the parent folder's routing configuration as the `element` property.
|
|
|
|
For components that should wrap a subset of routes,
|
|
name the file with something ending in `Layout.tsx` (but not `Layout.tsx` itself!).
|
|
We then recommend using [layout routes](https://reactrouter.com/en/main/route/route#layout-routes) to apply the layout without introducing a new `path` segment.
|