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:
+31
-3
@@ -1,24 +1,52 @@
|
||||
/**
|
||||
* main.js - Application Entry Point
|
||||
*
|
||||
* This file initializes the Vue 3 application and configures:
|
||||
* - Pinia for state management
|
||||
* - Vue Router for client-side routing
|
||||
* - CoreUI Vue component library
|
||||
* - Global icon system
|
||||
* - Documentation helper components
|
||||
*
|
||||
* The application uses:
|
||||
* - Vue 3 Composition API
|
||||
* - Vite for building and development
|
||||
* - CoreUI Vue components
|
||||
* - Hash-based routing for static hosting compatibility
|
||||
*/
|
||||
|
||||
import { createApp } from 'vue'
|
||||
import { createPinia } from 'pinia'
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
// CoreUI Vue components and icons
|
||||
import CoreuiVue from '@coreui/vue'
|
||||
import CIcon from '@coreui/icons-vue'
|
||||
import { iconsSet as icons } from '@/assets/icons'
|
||||
|
||||
// Documentation components (remove in production if not needed)
|
||||
import DocsComponents from '@/components/DocsComponents'
|
||||
import DocsExample from '@/components/DocsExample'
|
||||
import DocsIcons from '@/components/DocsIcons'
|
||||
|
||||
// Create Vue application instance
|
||||
const app = createApp(App)
|
||||
app.use(createPinia())
|
||||
app.use(router)
|
||||
app.use(CoreuiVue)
|
||||
|
||||
// Install plugins
|
||||
app.use(createPinia()) // State management
|
||||
app.use(router) // Router for SPA navigation
|
||||
app.use(CoreuiVue) // CoreUI component library
|
||||
|
||||
// Provide icons globally
|
||||
app.provide('icons', icons)
|
||||
|
||||
// Register global components
|
||||
app.component('CIcon', CIcon)
|
||||
app.component('DocsComponents', DocsComponents)
|
||||
app.component('DocsExample', DocsExample)
|
||||
app.component('DocsIcons', DocsIcons)
|
||||
|
||||
// Mount application to DOM
|
||||
app.mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user