pastoria

Category: Development & Coding | Uploader: rrdelaneyrrdelaney | Downloads: 0 | Version: v1.0(Latest)

Create and modify pages, routes, nested entrypoints, and Relay queries in this Pastoria app. Use this skill when adding new pages, routes, components with GraphQL data, or modifying the routing structure. --- # Pastoria App Reference This is a **Pastoria** app — a full-stack React framework with file-based routing, React Relay for GraphQL data fetching, and server-side rendering. ## Project Structure ``` pastoria/ # All routes and app config app.tsx # App shell wrapping all pages (optional) environment.ts # PastoriaEnvironment config (GraphQL schema) globals.css # Global styles <route>/page.tsx # Routable pages <route>/other.tsx # Nested entrypoints (lazy sub-components) <route>/route.ts # Server API routes (Express handlers) __generated__/ # Generated code — never hand-edit router/ # Pastoria-generated router, entrypoints, types queries/ # Relay-generated query artifacts ``` Required path aliases (in `package.json` `"imports"` and `tsconfig.json` `"paths"`): - `#pastoria/*` maps to `./pastoria/*` - `#genfiles/*` maps to `./__generated__/*` ## File-Based Routing Conventions | File pattern | Result | | ---------------------------------- | --------------------------------- | | `pastoria/<path>/page.tsx` | Route at `/<path>` | | `pastoria/<path>/[param]/page.tsx` | Dynamic route at `/<path>/:param` | | `pastoria/<path>/other.tsx` | Nested entrypoint `/<path>#other` | | `pastoria/<path>/route.ts` | Express API handler at `/<path>` | Reserved files (never treated as routes): `app.tsx`, `app.ts`, `environment.ts`. ## Pages A page is a `page.tsx` file with a default-exported React component. ### Minimal page (no data fetching) ```tsx export default function MyPage() { return <div>Hello</div>; } ``` ### Page with a Relay query ```tsx import {page_MyQuery} from '#genfiles/queries/page_MyQuery.graphql.js';

Changelog: Source: GitHub https://github.com/rrdelaney/pastoria

Directory Structure

Current level: packages/vite/templates/

SKILL.md

Login to download/like/favorite ❤ 2 | ★ 0
Comments 0

Please login before commenting.

No comments yet. Be the first one!