laconic-deployer-frontend/standards/blueprints/next-app-router-structure.md

172 lines
5.4 KiB
Markdown

# Next.js App Router Structure with Abbreviated URLs
```
app/
page.tsx # URL: /
layout.tsx
not-found.tsx
global-error.tsx
login/
page.tsx # URL: /login
wallet/
page.tsx # URL: /wallet
layout.tsx
store/
page.tsx # URL: /store
layout.tsx
(web3-authenticated)/ # Auth wrapper (not in URL)
layout.tsx
(dashboard)/ # Dashboard wrapper (not in URL)
layout.tsx
page.tsx # URL: /
(buy-prepaid-service)/
bp/ # Abbreviated
page.tsx # URL: /bp
(projects)/
pr/ # Abbreviated
page.tsx # URL: /pr
[provider]/
page.tsx # URL: /pr/[provider]
[orgSlug]/
page.tsx # URL: /pr/[provider]/[orgSlug]
layout.tsx
error.tsx
not-found.tsx
loading.tsx
(settings)/
set/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/set
(projects)/
ps/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps
layout.tsx
loading.tsx
error.tsx
(create)/
cr/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr
layout.tsx
(configure)/
cf/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr/cf
(deploy)/
dp/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr/dp
loading.tsx
(success)/
sc/ # Abbreviated
[id]/
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr/sc/[id]
(template)/
tm/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr/tm
(configure)/
cf/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr/tm/cf
(deploy)/
dp/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/cr/tm/dp
loading.tsx
[id]/
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]
layout.tsx
loading.tsx
error.tsx
not-found.tsx
(deployments)/
dep/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/dep
loading.tsx
(integrations)/
int/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/int
(settings)/
set/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set
layout.tsx
(domains)/
dom/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set/dom
(add)/
add/ # Kept as-is (short enough)
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set/dom/add
(config)/
cf/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set/dom/add/cf
(git)/
git/ # Kept as-is (short enough)
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set/git
(environment-variables)/
env/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set/env
(collaborators)/
col/ # Abbreviated
page.tsx # URL: /pr/[provider]/[orgSlug]/ps/[id]/set/col
```
## Abbreviation Legend
- bp = buy-prepaid-service
- pr = projects
- ps = projects (within organization)
- cr = create
- cf = configure
- dp = deploy
- sc = success
- tm = template
- dep = deployments
- int = integrations
- set = settings
- dom = domains
- env = environment-variables
- col = collaborators
## API Routes
```
app/
api/
route.ts
organizations/
[slug]/
route.ts
projects/
route.ts
[id]/
route.ts
deployments/
route.ts
```