docs: add AI-friendly documentation and code comments
Add comprehensive documentation for AI assistants: - .cursorrules with project context and conventions - ARCHITECTURE.md with technical details - DEVELOPMENT.md with practical guides - JSDoc comments in all JavaScript modules - Update README.md with AI-Friendly Development section This enables AI tools (Cursor, Claude Code, GitHub Copilot) to understand the project and generate code following CoreUI Vue patterns.
This commit is contained in:
@@ -1,8 +1,36 @@
|
||||
/**
|
||||
* router/index.js - Vue Router Configuration
|
||||
*
|
||||
* This file configures the application routing using Vue Router 5.
|
||||
* It defines all routes and navigation structure for the SPA.
|
||||
*
|
||||
* Routing Features:
|
||||
* - Hash-based routing (createWebHashHistory) for static hosting compatibility
|
||||
* - Lazy loading for all route components (code splitting)
|
||||
* - Nested routes for layout-based navigation
|
||||
* - Automatic scroll to top on navigation
|
||||
*
|
||||
* Route Structure:
|
||||
* - Protected routes: Wrapped in DefaultLayout with sidebar and header
|
||||
* - Public routes: Login, Register, 404, 500 pages without layout
|
||||
*
|
||||
* Adding New Routes:
|
||||
* 1. Import component (use dynamic import for code splitting)
|
||||
* 2. Add route object to appropriate section
|
||||
* 3. Update _nav.js for sidebar navigation (if needed)
|
||||
*
|
||||
* @see https://router.vuejs.org/
|
||||
*/
|
||||
|
||||
import { h, resolveComponent } from 'vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
import DefaultLayout from '@/layouts/DefaultLayout'
|
||||
|
||||
/**
|
||||
* Application routes configuration
|
||||
* @type {Array<Object>}
|
||||
*/
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
|
||||
Reference in New Issue
Block a user