Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fair-colts-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/kit": patch
---

update helper text for npm after adding page
5 changes: 5 additions & 0 deletions .changeset/poor-dragons-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/kit": patch
---

additional supression of hydration warning
5 changes: 5 additions & 0 deletions .changeset/rotten-peaches-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/kit": patch
---

move question about adding data source for new project
5 changes: 5 additions & 0 deletions .changeset/tasty-ties-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/kit": patch
---

fix import path for reset password helper
5 changes: 5 additions & 0 deletions .changeset/tidy-buckets-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/kit": patch
---

Make an initial commit when initializing git repo
5 changes: 5 additions & 0 deletions .changeset/young-parents-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/kit": patch
---

Copy cursor rules.mdc file into the base project.
75 changes: 75 additions & 0 deletions .cursor/rules/cursor-rules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
description: Cursor Rules Location
globs: *.mdc
---
# Cursor Rules Location

Rules for placing and organizing Cursor rule files in the repository.

<rule>
name: cursor_rules_location
description: Standards for placing Cursor rule files in the correct directory
filters:
# Match any .mdc files
- type: file_extension
pattern: "\\.mdc$"
# Match files that look like Cursor rules
- type: content
pattern: "(?s)<rule>.*?</rule>"
# Match file creation events
- type: event
pattern: "file_create"

actions:
- type: reject
conditions:
- pattern: "^(?!\\.\\/\\.cursor\\/rules\\/.*\\.mdc$)"
message: "Cursor rule files (.mdc) must be placed in the .cursor/rules directory"

- type: suggest
message: |
When creating Cursor rules:

1. Always place rule files in PROJECT_ROOT/.cursor/rules/:
```
.cursor/rules/
├── your-rule-name.mdc
├── another-rule.mdc
└── ...
```

2. Follow the naming convention:
- Use kebab-case for filenames
- Always use .mdc extension
- Make names descriptive of the rule's purpose

3. Directory structure:
```
PROJECT_ROOT/
├── .cursor/
│ └── rules/
│ ├── your-rule-name.mdc
│ └── ...
└── ...
```

4. Never place rule files:
- In the project root
- In subdirectories outside .cursor/rules
- In any other location

examples:
- input: |
# Bad: Rule file in wrong location
rules/my-rule.mdc
my-rule.mdc
.rules/my-rule.mdc

# Good: Rule file in correct location
.cursor/rules/my-rule.mdc
output: "Correctly placed Cursor rule file"

