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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- i18n: Use `next-intl`, `t('key')` for translations, `getTranslation` (server), `useTranslation` (client)
- Accessibility: WCAG 2.1 AA, semantic HTML, ARIA, keyboard/screen reader support
- **Backend:**
- Hono.js 4, OpenAPI via `@hono/zod-openapi`, Zod 3 for validation
- Hono.js 4, OpenAPI via `@hono/zod-openapi`, Zod 4 for validation
- Database: PostgreSQL via Drizzle ORM, access via `c.get('database')`
- API: RESTful, versioned, rate-limited, secure session management
- Error handling: Use Hono's error middleware, log via `c.get('log')`
Expand Down
2 changes: 1 addition & 1 deletion .github/docs/prd.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ VitNode is designed for individual developers and small teams who need a structu
- React 19 with Server Components
- TypeScript 5 with strict configuration
- Tailwind CSS 4 with Shadcn UI components
- Zod 3 for runtime validation
- Zod 4 for runtime validation
- React Hook Form 7 for form management
- Next-intl for internationalization

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10.12.4
version: 10.13.1

- name: Install Node.js
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10.12.4
version: 10.13.1

- name: Install Node.js
uses: actions/setup-node@v4
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
- **Enhanced Plugin System**: Improved CLI tools for plugins
- **Better Documentation**: Completely rewritten docs and website
- **Streamlined Configuration**: Single config file for all settings
- **Zod 4**: Upgraded to the latest version for schema validation

## 🔍 Project Scope

Expand Down
12 changes: 12 additions & 0 deletions apps/api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import eslintVitNode from '@vitnode/eslint-config/eslint';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';

const __dirname = dirname(fileURLToPath(import.meta.url));

