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
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The repository is a monorepo for the VitNode framework, which includes a backend

- **Monorepo Structure:**
- `apps/` contains main apps (`api` for backend, `docs` for docs site)
- `packages/` holds shared code, core framework, Biome configs, and CLI tools
- `packages/` holds shared code, core framework, ESLint and Prettier configs, and CLI tools
- `plugins/` for extendable features
- **Frontend:**
- Next.js 15, App Router, Server Components
Expand All @@ -35,7 +35,7 @@ The repository is a monorepo for the VitNode framework, which includes a backend
- `pnpm dev` (dev server), `pnpm build`, `pnpm lint`, `pnpm db:migrate`, `pnpm docker:dev`
- **CLI:**
- Create apps/plugins via `pnpm create vitnode-app@canary` (see `packages/create-vitnode-app`)
- CLI prompts for package manager, app mode, Biome, Docker, install (see `questions.ts`)
- CLI prompts for package manager, app mode, ESLint, Prettier, Docker, install (see `questions.ts`)
- **Linting/Formatting:**
- Use configs from `packages/config/`
- File names: snake_case, ESModule only
Expand Down
2 changes: 0 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@
### What?

### Why?

### How?
11 changes: 11 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import vitnodePrettier from "@vitnode/config/prettierrc";

/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import("prettier").Config}
*/
const config = {
...vitnodePrettier,
};

