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.
@@ -1,4 +1,4 @@
1
- export declare const TEMPLATE_FRAMEWORKS: readonly ['react-router', 'astro', 'next', 'vite'];
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', 'astro', 'next', 'vite'];
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "0.14.0-staging.1",
3
+ "version": "0.14.0-staging.3",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "bin": {
6
6
  "fimo": "dist/cli/index.js"
@@ -0,0 +1,15 @@
1
+ {
2
+ "runtime": { "framework": "nextjs" },
3
+ "i18n": {
4
+ "defaultLocale": "en",
5
+ "locales": ["en"]
6
+ },
7
+ "routes": {
8
+ "home": {
9
+ "label": "Home",
10
+ "path": "/"
11
+ }
12
+ },
13
+ "version": "4",
14
+ "source": "cli"
15
+ }
@@ -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,5 @@
1
+ # Fimo project
2
+
3
+ Instructions for this project live in `AGENTS.md`. Read it:
4
+
5
+ @AGENTS.md
@@ -0,0 +1,16 @@
1
+ # System files
2
+ .DS_Store
3
+
4
+ # Dependencies
5
+ node_modules/
6
+
7
+ # Build outputs
8
+ .next/
9
+ out/
10
+ next-env.d.ts
11
+ *.tsbuildinfo
12
+
13
+ # Env
14
+ .env
15
+ .env.*
16
+ !.env.example
@@ -0,0 +1,6 @@
1
+ import type { NextConfig } from 'next';
2
+ import { withFimo } from 'fimo/next/config';
3
+
4
+ const nextConfig: NextConfig = {};
5
+
6
+ export default withFimo(nextConfig);
@@ -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,4 @@
1
+ # Build approval is handled by Fimo-controlled install commands. Do not add a
2
+ # package-level allowlist because Fimo installs with dangerouslyAllowAllBuilds.
3
+
4
+ packages: []
@@ -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,9 @@
1
+ export default function HomePage() {
2
+ return (
3
+ <main>
4
+ <p className="eyebrow">Fimo + Next.js</p>
5
+ <h1>Your project is ready.</h1>
6
+ <p>Ask your coding agent to replace this disposable page with the site you want to build.</p>
7
+ </main>
8
+ );
9
+ }
@@ -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
+ }
@@ -21,7 +21,7 @@
21
21
  "cmdk": "^1.1.1",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "0.14.0-staging.1",
24
+ "fimo": "0.14.0-staging.3",
25
25
  "input-otp": "^1.4.2",
26
26
  "isbot": "^5",
27
27
  "lucide-react": "^0.577.0",