export default [
...eslintVitNode,
{
ignores: ['drizzle.config.ts'],
},
{
languageOptions: {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
},
},
];
20 changes: 10 additions & 10 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
"drizzle-kit": "drizzle-kit"
},
"dependencies": {
"@hono/zod-openapi": "^0.19.9",
"@hono/zod-validator": "^0.7.0",
"@react-email/components": "^0.2.0",
"@hono/zod-openapi": "^1.0.2",
"@hono/zod-validator": "^0.7.2",
"@react-email/components": "^0.3.2",
"@vitnode/core": "workspace:*",
"drizzle-kit": "^0.31.4",
"drizzle-orm": "^0.44.2",
"hono": "^4.8.4",
"drizzle-orm": "^0.44.3",
"hono": "^4.8.5",
"next-intl": "^4.3.4",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"zod": "^3.25.76"
"zod": "^4.0.5"
},
"devDependencies": {
"@hono/node-server": "^1.15.0",
"@types/node": "^24.0.12",
"@hono/node-server": "^1.17.1",
"@types/node": "^24.1.0",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"@vitnode/eslint-config": "workspace:*",
"dotenv": "^17.2.0",
"eslint": "^9.30.1",
"react-email": "^4.1.1",
"eslint": "^9.31.0",
"react-email": "^4.2.3",
"tsc-alias": "^1.8.16",
"tsx": "^4.20.3",
"typescript": "^5.8.3"
Expand Down
29 changes: 16 additions & 13 deletions apps/docs/content/docs/ui/auto-form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import { z } from 'zod';
```ts
const formSchema = z.object({
username: z.string().min(3, 'Username must be at least 3 characters'),
email: z.string().email('Please enter a valid email address'),
email: z
.email('Please enter a valid email address')
.describe("We'll use this email to contact you. (from zod schema)"),
user_type: z.enum(['admin', 'editor', 'viewer']),
accept_terms: z.boolean().refine(val => val, {
message: 'You must accept the terms and conditions',
Expand All @@ -37,55 +39,50 @@ const formSchema = z.object({
id: 'username',
component: props => (
<AutoFormInput
{...props}
description="This is the username for your application. It should be unique and not shared with anyone."
label="Username"
{...props}
/>
),
},
{
id: 'email',
component: props => (
<AutoFormInput
description="We'll use this email to contact you."
label="Email Address"
type="email"
{...props}
/>
<AutoFormInput {...props} label="Email Address" type="email" />
),
},
{
id: 'user_type',
component: props => (
<AutoFormSelect
{...props}
description="Select the type of user."
label="User Type"
labels={[
{ value: 'admin', label: 'Admin' },
{ value: 'editor', label: 'Editor' },
{ value: 'viewer', label: 'Viewer' },
]}
{...props}
/>
),
},
{
id: 'accept_terms',
component: props => (
<AutoFormCheckbox
label="I accept the terms and conditions"
{...props}
label="I accept the terms and conditions"
/>
),
},
{
id: 'description',
component: props => (
<AutoFormTextarea
{...props}
description="Write a short description of your application."
label="Description"
placeholder="My application is..."
{...props}
/>
),
},
Expand Down Expand Up @@ -127,7 +124,7 @@ Auto Form supports all Zod validators:
```ts
const formSchema = z.object({
username: z.string().min(3).max(20),
email: z.string().email(),
email: z.email(),
age: z.number().min(18).max(120),
password: z
.string()
Expand All @@ -138,6 +135,12 @@ const formSchema = z.object({
});
```

## Custom Fields

<Callout type="warn" title="This documentation is under construction! 🚧">
We're working hard to bring you the best documentation experience.
</Callout>

## Form Submission

To activate submit button and handle form submission with the `onSubmit` callback:
Expand All @@ -149,9 +152,9 @@ To activate submit button and handle form submission with the `onSubmit` callbac
id: 'username',
component: props => (
<AutoFormInput
{...props}
description="This is the username for your application."
label="Username"
{...props}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ui/checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const formSchema = z.object({
id: 'acceptTerms',
component: props => (
<AutoFormCheckbox
label="I accept the terms and conditions"
{...props}
label="I accept the terms and conditions"
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ui/combobox-async.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const formSchema = z.object({
id: 'categoryId',
component: props => (
<AutoFormComboboxAsync
{...props}
fetchData={async ({ search }) => {
const res = await fetcherClient(categoriesModule, {
path: '/',
Expand All @@ -52,7 +53,6 @@ const formSchema = z.object({
}}
id="categoryId"
label="Category"
{...props}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ui/combobox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const formSchema = z.object({
id: 'type',
component: props => (
<AutoFormCombobox
{...props}
description="Select an option from the list"
label="Type"
labels={[
Expand All @@ -46,7 +47,6 @@ const formSchema = z.object({
label: 'Option Two',
},
]}
{...props}
/>
),
},
Expand Down
7 changes: 3 additions & 4 deletions apps/docs/content/docs/ui/input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { AutoFormInput } from '@vitnode/core/components/form/fields/input';
```ts
const formSchema = z.object({
username: z.string().min(3, 'Username must be at least 3 characters'),
email: z.string().email('Please enter a valid email address'),
email: z.email('Please enter a valid email address'),
});
```

Expand All @@ -34,20 +34,19 @@ const formSchema = z.object({
id: 'username',
component: props => (
<AutoFormInput
{...props}
description="This is the username for your application. It should be unique and not shared with anyone."
label="Username"
{...props}
/>
),
},
{
id: 'email',
component: props => (
<AutoFormInput
type="email"
{...props}
description="We'll use this email to contact you."
label="Email Address"
{...props}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ui/radio-group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const formSchema = z.object({
id: 'options',
component: props => (
<AutoFormRadioGroup
{...props}
description="By checking this box, you agree to the terms and conditions."
label="I agree to the terms and conditions"
labels={[
Expand All @@ -49,7 +50,6 @@ const formSchema = z.object({
label: 'Option 3',
},
]}
{...props}
/>
),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ui/switch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const formSchema = z.object({
{
id: 'acceptTerms',
component: props => (
<AutoFormSwitch label="I accept the terms and conditions" {...props} />
<AutoFormSwitch {...props} label="I accept the terms and conditions" />
),
},
]}
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/ui/textarea.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const formSchema = z.object({
id: 'desc',
component: props => (
<AutoFormTextarea
{...props}
description="Write a short description of your application."
placeholder="My application is..."
label="Description"
{...props}
/>
),
},
Expand Down
12 changes: 12 additions & 0 deletions apps/docs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import eslintVitNode from '@vitnode/eslint-config/eslint';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';

const __dirname = dirname(fileURLToPath(import.meta.url));

export default [
...eslintVitNode,
{
ignores: ['.source'],
},
{
languageOptions: {
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
},
},
];
Loading