Skip to content

Commit 16c90f4

Browse files
Merge pull request #667 from aXenDeveloper/integrate_vitnode_with_docs
docs: Integrate vitnode with docs
2 parents e1f3a98 + 11b0d29 commit 16c90f4

File tree

92 files changed

+613
-2395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+613
-2395
lines changed

.github/docs/tests_plan.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 1. Introduction
44

5-
This document outlines the testing strategy for the VitNode framework. The goal is to ensure the reliability, functionality, and performance of the core framework (`packages/vitnode`), the web application (`apps/web`), and associated plugins. We will utilize Vitest for unit and integration testing and Playwright for end-to-end testing.
5+
This document outlines the testing strategy for the VitNode framework. The goal is to ensure the reliability, functionality, and performance of the core framework (`packages/vitnode`), the web application (`apps/docs`), and associated plugins. We will utilize Vitest for unit and integration testing and Playwright for end-to-end testing.
66

77
## 2. Goals
88

@@ -24,13 +24,13 @@ This document outlines the testing strategy for the VitNode framework. The goal
2424
### 4.1. Unit Tests (Vitest)
2525

2626
**Scope:** Test individual functions, components, and utilities in isolation.
27-
**Location:** Primarily within `packages/vitnode` and utility directories in `apps/web`.
27+
**Location:** Primarily within `packages/vitnode` and utility directories in `apps/docs`.
2828

2929
**Areas to Cover:**
3030

3131
- **Core Utilities:** Functions in `packages/vitnode/src/lib`, helpers, etc.
3232
- **API Helpers:** Route building, validation logic using `@hono/zod-openapi`.
33-
- **UI Components:** Basic rendering tests, prop validation for components in `packages/vitnode/src/components` and `apps/web/src/components`.
33+
- **UI Components:** Basic rendering tests, prop validation for components in `packages/vitnode/src/components` and `apps/docs/src/components`.
3434
- **Configuration Loading:** Ensure `vitnode.config.ts` is loaded and parsed correctly.
3535
- **Internationalization (i18n):** Test translation loading and formatting utilities.
3636

@@ -42,15 +42,15 @@ This document outlines the testing strategy for the VitNode framework. The goal
4242
**Areas to Cover:**
4343

4444
- **API Endpoints:** Test request handling, validation, middleware execution, and response generation for Hono.js routes defined in `packages/vitnode/src/api`. Example: [`testRoute`](packages/vitnode/src/api/modules/users/routes/test.route.ts).
45-
- **Server Actions:** Test form submissions, data mutations, and interactions with the database within `apps/web`.
45+
- **Server Actions:** Test form submissions, data mutations, and interactions with the database within `apps/docs`.
4646
- **Database Interactions:** Verify Drizzle ORM queries, schema interactions, and data integrity (using a test database).
4747
- **Authentication Logic:** Test credential verification, session creation/validation (including durations), email verification, password reset, and SSO provider interactions (Google, GitHub, Facebook).
4848
- **Plugin Integration:** Test how core systems interact with plugin-provided extensions (routes, hooks, etc.).
4949

5050
### 4.3. End-to-End Tests (Playwright)
5151

5252
**Scope:** Simulate real user scenarios by interacting with the application through a browser.
53-
**Location:** A dedicated `e2e` or `tests` directory at the root or within `apps/web`.
53+
**Location:** A dedicated `e2e` or `tests` directory at the root or within `apps/docs`.
5454

5555
**Areas to Cover:**
5656

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cSpell.words": ["sonner", "vitnode"],
2+
"cSpell.words": ["fumadocs", "sonner", "vitnode"],
33
"github.copilot.chat.commitMessageGeneration.instructions": [
44
{
55
"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."

apps/docs/content/docs/ui/dropdown-menu.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ title: Dropdown Menu
33
description: A dropdown menu component for building interactive menus in your application.
44
---
55

6+
## Preview
7+
8+
<Preview name="dropdown-menu" />
9+
610
## Usage
711

812
```ts

apps/docs/eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import eslintVitNode from '@vitnode/eslint-config/eslint';
2+
3+
export default [
4+
...eslintVitNode,
5+
{
6+
ignores: ['.source'],
7+
},
8+
];

apps/docs/global.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/// <reference types="next-intl" />
2+
3+
import type core from './src/locales/@vitnode/core/en.json';
4+
import type blog from './src/locales/@vitnode/blog/en.json';
5+
6+
declare module 'next-intl' {
7+
interface AppConfig {
8+
Messages: typeof core & typeof blog;
9+
}
10+
}

0 commit comments

Comments
 (0)