metadata:
priority: high
version: 1.0
</rule>
2 changes: 1 addition & 1 deletion cli/src/cli/add/page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const runAddPageAction = async (opts?: {
const pkgManager = getUserPkgManager();

console.log(
`\n${chalk.green("Next steps:")}\nTo preview this page, restart your dev server using the ${chalk.cyan(`${pkgManager} dev`)} command\n`
`\n${chalk.green("Next steps:")}\nTo preview this page, restart your dev server using the ${chalk.cyan(`${pkgManager === "npm" ? "npm run" : pkgManager} dev`)} command\n`
);
};

Expand Down
18 changes: 9 additions & 9 deletions cli/src/cli/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ export const runInit = async (name?: string, opts?: CliFlags) => {
// e.g. dir/@mono/app returns ["@mono/app", "dir/app"]
const [scopedAppName, appDir] = parseNameAndPath(projectName);

const projectDir = await createBareProject({
projectName: appDir,
scopedAppName,
packages: usePackages,
noInstall: cliOptions.noInstall,
appRouter: cliOptions.appRouter,
});
setImportAlias(projectDir, "@/");

const dataSource =
cliOptions.dataSource ??
abortIfCancel(
Expand All @@ -227,15 +236,6 @@ export const runInit = async (name?: string, opts?: CliFlags) => {
})
);

const projectDir = await createBareProject({
projectName: appDir,
scopedAppName,
packages: usePackages,
noInstall: cliOptions.noInstall,
appRouter: cliOptions.appRouter,
});
setImportAlias(projectDir, "@/");

if (state.appType === "webviewer") {
await promptForFileMakerDataSource({
projectDir,
Expand Down
3 changes: 3 additions & 0 deletions cli/src/helpers/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ export const initializeGit = async (projectDir: string) => {
});
}
await execa("git", ["add", "."], { cwd: projectDir });
await execa("git", ["commit", "-m", "Initial commit"], {
cwd: projectDir,
});
spinner.succeed(
`${chalk.green("Successfully initialized and staged")} ${chalk.green.bold(
"git"
Expand Down
16 changes: 16 additions & 0 deletions cli/src/helpers/scaffoldProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const scaffoldProject = async ({
state.appType === "browser" ? "template/nextjs" : "template/vite-wv"
);

const extrasDir = path.join(PKG_ROOT, "template/extras");

if (!noInstall) {
logger.info(`\nUsing: ${chalk.cyan.bold(pkgManager)}\n`);
} else {
Expand Down Expand Up @@ -89,7 +91,21 @@ export const scaffoldProject = async ({

spinner.start();

// Copy the main template
fs.copySync(srcDir, projectDir);

// Copy cursor rules file
const cursorRulesSrc = path.join(extrasDir, "_cursor/rules/cursor-rules.mdc");
const cursorRulesDest = path.join(
projectDir,
".cursor/rules/cursor-rules.mdc"
);
if (fs.existsSync(cursorRulesSrc)) {
fs.ensureDirSync(path.dirname(cursorRulesDest));
fs.copySync(cursorRulesSrc, cursorRulesDest);
}

// Rename gitignore
fs.renameSync(
path.join(projectDir, "_gitignore"),
path.join(projectDir, ".gitignore")
Expand Down
4 changes: 2 additions & 2 deletions cli/src/installers/dependencyVersionMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const dependencyVersionMap = {
"@clerk/themes": "^2.1.33",

// FileMaker Data API
"@proofgeist/fmdapi": "^4.2.1",
"@proofgeist/fmdapi": "^4.2.2",

// ProofKit
"@proofgeist/kit": `^${getVersion()}`,
Expand All @@ -56,7 +56,7 @@ export const dependencyVersionMap = {
"@tanstack/eslint-plugin-query": "^5.59.1",

// ProofKit Auth
"@node-rs/argon2": "^2.0.0",
"@node-rs/argon2": "^2.0.2",
"@oslojs/binary": "^1.0.0",
"@oslojs/crypto": "^1.0.1",
"@oslojs/encoding": "^1.1.0",
Expand Down
75 changes: 75 additions & 0 deletions cli/template/extras/_cursor/rules/cursor-rules.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
description: Cursor Rules Location
globs: *.mdc
---
# Cursor Rules Location

Rules for placing and organizing Cursor rule files in the repository.

<rule>
name: cursor_rules_location
description: Standards for placing Cursor rule files in the correct directory
filters:
# Match any .mdc files
- type: file_extension
pattern: "\\.mdc$"
# Match files that look like Cursor rules
- type: content
pattern: "(?s)<rule>.*?</rule>"
# Match file creation events
- type: event
pattern: "file_create"

actions:
- type: reject
conditions:
- pattern: "^(?!\\.\\/\\.cursor\\/rules\\/.*\\.mdc$)"
message: "Cursor rule files (.mdc) must be placed in the .cursor/rules directory"

- type: suggest
message: |
When creating Cursor rules:

1. Always place rule files in PROJECT_ROOT/.cursor/rules/:
```
.cursor/rules/
├── your-rule-name.mdc
├── another-rule.mdc
└── ...
```

2. Follow the naming convention:
- Use kebab-case for filenames
- Always use .mdc extension
- Make names descriptive of the rule's purpose

3. Directory structure:
```
PROJECT_ROOT/
├── .cursor/
│ └── rules/
│ ├── your-rule-name.mdc
│ └── ...
└── ...
```

4. Never place rule files:
- In the project root
- In subdirectories outside .cursor/rules
- In any other location

examples:
- input: |
# Bad: Rule file in wrong location
rules/my-rule.mdc
my-rule.mdc
.rules/my-rule.mdc

# Good: Rule file in correct location
.cursor/rules/my-rule.mdc
output: "Correctly placed Cursor rule file"

metadata:
priority: high
version: 1.0
</rule>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import { TextInput } from "@mantine/core";
import { Stack } from "@mantine/core";
import { useState } from "react";
import { showSuccessNotification } from "@/utils/notifcation-helpers";
import { showSuccessNotification } from "@/utils/notification-helpers";

export default function UpdatePasswordForm() {
const [showForm, setShowForm] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function Page() {

// TODO: Ideally we'd sent a new verification email automatically if the previous one is expired,
// but we can't set cookies inside server components.
let verificationRequest = await getUserEmailVerificationRequestFromRequest();
const verificationRequest = await getUserEmailVerificationRequestFromRequest();
if (verificationRequest === null && user.emailVerified) {
const redirectTo = await getRedirectCookie();
return redirect(redirectTo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function ResendButton() {
<Stack>
<Group gap={4} justify="center" mt={5}>
<Text c="dimmed" size="sm">
Didn't receive the email?
{"Didn't receive the email?"}
</Text>
<Button
size="compact-sm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export async function invalidateUserSessions(userId: string): Promise<void> {
const sessions = await sessionsLayout.findAll({
query: { id_user: `==${userId}` },
});
for await (const session of sessions) {
for (const session of sessions) {
await sessionsLayout.delete({ recordId: session.recordId });
}
}
Expand Down
30 changes: 15 additions & 15 deletions cli/template/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
"typegen": "proofkit typegen"
},
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@hookform/resolvers": "^3.10.0",
"@next-safe-action/adapter-react-hook-form": "^1.0.13",
"next-safe-action": "^7.9.3",
"react-hook-form": "^7.53.0",
"@tabler/icons-react": "^3.26.0",
"@mantine/core": "^7.15.1",
"@mantine/dates": "^7.15.1",
"@mantine/hooks": "^7.15.1",
"@mantine/modals": "^7.15.1",
"@mantine/notifications": "^7.15.1",
"mantine-react-table": "^2.0.0-beta.7",
"@t3-oss/env-nextjs": "^0.11.0",
"dayjs": "^1.11.12",
"jiti": "^1.21.6",
"next": "15.0.2",
"next-safe-action": "^7.10.4",
"react-hook-form": "^7.54.2",
"@tabler/icons-react": "^3.30.0",
"@mantine/core": "^7.17.0",
"@mantine/dates": "^7.17.0",
"@mantine/hooks": "^7.17.0",
"@mantine/modals": "^7.17.0",
"@mantine/notifications": "^7.17.0",
"mantine-react-table": "2.0.0-beta.9",
"@t3-oss/env-nextjs": "^0.11.1",
"dayjs": "^1.11.13",
"jiti": "^1.21.7",
"next": "15.1.7",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
"zod": "^3.23.8"
"zod": "^3.24.2"
},
"devDependencies": {
"@types/node": "^20",
Expand Down
2 changes: 1 addition & 1 deletion cli/template/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en">
<html suppressHydrationWarning lang="en">
<head>
<Suspense>
<ColorSchemeScript defaultColorScheme="auto" />
Expand Down