Skip to content

Conversation

@aXenDeveloper
Copy link
Owner

@aXenDeveloper aXenDeveloper commented May 17, 2025

Improving Documentation

Description

What?

Why?

How?

TODO:

  • Copy files from node_modules

@vercel
Copy link

vercel bot commented May 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vitnode-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2025 3:45pm
vitnode-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 25, 2025 3:45pm

@aXenDeveloper aXenDeveloper review requested due to automatic review settings May 25, 2025 15:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR scaffolds Next.js page and layout components for various core, admin, auth, and plugin routes, updates the package scripts to include a prepare step, and refreshes accompanying documentation and editor settings.

  • Adds new page.tsx files for core admin views, auth flows, dynamic rest route (now returning notFound), and blog plugin pages/layouts
  • Updates package.json to include a prepare script
  • Refines plugin documentation in MDX and adds VSCode/Copilot configuration

Reviewed Changes

Copilot reviewed 80 out of 80 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
apps/web/src/app/[locale]/admin/(auth)/(vitnode)/core/users/page.tsx Add UsersAdminView page
apps/web/src/app/[locale]/admin/(auth)/(vitnode)/core/test/page.tsx Add TestView page
apps/web/src/app/[locale]/admin/(auth)/(vitnode)/core/page.tsx Add DashboardAdminView page
apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx Add blog categories admin page
apps/web/src/app/[locale]/(main)/[...rest]/page.tsx Replace dynamic view with notFound()
apps/web/src/app/[locale]/(main)/(vitnode)/register/page.tsx Add SignUpView page and metadata generator
apps/web/src/app/[locale]/(main)/(vitnode)/login/sso/[providerId]/page.tsx Add CallbackSSOView page for SSO
apps/web/src/app/[locale]/(main)/(vitnode)/login/page.tsx Add SignInView page and metadata generator
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/test/page.tsx Add blog plugin test page
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/page.tsx Add blog plugin main page with Test/TestClient views
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/layout.tsx Add blog plugin layout component
apps/web/package.json Add "prepare": "vitnode prepare" script
apps/docs/content/docs/plugins/layouts-and-pages.mdx Revise plugin routing, pages, and layout docs
.vscode/settings.json Add Copilot commit message guidelines
.github/copilot-instructions.md Add VitNode development guidelines
.cursor/rules/global.mdc Remove global cursor rule
.cursor/rules/frontend/i18n.mdc Remove i18n cursor rule
.cursor/rules/frontend/frontend.mdc Remove frontend cursor rule
.cursor/rules/docs.mdc Remove docs cursor rule
.cursor/rules/backend/backend.mdc Remove backend cursor rule

Comment on lines +55 to +66
For admin pages, follow the same pattern but create your files in the `src/app_admin` directory of your plugin. This is the only difference - the structure and implementation remain the same.

```tsx title="plugins/blog/src/components/blog-post.client.tsx"
'use client';
For example, to create an admin page at `/admin/{plugin_name}/settings`:

import { useState } from 'react';
```
src/app_admin/settings/page.tsx
```

export function ClientBlogPost({ initialData }) {
const [likes, setLikes] = useState(initialData.likes);
And for a layout:

return (
<div>
<h1>{initialData.title}</h1>
<p>{initialData.content}</p>
<button onClick={() => setLikes(likes + 1)}>Like ({likes})</button>
</div>
);
}
```
src/app_admin/settings/layout.tsx
Copy link

Copilot AI May 25, 2025

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 mention src/app. This inconsistency can confuse readers—align the directory path with your plugin conventions.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces changes to streamline the integration of pages and layouts into the Next.js application, along with updates to documentation and development guidelines.

  • Removed the legacy dynamic admin catch-all page.
  • Added multiple new pages for various authentication flows, plugin views, and layout implementations.
  • Updated documentation and configuration files to reflect the current development guidelines.

Reviewed Changes

Copilot reviewed 80 out of 80 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/web/src/app/[locale]/admin/(auth)/[...rest]/page.tsx Removed the legacy dynamic admin catch-all page.
apps/web/src/app/[locale]/admin/(auth)/(vitnode)/core/users/page.tsx Added a page for UsersAdminView.
apps/web/src/app/[locale]/admin/(auth)/(vitnode)/core/test/page.tsx Added a test view page.
apps/web/src/app/[locale]/admin/(auth)/(vitnode)/core/page.tsx Added a page for DashboardAdminView.
apps/web/src/app/[locale]/admin/(auth)/(plugins)/(vitnode-blog)/blog/categories/page.tsx Introduced a categories page for the blog plugin.
apps/web/src/app/[locale]/(main)/[...rest]/page.tsx Modified routing to use notFound() for unmatched routes.
apps/web/src/app/[locale]/(main)/(vitnode)/register/page.tsx Added registration page with metadata generation.
apps/web/src/app/[locale]/(main)/(vitnode)/login/sso/[providerId]/page.tsx Added an SSO callback page handling async route parameters.
apps/web/src/app/[locale]/(main)/(vitnode)/login/page.tsx Added sign-in page with metadata generation.
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/test/page.tsx Added a test page for the blog plugin.
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/page.tsx Added a blog page combining test views and navigation links.
apps/web/src/app/[locale]/(main)/(plugins)/(vitnode-blog)/blog/layout.tsx Added a layout file wrapping the blog pages.
apps/docs/content/docs/plugins/layouts-and-pages.mdx Updated documentation to clarify routing, layouts, and admin page structures.
.vscode/settings.json Updated settings to include commit message generation guidelines.
.github/copilot-instructions.md Added detailed development guidelines.
.cursor/rules/* Removed outdated rule files in favor of updated guidelines.

@aXenDeveloper aXenDeveloper merged commit 9f41933 into canary May 25, 2025
7 checks passed
@aXenDeveloper aXenDeveloper deleted the copy-pages-to-next-js branch May 25, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants