You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,32 @@
1
1
# VitNode Development Guidelines
2
2
3
-
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.
3
+
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, plugin system, authentication, role management, and comprehensive developer tools.
4
4
5
5
## Global Rules
6
6
7
7
- Write ESModule only
8
8
- Always use snake_case for file names
9
9
- Use pnpm as package manager
10
-
- Use Zod 3 for schema validation
10
+
- Use Zod 3 for schema validation and runtime validation
11
11
- Use react-hook-form 7 for forms
12
12
- Use Shadcn UI & Tailwind CSS 4 for UI
13
13
- Respect Prettier configuration in `packages/eslint/prettierrc.mjs` and ESLint configuration in `packages/eslint/eslint.config.mjs`
14
-
- Use TypeScript 5, React 19 & Hono.js 4
14
+
- Use TypeScript 5 with strict configuration, React 19 & Hono.js 4
15
+
- Follow WCAG 2.1 AA compliance for accessibility
16
+
- Aim for Lighthouse scores of 95+ and Core Web Vitals optimization
17
+
- Implement proper error handling and validation at all levels
15
18
16
19
## Frontend Development (Next.js & React)
17
20
18
-
- Use Next.js 15
19
-
- Use App Router and Server Components
21
+
- Use Next.js 15 with App Router and Server Components
20
22
- Use server actions for form handling and data mutations from Server Components
21
23
- Leverage Next.js Image component with proper sizing for core web vitals optimization
22
24
- Navigation API is in `vitnode/lib/navigation` file. Avoid using `next/navigation` directly
23
25
- Alert Dialog & Dialog content should always have title and description with React lazy loading content
26
+
- Implement dark/light mode support with system preference detection
27
+
- Ensure keyboard navigation support and screen reader compatibility
28
+
- Use proper semantic HTML and ARIA attributes
29
+
- Use XSS protection with content security policy
24
30
25
31
### Internationalization (i18n)
26
32
@@ -30,10 +36,16 @@ VitNode is a comprehensive framework designed to simplify and accelerate applica
30
36
31
37
## Backend Development (Hono.js)
32
38
33
-
- Use @hono/zod-openapi or Zod 3 for schema validation
34
-
- Use PostgreSQL with Drizzle ORM
39
+
- Use @hono/zod-openapi or Zod 3 for schema validation and OpenAPI documentation
40
+
- Use PostgreSQL with Drizzle ORM for database operations
35
41
- Use `t.serial().primaryKey()` for all database IDs
36
42
- To get access to database, use `c.get('database')` by Hono.js context
43
+
- Implement rate limiting on API endpoints, especially authentication
44
+
- Use secure session management with configurable duration
45
+
- Implement proper error handling and logging
46
+
- Follow RESTful API design principles
47
+
- Support API versioning with backward compatibility
48
+
- Include comprehensive OpenAPI 3.0 specifications
0 commit comments