export default config;
26 changes: 1 addition & 25 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
{
"cSpell.words": ["fumadocs", "sonner", "vitnode"],
"cSpell.words": ["fumadocs", "sonner", "tiptap", "vitnode"],
"github.copilot.chat.commitMessageGeneration.instructions": [
{
"text": "Follow the Conventional Commits format strictly for commit messages. Use the structure below:\n\n```\n<type>[optional scope]: <gitmoji> <description>\n```\n\nGuidelines:\n\n1. **Type and Scope**: Choose an appropriate type (e.g., `feat`, `fix`, `refactor`, `docs`) and optional scope to describe the affected module or feature.\n\n2. **Gitmoji**: Include a relevant `gitmoji` that best represents the nature of the change.\n\n3. **Description**: Write a concise, informative description in the header; use backticks if referencing code or specific terms.\n\nCommit messages should be clear, informative, and professional, aiding readability and project tracking."
}
],
"search.exclude": {
"**/(plugins)/*": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[html]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
20 changes: 20 additions & 0 deletions apps/api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import eslintVitNode from "@vitnode/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,
},
},
},
];
31 changes: 17 additions & 14 deletions apps/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api",
"version": "1.2.0-canary.53",
"version": "1.2.0-canary.55",
"private": true,
"type": "module",
"scripts": {
Expand All @@ -9,32 +9,35 @@
"dev:email": "email dev --dir src/emails",
"build": "tsc && tsc-alias -p tsconfig.json",
"start": "node dist/index.js",
"drizzle-kit": "drizzle-kit"
"drizzle-kit": "drizzle-kit",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@hono/zod-openapi": "^1.1.0",
"@hono/zod-validator": "^0.7.2",
"@vitnode/core": "workspace:*",
"drizzle-kit": "^0.31.4",
"drizzle-orm": "^0.44.4",
"hono": "^4.9.2",
"next-intl": "^4.3.4",
"drizzle-orm": "^0.44.5",
"hono": "^4.9.6",
"next-intl": "^4.3.6",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"use-intl": "^4.3.4",
"zod": "^4.0.17"
"use-intl": "^4.3.6",
"zod": "^4.1.5"
},
"devDependencies": {
"@hono/node-server": "^1.19.0",
"@react-email/components": "^0.5.1",
"@types/node": "^24.3.0",
"@types/react": "^19.1.10",
"@types/react-dom": "^19.1.7",
"@hono/node-server": "^1.19.1",
"@react-email/components": "^0.5.2",
"@types/node": "^24.3.1",
"@types/react": "^19.1.12",
"@types/react-dom": "^19.1.9",
"@vitnode/config": "workspace:*",
"dotenv": "^17.2.1",
"dotenv": "^17.2.2",
"eslint": "^9.36.0",
"react-email": "^4.2.8",
"tsc-alias": "^1.8.16",
"tsx": "^4.20.4",
"tsx": "^4.20.5",
"typescript": "^5.9.2"
}
}
2 changes: 1 addition & 1 deletion apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serve(
info => {
const initMessage = "\x1b[34m[VitNode]\x1b[0m";

// biome-ignore lint/suspicious/noConsole: <start>
// eslint-disable-next-line no-console
console.log(
`${initMessage} API server is running on http://localhost:${info.port}`,
);
Expand Down
21 changes: 21 additions & 0 deletions apps/api/src/locales/@vitnode/core/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
{
"core": {
"global": {
"editor": {
"undo": "Undo",
"redo": "Redo",
"paragraph": "Paragraph",
"heading": "Heading {level}",
"bold": "Bold",
"italic": "Italic",
"underline": "Underline",
"ordered_list": "Ordered List",
"bullet_list": "Bullet List",
"text_format_more": {
"label": "More text formats",
"strike": "Strike"
},
"alignments": {
"left": "Left align",
"center": "Center align",
"right": "Right align",
"justify": "Justify align"
}
},
"theme_switcher": "Toggle Theme",
"language_switcher": "Switch Language",
"toggle_sidebar": "Toggle Sidebar",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/vitnode.api.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config({
});

export const POSTGRES_URL =
process.env.POSTGRES_URL || "postgresql://root:root@localhost:5432/vitnode";
process.env.POSTGRES_URL ?? "postgresql://root:root@localhost:5432/vitnode";

export const vitNodeApiConfig = buildApiConfig({
plugins: [],
Expand Down
14 changes: 8 additions & 6 deletions apps/docs/content/docs/dev/contribution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,21 @@ vitnode/
│ └── docs/ # Documentation site
├── packages/
│ ├── vitnode/ # Core framework code
│ ├── config/ # Shared Biome,TypeScript configs
│ ├── config/ # Shared ESLInt, TypeScript configs
│ └── create-vitnode-app/ # CLI tool for creating new projects
└── plugins/ # Official open-source plugins
```

<Callout type="info" title="Monorepo Magic!">
VitNode uses Turborepo to keep everything organized. Apps, packages, and plugins all live together
in harmony!
VitNode uses Turborepo to keep everything organized. Apps, packages, and
plugins all live together in harmony!
</Callout>

## Coding Standards

- We use TypeScript for type safety ([TypeScript Docs](https://www.typescriptlang.org/))
- Follow ESM (ECMAScript Modules) conventions ([ESM Guide](https://nodejs.org/api/esm.html))
- Respect the Biome configuration in each workspace ([Biome](https://biomejs.dev/))
- Respect the ESLint & Prettier configuration in each workspace ([ESLint](https://eslint.org/) & [Prettier](https://prettier.io/))
- Use React Server Components where appropriate
- Write meaningful commit messages ([Conventional Commits](https://www.conventionalcommits.org/))

Expand Down Expand Up @@ -137,7 +137,7 @@ pnpm db:migrate # Run migrations
- TypeScript for type safety
- ESM module conventions
- React Server Components where appropriate
- Respect Biome rules in each workspace
- Respect ESLint, Prettier rules in each workspace

<Callout type="warn">
Don't forget to test your changes locally! 🧪
Expand Down Expand Up @@ -190,4 +190,6 @@ pnpm db:migrate # Run migrations

Thank you for contributing to VitNode! 🚀

<Callout title="You rock!">Every contribution makes VitNode better. We appreciate you! 💜</Callout>
<Callout title="You rock!">
Every contribution makes VitNode better. We appreciate you! 💜
</Callout>
65 changes: 57 additions & 8 deletions apps/docs/content/docs/ui/dropdown-menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,72 @@ description: A dropdown menu component for building interactive menus in your ap
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuPortal,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@vitnode/core/components/ui/dropdown-menu';
DropdownMenuShortcut,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger
} from "@vitnode/core/components/ui/dropdown-menu";
```

```tsx
<DropdownMenu>
<DropdownMenuTrigger>Open</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuTrigger asChild>
<Button variant="outline">Open</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56" align="start">
<DropdownMenuLabel>My Account</DropdownMenuLabel>
<DropdownMenuGroup>
<DropdownMenuItem>
Profile
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
Billing
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
Settings
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
Keyboard shortcuts
<DropdownMenuShortcut>⌘K</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuItem>Profile</DropdownMenuItem>
<DropdownMenuItem>Billing</DropdownMenuItem>
<DropdownMenuItem>Team</DropdownMenuItem>
<DropdownMenuItem>Subscription</DropdownMenuItem>
<DropdownMenuGroup>
<DropdownMenuItem>Team</DropdownMenuItem>
<DropdownMenuSub>
<DropdownMenuSubTrigger>Invite users</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem>Email</DropdownMenuItem>
<DropdownMenuItem>Message</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>More...</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
</DropdownMenuSub>
<DropdownMenuItem>
New Team
<DropdownMenuShortcut>⌘+T</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuItem>GitHub</DropdownMenuItem>
<DropdownMenuItem>Support</DropdownMenuItem>
<DropdownMenuItem disabled>API</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
Log out
<DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
```
Expand Down
Loading