-
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Add watch script to copy pages & layouts to nextjs #651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3e35f97
feat: Add watch script to copy pages & layouts to nextjs
aXenDeveloper dd06695
feat(plugin): ✨ Enhance plugin processing with route key management a…
aXenDeveloper 708303b
feat(plugin): ✨ Add support for app_admin folder to create layouts an…
aXenDeveloper 1e91cf1
feat: Add getConfig script and replace commonjs to ESM for scripts
aXenDeveloper a303346
feat: Add checking package.json for plugins
aXenDeveloper 80ffce9
feat(plugin): ✨ Refactor blog plugin structure and enhance file handling
aXenDeveloper f6f3e77
chore: Clean up
aXenDeveloper 08f8c40
chore: 🧹 Remove unused "prepare" script from package.json
aXenDeveloper d28d872
refactor(auth): ✨ Simplify searchParams handling in CallbackSSOView
aXenDeveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # VitNode Development Guidelines | ||
|
|
||
| VitNode is a comprehensive framework designed to simplify and accelerate application development with Next.js and Hono.js. Built as a monorepo solution managed by Turborepo, VitNode provides a structured environment that makes development faster and less complex. The framework includes an integrated AdminCP and plugin system to extend its core functionality. | ||
|
|
||
| ## Global Rules | ||
|
|
||
| - Write ESModule only | ||
| - Always use snake_case for file names | ||
| - Use pnpm as package manager | ||
| - Use Zod 3 for schema validation | ||
| - Use react-hook-form 7 for forms | ||
| - Use Shadcn UI & Tailwind CSS 4 for UI | ||
| - Respect Prettier configuration in `packages/eslint/prettierrc.mjs` and ESLint configuration in `packages/eslint/eslint.config.mjs` | ||
| - Use TypeScript 5, React 19 & Hono.js 4 | ||
|
|
||
| ## Frontend Development (Next.js & React) | ||
|
|
||
| - Use Next.js 15 | ||
| - Use App Router and Server Components | ||
| - Use server actions for form handling and data mutations from Server Components | ||
| - Leverage Next.js Image component with proper sizing for core web vitals optimization | ||
| - Navigation API is in `vitnode/lib/navigation` file. Avoid using `next/navigation` directly | ||
|
|
||
| ### Internationalization (i18n) | ||
|
|
||
| - Use `next-intl` for internationalization | ||
| - Use `t('key')` for translation keys | ||
| - Use `getTranslation` function for server components but `useTranslation` for client components | ||
| - Language keys should be added in `apps/web/src/plugins/core/langs/en.json` file | ||
|
|
||
| ## Backend Development (Hono.js) | ||
|
|
||
| - Use @hono/zod-openapi or Zod 3 for schema validation | ||
| - Use PostgreSQL with Drizzle ORM | ||
| - Use `t.serial().primaryKey()` for all database IDs | ||
|
|
||
| ## Documentation (\*.mdx files) | ||
|
|
||
| - Use Fumadocs framework | ||
| - Write docs in `.mdx` files | ||
| - `apps/docs/content/docs/dev/index.mdx` contains the main documentation | ||
| - Use easy, clear and funny language for documentation to make it accessible to a wide audience (exclude title and description) | ||
| - Use clear and concise examples to illustrate concepts | ||
| - Use `// [!code ++]` to highlight code snippets and `// [!code --]` to hide code snippets | ||
| - Don't add h1 tag in markdown | ||
| - Don't use emoji on headings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| { | ||
| "cSpell.words": ["vitnode"] | ||
| "cSpell.words": ["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." | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/layout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { TestLayout } from 'vitnode-blog/views/test/layout'; | ||
|
|
||
| export default function Layout({ children }: { children: React.ReactNode }) { | ||
| return <TestLayout>{children}</TestLayout>; | ||
| } |
13 changes: 13 additions & 0 deletions
13
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { Test } from 'vitnode-blog/views/test'; | ||
| import { TestClient } from 'vitnode-blog/views/test/client'; | ||
| import { Link } from 'vitnode/lib/navigation'; | ||
|
|
||
| export default function Page() { | ||
| return ( | ||
| <> | ||
| <Test /> | ||
| <TestClient /> | ||
| <Link href="/blog/test">Go to blog - test 123</Link> | ||
| </> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/test/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { Link } from 'vitnode/lib/navigation'; | ||
|
|
||
| export default function Page() { | ||
| return ( | ||
| <> | ||
| <Link href="/blog">Go to blog</Link> | ||
| </> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example uses
src/app_admin, but earlier you mentionsrc/app. This inconsistency can confuse readers—align the directory path with your plugin conventions.