fimo 0.14.0-staging.1 → 0.14.0-staging.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/assets/skills/fimo-cli/SKILL.md +1 -0
- package/assets/skills/fimo-cli/references/agents.md +1 -0
- package/assets/skills/fimo-cli/references/history.md +2 -0
- package/assets/skills/fimo-cli/references/init.md +18 -2
- package/assets/skills/fimo-cli/references/locales.md +2 -0
- package/assets/skills/fimo-cli/references/projects.md +1 -1
- package/assets/skills/fimo-code/references/frameworks/next/locales.md +1 -1
- package/assets/skills/fimo-code/references/frameworks/react-router.md +1 -1
- package/assets/skills/fimo-code/references/locales.md +1 -1
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +9 -9
- package/dist/runtime/templates.d.ts +1 -1
- package/dist/runtime/templates.js +1 -1
- package/package.json +1 -1
- package/templates/nextjs/.fimo/config.json +15 -0
- package/templates/nextjs/AGENTS.md +47 -0
- package/templates/nextjs/CLAUDE.md +5 -0
- package/templates/nextjs/_gitignore +16 -0
- package/templates/nextjs/next.config.ts +6 -0
- package/templates/nextjs/package.json +30 -0
- package/templates/nextjs/pnpm-workspace.yaml +4 -0
- package/templates/nextjs/src/app/globals.css +48 -0
- package/templates/nextjs/src/app/layout.tsx +17 -0
- package/templates/nextjs/src/app/page.tsx +9 -0
- package/templates/nextjs/tsconfig.json +23 -0
- package/templates/react-router/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const TEMPLATE_FRAMEWORKS: readonly ['react-router', '
|
|
1
|
+
export declare const TEMPLATE_FRAMEWORKS: readonly ['react-router', 'nextjs'];
|
|
2
2
|
export type TemplateFramework = (typeof TEMPLATE_FRAMEWORKS)[number];
|
|
3
3
|
export declare const DEFAULT_TEMPLATE: TemplateFramework;
|
|
4
4
|
/**
|
|
@@ -27,7 +27,7 @@ const MODULE_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
|
27
27
|
const PACKAGE_ROOT = path.resolve(MODULE_DIR, '..', '..');
|
|
28
28
|
const RELEASE_FILE = path.join(PACKAGE_ROOT, 'release.json');
|
|
29
29
|
const PACKAGE_JSON_FILE = path.join(PACKAGE_ROOT, 'package.json');
|
|
30
|
-
export const TEMPLATE_FRAMEWORKS = ['react-router', '
|
|
30
|
+
export const TEMPLATE_FRAMEWORKS = ['react-router', 'nextjs'];
|
|
31
31
|
export const DEFAULT_TEMPLATE = 'react-router';
|
|
32
32
|
/**
|
|
33
33
|
* Absolute path to the requested framework's template directory.
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Fimo project
|
|
2
|
+
|
|
3
|
+
This is a Fimo project. Fimo connects content, media, forms, analytics, editing, environments, and hosting to this Next.js application.
|
|
4
|
+
|
|
5
|
+
## Load the Fimo skills before doing Fimo work
|
|
6
|
+
|
|
7
|
+
Load only the skill relevant to the task:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm exec fimo skills get fimo-code # code and framework APIs from this project runtime
|
|
11
|
+
npx fimo@latest skills get fimo-cli # operational workflows: push, deploy, labels, domains
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Use the command that matches the project lockfile. Add `--ref <doc>` for one reference at a time. For Next.js code, start with `fimo-code --ref frameworks/next`, then load the App Router, Pages Router, or locale reference only when needed.
|
|
15
|
+
|
|
16
|
+
## Never hardcode editable values
|
|
17
|
+
|
|
18
|
+
- **Content**: declare a schema, push it, use its generated client, and render with `fimo/next` or `fimo/next/client`.
|
|
19
|
+
- **Strings**: use labels and `t('key')`.
|
|
20
|
+
- **Media**: use the active framework adapter's `Image` / `Video` primitives.
|
|
21
|
+
- **Forms**: use the generated Zod schema and submit helper.
|
|
22
|
+
|
|
23
|
+
The scaffolded homepage is disposable. Replace it on the first real generation.
|
|
24
|
+
|
|
25
|
+
## Development loop
|
|
26
|
+
|
|
27
|
+
1. Start the application with the project package manager (`pnpm dev`, `npm run dev`, `yarn dev`, or `bun dev`).
|
|
28
|
+
2. Build and verify against the local server.
|
|
29
|
+
3. Offer `fimo deploy` for a hosted preview or `fimo deploy --publish` to go live. Deploy only after the developer confirms.
|
|
30
|
+
|
|
31
|
+
## Project rules
|
|
32
|
+
|
|
33
|
+
- The application owns routes, locale resolution, links, HTML language/direction, and SEO. Fimo connects to those decisions.
|
|
34
|
+
- Do not add a second deployment platform.
|
|
35
|
+
- Never edit `.fimo/project.json`; it links this directory to the remote project.
|
|
36
|
+
- Keep secrets in the Fimo dashboard, not in committed environment files.
|
|
37
|
+
- Pass flags to interactive Fimo commands when scripting them.
|
|
38
|
+
|
|
39
|
+
<!-- BEGIN:nextjs-agent-rules -->
|
|
40
|
+
|
|
41
|
+
# This is NOT the Next.js you know
|
|
42
|
+
|
|
43
|
+
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
|
|
44
|
+
|
|
45
|
+
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
|
|
46
|
+
|
|
47
|
+
<!-- END:nextjs-agent-rules -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fimo-template",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"start": "next start",
|
|
10
|
+
"lint": "oxlint --deny-warnings",
|
|
11
|
+
"typecheck": "next typegen && tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@tanstack/react-query": "^5.80.6",
|
|
15
|
+
"fimo": "latest",
|
|
16
|
+
"next": "^16.3.0",
|
|
17
|
+
"react": "^19.2.7",
|
|
18
|
+
"react-dom": "^19.2.7"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^24.12.0",
|
|
22
|
+
"@types/react": "^19.2.14",
|
|
23
|
+
"@types/react-dom": "^19.2.3",
|
|
24
|
+
"oxlint": "^1.55.0",
|
|
25
|
+
"typescript": "7.0.2"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=22.22.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
4
|
+
background: #f7f7f5;
|
|
5
|
+
color: #1a1a1a;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
* {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
main {
|
|
17
|
+
min-height: 100vh;
|
|
18
|
+
display: grid;
|
|
19
|
+
align-content: center;
|
|
20
|
+
gap: 1rem;
|
|
21
|
+
max-width: 48rem;
|
|
22
|
+
padding: 3rem;
|
|
23
|
+
margin: 0 auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
h1,
|
|
27
|
+
p {
|
|
28
|
+
margin: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
h1 {
|
|
32
|
+
font-size: clamp(2.75rem, 8vw, 5.5rem);
|
|
33
|
+
line-height: 0.95;
|
|
34
|
+
letter-spacing: -0.06em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
p {
|
|
38
|
+
max-width: 38rem;
|
|
39
|
+
font-size: 1.125rem;
|
|
40
|
+
line-height: 1.6;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.eyebrow {
|
|
44
|
+
font-size: 0.75rem;
|
|
45
|
+
font-weight: 700;
|
|
46
|
+
letter-spacing: 0.12em;
|
|
47
|
+
text-transform: uppercase;
|
|
48
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FimoProvider } from 'fimo/next/client';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import './globals.css';
|
|
5
|
+
|
|
6
|
+
export default function RootLayout({ children }: Readonly<{ children: ReactNode }>) {
|
|
7
|
+
const previewScriptUrl = process.env.NEXT_PUBLIC_FIMO_PREVIEW_SCRIPT_URL;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<html lang="en">
|
|
11
|
+
<body>
|
|
12
|
+
<FimoProvider>{children}</FimoProvider>
|
|
13
|
+
{previewScriptUrl ? <script src={previewScriptUrl} defer /> : null}
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": false,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [{ "name": "next" }],
|
|
17
|
+
"paths": {
|
|
18
|
+
"@/*": ["./src/*"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"include": ["next-env.d.ts", ".next/types/**/*.ts", ".next/dev/types/**/*.ts", "**/*.ts", "**/*.tsx"],
|
|
22
|
+
"exclude": ["node_modules"]
|
|
23
|
+
}
|