diff --git a/.gitignore b/.gitignore
index 969bbc7..a3663c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,14 +8,48 @@ dist
# Node dependencies
node_modules
+# Package manager files
+package-lock.json
+pnpm-lock.yaml
+
# Logs
*.log
+logs/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Coverage directory used by tools like istanbul
+coverage/
+*.lcov
+
+# nyc test coverage
+.nyc_output
# Misc
.DS_Store
.fleet
.idea
+# Editor directories and files
+.vscode/settings.json
+.vscode/launch.json
+.vscode/extensions.json
+*.swp
+*.swo
+*~
+
+# OS generated files
+Thumbs.db
+ehthumbs.db
+Desktop.ini
+
# Local env files
.env
.env.*
@@ -23,3 +57,39 @@ node_modules
# Uploads directory
public/uploads/
+
+# Development and testing files
+test-*.md
+fixes-*.md
+debug-*.md
+*-debug.*
+*-test.*
+
+# Temporary files
+*.tmp
+*.temp
+.tmp/
+.temp/
+
+# Database files
+*.sqlite
+*.sqlite3
+*.db
+
+# IDE and editor files
+.project
+.classpath
+.settings/
+*.sublime-*
+.brackets.json
+*.code-workspace
+
+# Backup files
+*.bak
+*.backup
+*~
+.#*
+
+# Documentation drafts (keep main docs)
+draft-*.md
+notes-*.md
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index c1c99bb..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "vue3snippets.enable-compile-vue-file-on-did-save-code": true
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index 7f452fe..9b99e90 100644
--- a/README.md
+++ b/README.md
@@ -1,45 +1,214 @@
-# Nuxt 3 Minimal Starter
+# corradAF - Corrad Application Framework
-Look at the [nuxt 3 documentation](https://v3.nuxtjs.org) to learn more.
+Welcome to **corradAF**, a comprehensive Nuxt.js template designed for rapid application development. This framework provides a solid foundation with essential development tools, authentication system, and modern UI components.
-## Setup
+## š Features
-Make sure to install the dependencies:
+- **š Complete Authentication System** - Login, Register, Password Recovery, Logout
+- **š„ User Management** - User and role management with CRUD operations
+- **š ļø Development Tools Suite** - Comprehensive set of dev tools for rapid development
+- **šØ Modern UI Components** - Built with TailwindCSS and custom components
+- **š± Responsive Design** - Mobile-first approach with modern UX patterns
+- **š§ API Management** - Built-in API endpoint design and testing tools
+- **š Content Management** - Dynamic content and template management
+- **šÆ Menu Configuration** - Easy navigation structure management
+- **š» Code Playground** - In-browser code testing and prototyping
+- **šļø ORM Integration** - Database schema management tools
+- **āļø Configuration Management** - System settings and environment setup
+
+## š ļø Development Tools Included
+
+### User Management
+- User CRUD operations
+- Role-based access control
+- Permission management
+
+### Menu Editor
+- Dynamic navigation configuration
+- Hierarchical menu structure
+- Permission-based menu visibility
+
+### API Editor
+- Design and test API endpoints
+- Interactive API documentation
+- Request/response testing
+
+### Content Editor
+- Dynamic content management
+- Template editing
+- Content versioning
+
+### Code Playground
+- Real-time code testing
+- Multiple language support
+- Instant preview
+
+### ORM Tools
+- Database schema management
+- Query builder interface
+- Migration tools
+
+### Configuration
+- Environment variable management
+- System settings
+- Feature toggles
+
+## š Prerequisites
+
+- Node.js 18+
+- Yarn (preferred) or npm
+- Database (PostgreSQL/MySQL recommended)
+
+## š Quick Start
+
+### 1. Clone the Template
```bash
-# yarn
+git clone https://git.sena.my/corrad-software/corrad-af-2024.git your-project-name
+cd your-project-name
+```
+
+### 2. Install Dependencies
+
+```bash
+# Using yarn (recommended)
yarn install
-# npm
+# Or using npm
npm install
-
-# pnpm
-pnpm install --shamefully-hoist
```
-## Development Server
-
-Start the development server on http://localhost:3000
+### 3. Environment Setup
```bash
-npm run dev
+# Copy environment template
+cp .env.example .env
+
+# Edit your environment variables
+nano .env
```
-## Production
+Configure your database connection and other environment variables in the `.env` file.
-Build the application for production:
+### 4. Database Setup
```bash
-npm run build
+# Run database migrations and generate Prisma client
+yarn prisma
+
+# Or manually
+npx prisma db pull && npx prisma generate
```
-Locally preview production build:
+### 5. Start Development Server
```bash
-npm run preview
+yarn dev
```
-Checkout the [deployment documentation](https://v3.nuxtjs.org/guide/deploy/presets) for more information.
-# corradAF
+Your application will be available at `http://localhost:3000`
-This is the base project for corradAF.
+## š Project Structure
+
+```
+āāā assets/ # Static assets (images, styles)
+āāā components/ # Vue components
+āāā composables/ # Vue composables
+āāā layouts/ # Application layouts
+āāā middleware/ # Route middleware
+āāā navigation/ # Navigation configuration
+āāā pages/ # Application pages
+ā āāā devtool/ # Development tools
+ā āāā dashboard/ # Main dashboard
+ā āāā login/ # Authentication pages
+ā āāā register/ # User registration
+ā āāā ...
+āāā plugins/ # Nuxt plugins
+āāā prisma/ # Database schema and migrations
+āāā public/ # Public static files
+āāā server/ # Server-side API
+āāā stores/ # Pinia stores
+āāā templates/ # Template files
+```
+
+## š§ Configuration
+
+### Database
+Configure your database connection in the `.env` file:
+
+```env
+DATABASE_URL="postgresql://username:password@localhost:5432/database_name"
+```
+
+### Authentication
+Set up JWT secrets and authentication settings:
+
+```env
+JWT_SECRET="your-super-secret-jwt-key"
+AUTH_ORIGIN="http://localhost:3000"
+```
+
+## šØ Customization
+
+### Theme Configuration
+Customize colors, fonts, and spacing in:
+- `tailwind.config.js` - TailwindCSS configuration
+- `app.config.js` - Application-specific settings
+
+### Adding New Development Tools
+1. Create a new page in `pages/devtool/your-tool/`
+2. Add navigation entry in the navigation configuration
+3. Implement your tool's functionality
+
+## š Documentation
+
+- [Nuxt 3 Documentation](https://nuxt.com/docs)
+- [TailwindCSS Documentation](https://tailwindcss.com/docs)
+- [Prisma Documentation](https://www.prisma.io/docs)
+- [FormKit Documentation](https://formkit.com/)
+
+## š Deployment
+
+### Build for Production
+
+```bash
+yarn build
+```
+
+### Preview Production Build
+
+```bash
+yarn preview
+```
+
+### Environment Variables for Production
+
+Ensure all environment variables are properly set in your production environment:
+
+- `DATABASE_URL`
+- `JWT_SECRET`
+- `AUTH_ORIGIN`
+- `NUXT_SECRET_KEY`
+
+## š¤ Contributing
+
+1. Fork the repository
+2. Create your feature branch (`git checkout -b feature/amazing-feature`)
+3. Commit your changes (`git commit -m 'Add some amazing feature'`)
+4. Push to the branch (`git push origin feature/amazing-feature`)
+5. Open a Pull Request
+
+## š License
+
+This project is licensed under the MIT License - see the LICENSE file for details.
+
+## š Support
+
+For support and questions:
+- Create an issue in the repository
+- Check existing documentation
+- Review the development tools included in the framework
+
+---
+
+**Built with ā¤ļø using Nuxt 3, TailwindCSS, and modern web technologies.**
diff --git a/SETUP.md b/SETUP.md
new file mode 100644
index 0000000..de85f20
--- /dev/null
+++ b/SETUP.md
@@ -0,0 +1,155 @@
+# corradAF Setup Guide
+
+This guide will help you set up the corradAF framework template for your new project.
+
+## š Quick Setup
+
+### 1. Environment Configuration
+
+Create a `.env` file in your project root with the following variables:
+
+```env
+# Database Configuration
+DATABASE_URL="postgresql://username:password@localhost:5432/database_name"
+
+# Authentication
+JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
+AUTH_ORIGIN="http://localhost:3000"
+
+# Application
+NUXT_SECRET_KEY="your-nuxt-secret-key-for-session-encryption"
+APP_NAME="Your Application Name"
+APP_URL="http://localhost:3000"
+
+# Email Configuration (Optional)
+MAIL_HOST="smtp.example.com"
+MAIL_PORT="587"
+MAIL_USERNAME="your-email@example.com"
+MAIL_PASSWORD="your-email-password"
+MAIL_FROM_ADDRESS="noreply@yourapp.com"
+MAIL_FROM_NAME="Your App Name"
+
+# Development
+NODE_ENV="development"
+NUXT_HOST="localhost"
+NUXT_PORT="3000"
+```
+
+### 2. Database Setup
+
+corradAF uses Prisma as the ORM. Follow these steps:
+
+1. **Configure your database URL** in the `.env` file
+2. **Run database setup**:
+ ```bash
+ yarn prisma
+ # This runs: npx prisma db pull && npx prisma generate && nuxt dev
+ ```
+
+### 3. First Run
+
+```bash
+# Install dependencies
+yarn install
+
+# Start development server
+yarn dev
+```
+
+## š§ Development Tools Access
+
+After setup, you can access these development tools:
+
+- **User Management**: `/devtool/user-management/user`
+- **Menu Editor**: `/devtool/menu-editor`
+- **API Editor**: `/devtool/api-editor`
+- **Content Editor**: `/devtool/content-editor`
+- **Code Playground**: `/devtool/code-playground`
+- **ORM Tools**: `/devtool/orm`
+- **Configuration**: `/devtool/config`
+
+## šØ Customization
+
+### Update Branding
+
+1. **App Name**: Update in `.env` file (`APP_NAME`)
+2. **Colors**: Modify `tailwind.config.js`
+3. **Logo**: Replace files in `public/` directory
+4. **Favicon**: Replace `public/favicon.ico`
+
+### Navigation Structure
+
+Edit the navigation configuration in `navigation/` directory to customize menus.
+
+### Authentication
+
+The authentication system is ready to use with:
+- User registration at `/register`
+- Login at `/login`
+- Password recovery at `/forgot-password`
+
+## š¦ Production Deployment
+
+### Environment Variables
+
+Ensure these production environment variables are set:
+
+```env
+NODE_ENV="production"
+DATABASE_URL="your-production-database-url"
+JWT_SECRET="your-production-jwt-secret"
+AUTH_ORIGIN="https://yourdomain.com"
+NUXT_SECRET_KEY="your-production-secret-key"
+```
+
+### Build Commands
+
+```bash
+# Build for production
+yarn build
+
+# Preview production build locally
+yarn preview
+```
+
+## š ļø Extending the Framework
+
+### Adding New Development Tools
+
+1. Create new page in `pages/devtool/your-tool/`
+2. Add navigation entry
+3. Implement functionality
+
+### Custom Components
+
+Add your custom components in `components/` directory following the existing structure.
+
+### API Endpoints
+
+Create server routes in `server/api/` directory.
+
+## š Troubleshooting
+
+### Common Issues
+
+1. **Database Connection Issues**: Verify DATABASE_URL in `.env`
+2. **Authentication Problems**: Check JWT_SECRET configuration
+3. **Build Errors**: Ensure all dependencies are installed with `yarn install`
+4. **Port Conflicts**: Change NUXT_PORT in `.env` file
+
+### Getting Help
+
+- Check the main README.md for detailed documentation
+- Review existing development tools for implementation examples
+- Create issues in the repository for bugs or feature requests
+
+## š Next Steps
+
+After setup:
+
+1. Customize the dashboard welcome page with your project branding
+2. Set up your project-specific features
+3. Configure authentication and user roles
+4. Start building your application features
+
+Happy coding with corradAF! š
\ No newline at end of file
diff --git a/assets/style/css/base/theme.css b/assets/style/css/base/theme.css
index a6c095c..1046699 100644
--- a/assets/style/css/base/theme.css
+++ b/assets/style/css/base/theme.css
@@ -225,6 +225,74 @@ html[data-theme="oren"] {
--tw-shadow: #e5eaf2;
}
+html[data-theme="purplian"] {
+ /* Core colors */
+ --color-primary: 145, 54, 136; /* #913688 - Main Purple */
+ --color-secondary: 165, 94, 156; /* #a55e9c - Lighter Purple */
+ --color-accent: 241, 235, 245; /* #f1ebf5 - Very soft purple */
+
+ /* Status colors */
+ --color-success: 67, 160, 71; /* #43a047 - Modern green */
+ --color-info: 41, 121, 255; /* #2979ff - Bright blue */
+ --color-warning: 255, 145, 0; /* #ff9100 - Vibrant orange */
+ --color-danger: 229, 57, 53; /* #e53935 - Refined red */
+
+ /* Basic UI colors */
+ --text-color: 60, 60, 67; /* #3c3c43 - Dark gray text */
+ --border-color: 232, 232, 235; /* #e8e8eb - Light gray border */
+ --bg-1: 250, 250, 253; /* #fafafd - Almost white background */
+ --bg-2: 255, 255, 255; /* #ffffff - Pure white background */
+
+ /* Sidebar colors with interactive states */
+ --sidebar: 145, 54, 136; /* #913688 - Purple sidebar */
+ --sidebar-menu: 120, 40, 110; /* #78286e - Darker Purple for menu */
+ --sidebar-text: 255, 255, 255; /* White Text */
+ --sidebar-hover-bg: 165, 94, 156; /* #a55e9c - Lighter purple for hover */
+ --sidebar-active-bg: 100, 30, 90; /* #641e5a - Darker purple for active state */
+ --sidebar-selected-bg: 185, 114, 176; /* #b972b0 - Highlight purple for selected */
+ --sidebar-indicator: 255, 255, 255; /* #ffffff - White indicator line */
+ --sidebar-active-text: 255, 236, 249; /* #ffecf9 - Brighter white for active text */
+ --sidebar-item-spacing: 2px; /* Spacing between sidebar items */
+ --sidebar-item-radius: 8px; /* Rounded corners for items */
+
+ /* Header styles */
+ --header: 250, 250, 253; /* #fafafd - Light header */
+ --header-text: 60, 60, 67; /* #3c3c43 - Dark text for header */
+ --header-active-text: 145, 54, 136; /* #913688 - Purple for active header items */
+ --header-hover-bg: 241, 235, 245; /* #f1ebf5 - Very soft purple for hover */
+ --header-border: 232, 232, 235; /* #e8e8eb - Light border under header */
+
+ /* UI Element Colors */
+ --scroll-color: 220, 220, 225; /* #dcdce1 - Light gray scrollbar */
+ --scroll-hover-color: 145, 54, 136; /* #913688 - Purple on hover */
+ --fk-border-color: 232, 232, 235; /* #e8e8eb - Light gray border */
+ --fk-placeholder-color: 150, 150, 155; /* #96969b - Medium gray placeholder */
+ --fk-focus-border: 145, 54, 136; /* #913688 - Purple border on focus */
+ --fk-hover-border: 165, 94, 156; /* #a55e9c - Lighter purple on hover */
+ --box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px,
+ rgba(0, 0, 0, 0.04) 0px 0px 1px;
+ --cp-bg: 255, 255, 255; /* White Background */
+
+ /* Interactive elements */
+ --btn-hover-bg: 241, 235, 245; /* #f1ebf5 - Very soft purple for button hover */
+ --active-tab-border: 145, 54, 136; /* #913688 - Purple border for active tab */
+ --focus-ring: 185, 114, 176, 0.4; /* #b972b0 - Focus outline with opacity */
+
+ /* UI Settings */
+ --rounded-box: 0.4rem;
+ --rounded-btn: 0.375rem;
+ --rounded-badge: 1.9rem;
+ --animation-btn: 0.2s;
+ --animation-input: 0.2s;
+ --btn-text-case: capitalize;
+ --btn-focus-scale: 0.98;
+ --padding-btn: 0.6rem 1.2rem;
+ --border-btn: 1px;
+ --tab-border: 1px;
+ --tab-radius: 0.5rem;
+ --tw-shadow: rgba(0, 0, 0, 0.05);
+}
+
html[data-theme="LZS"] {
--color-primary: 0, 90, 173; /* #005AAD - Blue */
--color-secondary: 141, 199, 61; /* #8DC73D - Green */
@@ -266,3 +334,4 @@ html[data-theme="LZS"] {
--focus-ring: 255, 242, 0, 0.5; /* Yellow focus ring */
--tw-shadow: #e5eaf2;
}
+
\ No newline at end of file
diff --git a/cli-tool/.npmignore b/cli-tool/.npmignore
new file mode 100644
index 0000000..e59b32a
--- /dev/null
+++ b/cli-tool/.npmignore
@@ -0,0 +1,11 @@
+# Development files
+*.md
+!README.md
+
+# Logs
+*.log
+
+# Testing
+test/
+tests/
+*.test.js
\ No newline at end of file
diff --git a/cli-tool/README.md b/cli-tool/README.md
new file mode 100644
index 0000000..98c56ec
--- /dev/null
+++ b/cli-tool/README.md
@@ -0,0 +1,37 @@
+# CORRAD AF CLI Tool
+
+š **The fastest way to bootstrap your next project with CORRAD Application Framework**
+
+## Quick Start
+
+```bash
+npx corradaf
+```
+
+## Features
+
+- ⨠Beautiful ASCII welcome screen
+- š Public/Internal project modes
+- āļø Automatic environment setup
+- š¤ Cursor AI rules integration
+- š¦ Automatic dependency installation
+- šļø Prisma database setup
+- šÆ IDE auto-detection
+
+## Usage
+
+1. Run the CLI tool
+2. Choose project type (Public/Internal)
+3. Enter project name
+4. Configure environment variables
+5. Enjoy your new CORRAD AF project!
+
+## Requirements
+
+- Node.js 14+
+- Git
+- Internet connection
+
+## License
+
+MIT
\ No newline at end of file
diff --git a/cli-tool/index.js b/cli-tool/index.js
new file mode 100644
index 0000000..a5a30da
--- /dev/null
+++ b/cli-tool/index.js
@@ -0,0 +1,684 @@
+#!/usr/bin/env node
+
+console.log('š Starting CORRAD AF CLI...');
+
+const { execSync, spawn } = require('child_process');
+const fs = require('fs');
+const path = require('path');
+const inquirer = require('inquirer');
+const figlet = require('figlet');
+const ora = require('ora');
+const chalk = require('chalk');
+const boxen = require('boxen');
+const gradient = require('gradient-string');
+const https = require('https');
+const http = require('http');
+
+// Function to fetch content from URL
+function fetchFromUrl(url) {
+ return new Promise((resolve, reject) => {
+ const client = url.startsWith('https') ? https : http;
+
+ const urlObj = new URL(url);
+ const options = {
+ hostname: urlObj.hostname,
+ port: urlObj.port,
+ path: urlObj.pathname + urlObj.search,
+ method: 'GET'
+ };
+
+ const req = client.request(options, (res) => {
+ let data = '';
+
+ res.on('data', (chunk) => {
+ data += chunk;
+ });
+
+ res.on('end', () => {
+ if (res.statusCode === 200) {
+ resolve(data);
+ } else {
+ reject(new Error(`HTTP ${res.statusCode}: ${res.statusMessage}`));
+ }
+ });
+ });
+
+ req.on('error', (err) => {
+ reject(err);
+ });
+
+ req.end();
+ });
+}
+
+// Helper function to run shell commands with proper quoting
+function runCommand(command, options = {}) {
+ try {
+ console.log(chalk.gray(`Running: ${command}`));
+ execSync(command, { stdio: 'inherit', ...options });
+ return true;
+ } catch (error) {
+ console.error(chalk.red(`Error: ${error.message}`));
+ return false;
+ }
+}
+
+// Helper function to properly quote project names with spaces
+function escapeProjectName(projectName) {
+ // Use double quotes for Windows and Unix compatibility
+ return `"${projectName}"`;
+}
+
+// Helper function to run async commands
+function runCommandAsync(command, args = [], options = {}) {
+ return new Promise((resolve, reject) => {
+ const child = spawn(command, args, { stdio: 'inherit', ...options });
+ child.on('close', (code) => {
+ if (code === 0) {
+ resolve(code);
+ } else {
+ reject(new Error(`Command failed with exit code ${code}`));
+ }
+ });
+ });
+}
+
+// Create progress bar animation
+function createProgressBar(message, duration = 3000) {
+ return new Promise((resolve) => {
+ const spinner = ora({
+ text: message,
+ spinner: {
+ interval: 100,
+ frames: ['ā ', 'ā ', 'ā ¹', 'ā ø', 'ā ¼', 'ā “', 'ā ¦', 'ā §', 'ā ', 'ā ']
+ }
+ }).start();
+
+ let progress = 0;
+ const interval = setInterval(() => {
+ progress += 10;
+ spinner.text = `${message} ${progress}%`;
+
+ if (progress >= 100) {
+ clearInterval(interval);
+ spinner.succeed(chalk.green('ā Setup complete!'));
+ resolve();
+ }
+ }, duration / 10);
+ });
+}
+
+// Clear screen and display ASCII art
+function displayHeader() {
+ clearScreen();
+
+ // Show ASCII "CORRAD AF" with gradient
+ const asciiText = figlet.textSync('CORRAD AF', {
+ font: 'Big',
+ horizontalLayout: 'default',
+ verticalLayout: 'default'
+ });
+
+ console.log(gradient.rainbow(asciiText));
+ console.log(boxen(
+ chalk.white.bold('š Welcome to CORRAD Application Framework CLI\n') +
+ chalk.gray('The fastest way to bootstrap your next project'),
+ {
+ padding: 1,
+ margin: 1,
+ borderStyle: 'round',
+ borderColor: 'cyan'
+ }
+ ));
+}
+
+// Clear screen and position cursor at top
+function clearScreen() {
+ console.clear();
+ process.stdout.write('\x1b[H');
+}
+
+// Check if current directory has project files
+function hasProjectFiles() {
+ const projectFiles = ['package.json', '.git', 'node_modules', 'src', 'pages', 'components'];
+ return projectFiles.some(file => fs.existsSync(file));
+}
+
+// Parse .env.example file and extract variables
+function parseEnvExample(content) {
+ const lines = content.split('\n');
+ const envVars = [];
+
+ for (const line of lines) {
+ const trimmed = line.trim();
+ if (trimmed && !trimmed.startsWith('#') && trimmed.includes('=')) {
+ const [key, ...valueParts] = trimmed.split('=');
+ const value = valueParts.join('=').replace(/['"]/g, '');
+ const description = extractComment(line);
+
+ envVars.push({
+ key: key.trim(),
+ defaultValue: value.trim(),
+ description: description
+ });
+ }
+ }
+
+ return envVars;
+}
+
+// Extract comment from env line
+function extractComment(line) {
+ const commentMatch = line.match(/#\s*(.+)$/);
+ return commentMatch ? commentMatch[1].trim() : '';
+}
+
+// Create default .env.example file if it doesn't exist
+function createDefaultEnvExample() {
+ const defaultEnvContent = `# Database Configuration
+DATABASE_URL="mysql://username:password@localhost:3306/database_name" # Your MySQL connection string
+
+# Authentication
+JWT_SECRET="your-super-secret-jwt-key-change-this-in-production" # Secret key for JWT tokens
+AUTH_ORIGIN="http://localhost:3000" # Allowed origin for authentication
+
+# Application
+NUXT_SECRET_KEY="your-nuxt-secret-key-for-session-encryption" # Nuxt secret key
+APP_NAME="Your Application Name" # Your application name
+APP_URL="http://localhost:3000" # Your application URL
+
+# Email Configuration (Optional)
+MAIL_HOST="smtp.example.com" # SMTP server host
+MAIL_PORT="587" # SMTP server port
+MAIL_USERNAME="your-email@example.com" # SMTP username
+MAIL_PASSWORD="your-email-password" # SMTP password
+MAIL_FROM_ADDRESS="noreply@yourapp.com" # From email address
+MAIL_FROM_NAME="Your App Name" # From name
+
+# Development
+NODE_ENV="development" # Environment (development, production)
+NUXT_HOST="localhost" # Nuxt host
+NUXT_PORT="3000" # Nuxt port
+`;
+
+ fs.writeFileSync('.env.example', defaultEnvContent);
+ return defaultEnvContent;
+}
+
+// Check if environment is properly configured
+function isEnvConfigured() {
+ if (!fs.existsSync('.env')) {
+ return false;
+ }
+
+ const envContent = fs.readFileSync('.env', 'utf-8');
+ // Check if DATABASE_URL is properly set (not empty or default)
+ const dbUrlMatch = envContent.match(/DATABASE_URL\s*=\s*["'](.+?)["']/);
+
+ if (!dbUrlMatch) return false;
+
+ const dbUrl = dbUrlMatch[1];
+ return dbUrl && !dbUrl.includes('username:password');
+}
+
+// Main CLI function
+async function main() {
+ try {
+ // Show the header once at the beginning
+ displayHeader();
+
+ // Check for existing project files
+ const hasFiles = hasProjectFiles();
+
+ // Step 2: Ask about project setup
+ console.log(chalk.cyan.bold('\nš¦ Project Setup'));
+ if (hasFiles) {
+ console.log(chalk.yellow('ā ļø Existing project files detected in current directory'));
+ }
+
+ const setupChoices = hasFiles ? [
+ { name: 'Pull latest updates from CORRAD AF repository', value: 'pull' },
+ { name: 'Start completely new project (will overwrite existing)', value: 'new' },
+ { name: 'Cancel setup', value: 'cancel' }
+ ] : [
+ { name: 'Start new project by cloning CORRAD AF repository', value: 'new' },
+ { name: 'Cancel setup', value: 'cancel' }
+ ];
+
+ const { setupAction } = await inquirer.prompt([
+ {
+ type: 'list',
+ name: 'setupAction',
+ message: 'What would you like to do?',
+ choices: setupChoices,
+ default: 0
+ }
+ ]);
+
+ if (setupAction === 'cancel') {
+ console.log(chalk.yellow('š Setup cancelled. Goodbye!'));
+ process.exit(0);
+ }
+
+ // Display header again for consistency
+ displayHeader();
+
+ // Get project name (only for new projects)
+ let projectName = path.basename(process.cwd());
+
+ if (setupAction === 'new') {
+ const { inputProjectName } = await inquirer.prompt([
+ {
+ type: 'input',
+ name: 'inputProjectName',
+ message: 'Enter your project name:',
+ default: 'my-corradaf-project',
+ validate: function(input) {
+ if (input.trim().length === 0) {
+ return 'Project name cannot be empty';
+ }
+ // Check for invalid characters
+ if (/[<>:"/\\|?*]/.test(input)) {
+ return 'Project name contains invalid characters';
+ }
+ return true;
+ }
+ }
+ ]);
+ projectName = inputProjectName;
+ }
+
+ // Display header again for consistency
+ displayHeader();
+
+ // Step 3: Ask about environment setup
+ console.log(chalk.cyan.bold('\nš Environment Setup'));
+ const { envSetupType } = await inquirer.prompt([
+ {
+ type: 'list',
+ name: 'envSetupType',
+ message: 'How would you like to set up your environment?',
+ choices: [
+ {
+ name: chalk.green('š§ Manual Setup') + chalk.gray(' - Configure environment later'),
+ value: 'manual'
+ },
+ {
+ name: chalk.blue('š Import from URL') + chalk.gray(' - Paste a configuration URL'),
+ value: 'url'
+ }
+ ],
+ default: 0
+ }
+ ]);
+
+ // Display header again for consistency
+ displayHeader();
+
+ // Step 4: Ask about Cursor rules
+ console.log(chalk.cyan.bold('\nāļø Development Tools'));
+ const { useCursorRules } = await inquirer.prompt([
+ {
+ type: 'list',
+ name: 'useCursorRules',
+ message: 'Do you want to apply the optimized Cursor AI rules for better code assistance?',
+ choices: [
+ { name: 'Yes, apply Cursor AI rules (recommended)', value: true },
+ { name: 'No, skip Cursor rules', value: false }
+ ],
+ default: 0
+ }
+ ]);
+
+ // Display header again for consistency
+ displayHeader();
+
+ // Step 5: Show loading screen and setup project
+ console.log(chalk.cyan.bold('\nš Setting up your project...'));
+
+ if (setupAction === 'new') {
+ // Clone the repository with proper escaping
+ const cloneSpinner = ora('Cloning CORRAD AF template...').start();
+ const escapedProjectName = escapeProjectName(projectName);
+ const success = runCommand(`git clone https://git.sena.my/corrad-software/corrad-af-2024.git ${escapedProjectName}`, { stdio: 'pipe' });
+
+ if (!success) {
+ cloneSpinner.fail('Failed to clone repository');
+ process.exit(1);
+ }
+ cloneSpinner.succeed('Repository cloned successfully');
+
+ // Change to project directory
+ process.chdir(projectName);
+ } else {
+ // Pull latest updates
+ const pullSpinner = ora('Pulling latest updates...').start();
+ const success = runCommand('git pull origin main', { stdio: 'pipe' });
+
+ if (!success) {
+ pullSpinner.fail('Failed to pull updates');
+ console.log(chalk.yellow('ā ļø You may need to resolve conflicts manually'));
+ } else {
+ pullSpinner.succeed('Updates pulled successfully');
+ }
+ }
+
+ // Remove .git folder (user will init themselves later) - only for new projects
+ if (setupAction === 'new') {
+ const gitSpinner = ora('Cleaning up repository...').start();
+ try {
+ if (fs.existsSync('.git')) {
+ if (process.platform === 'win32') {
+ runCommand('rmdir /s /q .git', { stdio: 'pipe' });
+ } else {
+ runCommand('rm -rf .git', { stdio: 'pipe' });
+ }
+ }
+ gitSpinner.succeed('Repository cleaned up');
+ } catch (error) {
+ gitSpinner.warn('Repository cleanup skipped');
+ }
+ }
+
+ // Setup environment file
+ if (envSetupType === 'url') {
+ // Display header for consistency
+ displayHeader();
+
+ const { envUrl } = await inquirer.prompt([
+ {
+ type: 'input',
+ name: 'envUrl',
+ message: 'Enter the URL for your environment configuration:',
+ validate: function(input) {
+ if (!input.trim() || !input.startsWith('http')) {
+ return 'Please enter a valid URL (starting with http:// or https://)';
+ }
+ return true;
+ }
+ }
+ ]);
+
+ const envSpinner = ora('Fetching environment configuration from URL...').start();
+
+ try {
+ // Fetch .env content from provided URL
+ const envContent = await fetchFromUrl(envUrl);
+ const processedContent = envContent.replace(/\${projectName}/g, projectName);
+
+ fs.writeFileSync('.env', processedContent);
+ envSpinner.succeed('Environment configuration imported successfully');
+
+ // Run Prisma commands if the env is properly configured
+ if (isEnvConfigured()) {
+ const prismaSpinner = ora('Setting up Prisma database...').start();
+ if (fs.existsSync('prisma/schema.prisma')) {
+ const prismaSuccess = runCommand('npx prisma generate', { stdio: 'pipe' });
+ if (prismaSuccess) {
+ prismaSpinner.succeed('Prisma database configured');
+ } else {
+ prismaSpinner.fail('Prisma setup failed - please check your DATABASE_URL');
+ }
+ } else {
+ prismaSpinner.warn('No Prisma schema found - skipping database setup');
+ }
+ }
+ } catch (error) {
+ envSpinner.fail('Failed to fetch environment configuration');
+ console.log(chalk.yellow(`ā ļø Unable to access URL: ${error.message}`));
+ console.log(chalk.gray('Creating a basic .env file you can edit later...'));
+
+ // Create basic .env file from .env.example
+ try {
+ let exampleContent;
+ if (fs.existsSync('.env.example')) {
+ exampleContent = fs.readFileSync('.env.example', 'utf8');
+ } else {
+ exampleContent = createDefaultEnvExample();
+ }
+ fs.copyFileSync('.env.example', '.env');
+ console.log(chalk.green('ā Basic environment file created'));
+ console.log(chalk.yellow('ā ļø Please edit the .env file and configure your DATABASE_URL before running Prisma commands'));
+ } catch (error) {
+ console.log(chalk.red(`Error creating .env file: ${error.message}`));
+ }
+ }
+ } else {
+ // Manual environment setup
+ const envSpinner = ora('Setting up environment files...').start();
+
+ try {
+ // Create or ensure .env.example exists
+ if (!fs.existsSync('.env.example')) {
+ createDefaultEnvExample();
+ }
+
+ // Copy .env.example to .env without filling in values
+ fs.copyFileSync('.env.example', '.env');
+ envSpinner.succeed('Environment files created');
+ console.log(chalk.green('ā Created .env file from .env.example'));
+ console.log(chalk.yellow('ā ļø Please edit the .env file and configure your DATABASE_URL before running Prisma commands'));
+ } catch (error) {
+ envSpinner.fail('Failed to set up environment');
+ console.log(chalk.red(`Error: ${error.message}`));
+ }
+ }
+
+ // Setup Cursor rules
+ if (useCursorRules) {
+ const cursorSpinner = ora('Applying Cursor AI rules...').start();
+
+ const cursorRules = `# CORRAD AF Cursor Rules
+# These rules optimize Cursor AI for working with the CORRAD Application Framework
+
+### Behaviour rules
+- You are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved.
+- If you are not sure about file content or codebase structure pertaining to the user's request, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.
+- You MUST plan extensively before each function call, and reflect extensively on the outcomes of the previous function calls. DO NOT do this entire process by making function calls only, as this can impair your ability to solve the problem and think insightfully.
+
+### Coding rules
+You are a Senior Full Stack Developer and an Expert in Vue, NuxtJS, JavaScript, TypeScript, HTML, SCSS and modern UI/UX frameworks (e.g., TailwindCSS, NuxtUI, Vuetify). You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning.
+
+- Follow the user's requirements carefully & to the letter.
+- First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
+- Confirm, then write code!
+- Always write correct, best practice, KISS, DRY, SOLID, YAGNI principles, bug free, fully functional and working code.
+- Avoid creating very large Vue components. When possible, extract functionality into separate sub-components.
+- When working on an existing project, adapt to the existing conventions. If there's not enough context in the prompt to know what the conventions in the current project are, you MUST proactively read other files to find out.
+- When asked to do something / create some kind of code, first read code of the same kind in the project so you know what's the project's syntax and practices.
+- Before creating types or interfaces, first search through the project as the required types might already exist.
+- Before creating migrations on backend, check what the correct command is in the package.json. After creation, check if the created migration contains only the added fields, otherwise remove the rest as the generator may add garbage.
+- Focus on easy and readability code, over being performant.
+- Fully implement all requested functionality.
+- Leave NO todo's, placeholders or missing pieces.
+- Ensure code is complete! Verify thoroughly finalised.
+- Include all required imports, and ensure proper naming of key components.
+- Be concise Minimize any other prose.
+- If you think there might not be a correct answer, you say so.
+- If you do not know the answer, say so, instead of guessing.
+- When you want to show different options to solve an issue, do so WITHOUT implementing every option. First ask the user which one they would prefer.
+- Every non-code part of your response should be written using Markdown, for better legibility.
+- When using frameworks / UI libraries, you may use context7 to check the documentation on what components to use for the required task and how to use them correctly.
+- IMPORTANT #1: Limit yourself to what you were asked to do. DO NOT REFACTOR / REWRITE code unless asked to. Instead, you MAY emit any recommendations you have at the end of your message (or you may do it at the start, and ask for confirmation, if you feel convenient).
+- IMPORTANT #2: The user is a software engineer. Focus on what he asked you to change. Do not fix or change things that haven't been asked you to.
+- IMPORTANT #3: Every change you implement must be carefuly though, and the implementation MUST BE ROBUST, unless specified otherwise by the user.
+
+## CORRAD AF Framework Specific Rules
+
+You are an expert in Nuxt 3, Vue 3, TypeScript, TailwindCSS, and the CORRAD AF framework.
+
+Code Style Preferences:
+- Use Composition API with
diff --git a/composables/themeList.js b/composables/themeList.js
index 3779de1..470b7df 100644
--- a/composables/themeList.js
+++ b/composables/themeList.js
@@ -1,36 +1,135 @@
export default function () {
return [
{
- theme: "biasa",
+ theme: "biru",
colors: [
{
name: "primary",
- value: "243, 88, 106",
+ value: "0, 102, 204", // Strong blue
},
{
name: "secondary",
- value: "240, 122, 37",
+ value: "51, 153, 255", // Lighter blue
},
{
name: "accent",
- value: "243, 244, 246",
+ value: "255, 204, 0", // Gold
+ },
+ {
+ name: "background",
+ value: "240, 248, 255", // Alice blue
+ },
+ {
+ name: "text",
+ value: "0, 0, 0", // Black
},
],
},
{
- theme: "gelap",
+ theme: "merah",
colors: [
{
name: "primary",
- value: "243, 88, 106",
+ value: "204, 0, 0", // Strong red
},
{
name: "secondary",
- value: "240, 122, 37",
+ value: "255, 102, 102", // Lighter red
},
{
name: "accent",
- value: "15, 23, 42",
+ value: "255, 255, 153", // Light yellow
+ },
+ {
+ name: "background",
+ value: "255, 240, 240", // Very light pink
+ },
+ {
+ name: "text",
+ value: "0, 0, 0", // Black
+ },
+ ],
+ },
+ {
+ theme: "ungu",
+ colors: [
+ {
+ name: "primary",
+ value: "75, 0, 130", // Indigo
+ },
+ {
+ name: "secondary",
+ value: "138, 43, 226", // Blue violet
+ },
+ {
+ name: "accent",
+ value: "255, 215, 0", // Gold
+ },
+ {
+ name: "background",
+ value: "240, 248, 255", // Alice blue
+ },
+ {
+ name: "text",
+ value: "0, 0, 0", // Black
+ },
+ ],
+ },
+ {
+ theme: "oren",
+ colors: [
+ {
+ name: "primary",
+ value: "255, 103, 0", // Dark orange
+ },
+ {
+ name: "secondary",
+ value: "255, 159, 64", // Lighter orange
+ },
+ {
+ name: "accent",
+ value: "0, 128, 128", // Teal
+ },
+ {
+ name: "background",
+ value: "255, 250, 240", // Floral white
+ },
+ {
+ name: "text",
+ value: "0, 0, 0", // Black
+ },
+ ],
+ },
+ {
+ theme: "purplian",
+ colors: [
+ {
+ name: "primary",
+ value: "145, 54, 136", // #913688 - Main Purple
+ },
+ {
+ name: "secondary",
+ value: "165, 94, 156", // #a55e9c - Lighter Purple
+ },
+ {
+ name: "accent",
+ value: "241, 235, 245", // #f1ebf5 - Very soft purple
+ },
+ {
+ name: "background",
+ value: "250, 250, 253", // #fafafd - Almost white
+ },
+ {
+ name: "text",
+ value: "60, 60, 67", // #3c3c43 - Dark gray text
+ },
+ {
+ name: "surface",
+ value: "255, 255, 255", // #ffffff - Pure white
+ },
+ {
+ name: "highlight",
+ value: "225, 207, 235", // #e1cfeb - Very soft purple highlight
},
],
},
@@ -49,7 +148,16 @@ export default function () {
name: "accent",
value: "255, 242, 0", // #FFF200 - Yellow
},
+ {
+ name: "background",
+ value: "245, 250, 255", // Very light blue background
+ },
+ {
+ name: "text",
+ value: "0, 0, 0", // Black
+ },
],
},
];
}
+
\ No newline at end of file
diff --git a/composables/themeList2.js b/composables/themeList2.js
index 26230d5..29fa7e6 100644
--- a/composables/themeList2.js
+++ b/composables/themeList2.js
@@ -1,102 +1,53 @@
export default function () {
return [
{
- theme: "biru",
+ theme: "biasa",
colors: [
{
name: "primary",
- value: "0, 102, 204", // Strong blue
+ value: "243, 88, 106",
},
{
name: "secondary",
- value: "51, 153, 255", // Lighter blue
+ value: "240, 122, 37",
},
{
name: "accent",
- value: "255, 204, 0", // Gold
- },
- {
- name: "background",
- value: "240, 248, 255", // Alice blue
- },
- {
- name: "text",
- value: "0, 0, 0", // Black
+ value: "243, 244, 246",
},
],
},
{
- theme: "merah",
+ theme: "gelap",
colors: [
{
name: "primary",
- value: "204, 0, 0", // Strong red
+ value: "243, 88, 106",
},
{
name: "secondary",
- value: "255, 102, 102", // Lighter red
+ value: "240, 122, 37",
},
{
name: "accent",
- value: "255, 255, 153", // Light yellow
- },
- {
- name: "background",
- value: "255, 240, 240", // Very light pink
- },
- {
- name: "text",
- value: "0, 0, 0", // Black
+ value: "15, 23, 42",
},
],
},
{
- theme: "ungu",
+ theme: "purplian",
colors: [
{
name: "primary",
- value: "75, 0, 130", // Indigo
+ value: "145, 54, 136", // #913688 - Main Purple
},
{
name: "secondary",
- value: "138, 43, 226", // Blue violet
+ value: "165, 94, 156", // #a55e9c - Lighter Purple
},
{
name: "accent",
- value: "255, 215, 0", // Gold
- },
- {
- name: "background",
- value: "240, 248, 255", // Alice blue
- },
- {
- name: "text",
- value: "0, 0, 0", // Black
- },
- ],
- },
- {
- theme: "oren",
- colors: [
- {
- name: "primary",
- value: "255, 103, 0", // Dark orange
- },
- {
- name: "secondary",
- value: "255, 159, 64", // Lighter orange
- },
- {
- name: "accent",
- value: "0, 128, 128", // Teal
- },
- {
- name: "background",
- value: "255, 250, 240", // Floral white
- },
- {
- name: "text",
- value: "0, 0, 0", // Black
+ value: "241, 235, 245", // #f1ebf5 - Very soft purple
},
],
},
@@ -115,15 +66,8 @@ export default function () {
name: "accent",
value: "255, 242, 0", // #FFF200 - Yellow
},
- {
- name: "background",
- value: "245, 250, 255", // Very light blue background
- },
- {
- name: "text",
- value: "0, 0, 0", // Black
- },
],
},
];
}
+
\ No newline at end of file
diff --git a/docs/SITE_SETTINGS.md b/docs/SITE_SETTINGS.md
deleted file mode 100644
index eed0bcc..0000000
--- a/docs/SITE_SETTINGS.md
+++ /dev/null
@@ -1,161 +0,0 @@
-# Site Settings Feature
-
-## Overview
-The Site Settings feature allows administrators to customize the appearance and branding of the application through a user-friendly interface. All settings are globally applied across the entire application including SEO, meta tags, and visual elements.
-
-## Features
-
-### 1. Basic Information
-- **Site Name**: Customize the application name displayed globally in:
- - Header and sidebar
- - Browser title and meta tags
- - SEO and Open Graph tags
- - Loading screen
- - All pages and components
-- **Site Description**: Set a description used for:
- - SEO meta descriptions
- - Open Graph descriptions
- - Twitter Card descriptions
-- **Theme Selection**: Choose from available themes:
- - Standard themes (from themeList.js)
- - Accessibility themes (from themeList2.js)
- - Custom themes added to theme.css
-
-### 2. Branding
-- **Site Logo**: Upload a custom logo displayed in:
- - Header (horizontal layout)
- - Sidebar (vertical layout)
- - Loading screen
- - Login page
- - Any component using site settings
-- **Favicon**: Upload a custom favicon displayed in:
- - Browser tabs
- - Bookmarks
- - Mobile home screen icons
-
-### 3. Advanced Settings
-- **Custom CSS**: Add custom CSS injected into document head
-- **Custom Theme File**: Upload CSS files saved to `/assets/style/css/`
-- **Add Custom Theme to theme.css**: Directly add themes to the main theme.css file
-
-## How to Access
-
-1. Navigate to **Pentadbiran** ā **Konfigurasi** ā **Site Settings**
-2. Use the tabbed interface:
- - **Basic Info**: Site name, description, and theme selection
- - **Branding**: Logo and favicon uploads
- - **Advanced**: Custom CSS and theme management
-3. Use the **Live Preview** panel to see changes in real-time
-4. Click **Save Changes** to apply your settings
-
-## Technical Implementation
-
-### Database Schema
-The settings are stored in the `site_settings` table with the following fields:
-- `siteName`, `siteDescription`
-- `siteLogo`, `siteFavicon`
-- `selectedTheme` - Selected theme name
-- `customCSS`, `customThemeFile`
-- Legacy fields maintained for backward compatibility
-
-### API Endpoints
-- `GET /api/devtool/config/site-settings` - Retrieve current settings
-- `POST /api/devtool/config/site-settings` - Update settings
-- `POST /api/devtool/config/upload-file` - Upload files (logos, themes)
-- `POST /api/devtool/config/add-custom-theme` - Add custom theme to theme.css
-
-### File Upload Locations
-- **Logo and Favicon files**: Saved to `public/uploads/site-settings/`
-- **Theme CSS files**: Saved to `assets/style/css/` directory
-- **Custom themes**: Added directly to `assets/style/css/base/theme.css`
-
-### Composable
-The `useSiteSettings()` composable provides:
-- `siteSettings` - Reactive settings object
-- `loadSiteSettings()` - Load settings from API
-- `updateSiteSettings()` - Update settings
-- `setTheme()` - Set theme using existing theme system
-- `getCurrentTheme()` - Get current theme
-- `applyThemeSettings()` - Apply theme changes to DOM
-- `updateGlobalMeta()` - Update global meta tags and SEO
-- `addCustomThemeToFile()` - Add custom theme to theme.css
-
-### Global Integration
-The site settings are globally integrated across:
-
-#### Header Component
-- Uses site settings for logo and name display
-- Theme selection dropdown uses same system as site settings
-- Synced with site settings theme selection
-
-#### Loading Component
-- Uses site logo if available, fallback to default
-- Displays site name in loading screen
-
-#### App.vue
-- Global meta tags updated from site settings
-- Title, description, and favicon managed globally
-- Theme initialization from site settings
-
-#### SEO and Meta Tags
-- Document title updated globally
-- Meta descriptions for SEO
-- Open Graph tags for social sharing
-- Twitter Card tags
-- Favicon and apple-touch-icon
-
-### Theme System Integration
-- Integrates with existing theme system (themeList.js, themeList2.js)
-- Theme selection in header dropdown synced with site settings
-- Custom themes can be added directly to theme.css
-- Backward compatibility with existing theme structure
-
-### Custom Theme Structure
-Custom themes added to theme.css should follow this structure:
-```css
-html[data-theme="your-theme-name"] {
- --color-primary: 255, 0, 0;
- --color-secondary: 0, 255, 0;
- --color-success: 0, 255, 0;
- --color-info: 0, 0, 255;
- --color-warning: 255, 255, 0;
- --color-danger: 255, 0, 0;
- /* Add your theme variables here */
-}
-```
-
-## Default Values
-If no settings are configured, the system uses these defaults:
-- Site Name: "corradAF"
-- Site Description: "corradAF Base Project"
-- Selected Theme: "biasa"
-- Logo: Default corradAF logo
-- Favicon: Default favicon
-
-## Migration Notes
-- Legacy color fields (primaryColor, secondaryColor, etc.) are maintained for backward compatibility
-- `themeMode` field is mapped to `selectedTheme` for compatibility
-- Existing installations will automatically use default values
-- Theme selection integrates with existing theme dropdown in header
-
-## Notes
-- Changes are applied immediately in the preview
-- Theme changes affect the entire application
-- Custom CSS is injected into the document head
-- Theme files are saved to `/assets/style/css/` for proper integration
-- File uploads are validated for type and size
-- Settings persist across browser sessions
-- Site name and description updates are reflected globally and immediately
-- All meta tags and SEO elements are automatically updated
-- Logo changes are reflected in all components that use site settings
-
-### Important Notes
-- Changes are applied immediately in the preview
-- Theme changes affect the entire application
-- Custom CSS is injected into the document head
-- Theme files are saved to `/assets/style/css/` for proper integration
-- File uploads are validated for type and size
-- Settings persist across browser sessions
-- Site name and description updates are reflected globally and immediately
-- All meta tags and SEO elements are automatically updated
-- Logo changes are reflected in all components that use site settings
\ No newline at end of file
diff --git a/fixes-summary.md b/fixes-summary.md
deleted file mode 100644
index 57882b9..0000000
--- a/fixes-summary.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# Fixes Implemented ā
-
-## 1. Header Title Not Showing Issue š§
-
-**Problem**: Site name not appearing in header even when toggle is enabled
-
-**Root Cause**: Header component only showed site name in horizontal layout (`v-else` condition), but most of the time the layout is vertical
-
-**Fixes Applied**:
-- ā
Added site name display to both vertical AND horizontal header layouts
-- ā
Enhanced site settings loading in Header component's `onMounted` hook
-- ā
Added immediate watchers to sync toggle changes with global site settings
-- ā
Added debug info panel to troubleshoot site settings state
-
-**Files Modified**:
-- `components/layouts/Header.vue` - Added site name to vertical layout
-- `pages/devtool/config/site-settings/index.vue` - Enhanced watchers and debugging
-
-## 2. Button Styling Standardization šØ
-
-**Problem**: Inconsistent button styling across tabs
-
-**Standardization Applied**:
-- ā
All upload buttons: `variant="outline" size="sm"`
-- ā
Save Changes button: `variant="primary" size="sm"`
-- ā
Reset button: `variant="outline" size="sm"`
-- ā
Apply Font button: `variant="outline" size="sm"` (changed from primary)
-
-**Consistent Button Pattern**:
-```vue
-
Configure your platform's branding, appearance, SEO, and functionality.
-``` - -**After**: -```vue -Configure your platform's branding, appearance, SEO, and functionality.
-``` - -**Files Modified**: -- `pages/devtool/config/site-settings/index.vue` - Enhanced info card description - -## Additional Improvements š - -### Enhanced Toggle Functionality -- ā Real-time toggle updates without requiring save -- ā Immediate sync between settings page and global state -- ā Both header and sidemenu respect the toggle setting - -### Debug Information -- ā Added debug panel in live preview showing: - - Current site name - - Toggle state (Yes/No) - - Font size in pixels -- ā Helps troubleshoot configuration issues - -### Header Logic Improvements -- ā Site name now shows in both vertical and horizontal layouts -- ā Proper font size scaling in sidemenu (65% of header size) -- ā Automatic site settings loading on component mount - -## Testing Verification ā - -**Header Display Test**: -1. ā Site name appears in vertical layout (default) -2. ā Site name appears in horizontal layout -3. ā Toggle OFF hides name in both layouts -4. ā Toggle ON shows name in both layouts -5. ā Font size applies correctly -6. ā Changes are immediate - -**Button Consistency Test**: -1. ā All upload buttons use outline variant -2. ā Save button uses primary variant -3. ā Reset button uses outline variant -4. ā All buttons have consistent size (sm) -5. ā Icons are properly positioned with mr-1 - -**Description Styling Test**: -1. ā Text has proper line height for readability -2. ā Padding appears natural for two-line content -3. ā Dark mode compatibility maintained - -## Files Changed Summary š - -1. **components/layouts/Header.vue** - - Added site name to vertical layout - - Enhanced site settings loading - - Improved responsive layout handling - -2. **pages/devtool/config/site-settings/index.vue** - - Standardized button variants and sizes - - Added debug information panel - - Enhanced toggle watching and real-time updates - - Improved description line height - - Fixed immediate change application - -## Next Steps šÆ - -1. Test the site settings page at `/devtool/config/site-settings` -2. Verify header displays site name when toggle is enabled -3. Check that all buttons follow consistent styling -4. Confirm description text has proper spacing -5. Use debug panel to troubleshoot any remaining issues \ No newline at end of file diff --git a/llms.txt b/llms.txt new file mode 100644 index 0000000..ec619a3 --- /dev/null +++ b/llms.txt @@ -0,0 +1,589 @@ +# corradAF Framework - LLM Interaction Guide + +## Metadata +- **Framework Name**: corradAF (Corrad Application Framework) +- **Framework Version**: 1.0.0 +- **License**: MIT License +- **Base Technology**: Nuxt 3, Vue 3, TypeScript/JavaScript +- **UI Framework**: TailwindCSS with custom components +- **Database ORM**: Prisma +- **Supported Languages**: English (primary), multi-language ready +- **Input Format**: Text, Markdown, JSON for API specifications +- **Output Format**: Vue SFC components, TypeScript/JavaScript, JSON configurations + +## Framework Overview + +### Introduction: +corradAF is a comprehensive Nuxt.js template designed for rapid application development. It provides a complete development tools suite, authentication system, and modern UI components. This document defines interaction patterns for LLMs working with the corradAF framework. + +### Core Architecture: +- **Frontend**: Nuxt 3 with Vue 3 Composition API +- **Styling**: TailwindCSS with custom component library +- **State Management**: Pinia stores +- **Authentication**: JWT-based with middleware protection +- **Database**: Prisma ORM with PostgreSQL (configurable) +- **Development Tools**: Built-in suite for rapid development + +## Content Structure Guidelines + +### File Organization: +``` +āāā pages/ # Route pages (Nuxt auto-routing) +āāā components/ # Reusable Vue components +āāā composables/ # Vue composables for shared logic +āāā layouts/ # Application layouts +āāā middleware/ # Route middleware (auth, permissions) +āāā server/api/ # Server-side API endpoints +āāā stores/ # Pinia state management +āāā assets/ # Static assets and styles +āāā public/ # Public static files +āāā prisma/ # Database schema and migrations +āāā devtool/ # Development tools pages +``` + +### Component Naming Conventions: +- **Pages**: Use kebab-case for file names (e.g., `user-management.vue`) +- **Components**: Use PascalCase for component names (e.g., `UserCard.vue`) +- **Composables**: Prefix with `use` (e.g., `useUserManagement.js`) +- **Stores**: Use camelCase with descriptive names (e.g., `userStore.js`) + +## Writing Guidelines for LLMs + +### Controlled Vocabulary: +- Use `navigateTo()` instead of `router.push()` for navigation (Nuxt 3 pattern) +- Use `definePageMeta()` for page configuration +- Use `ref()` and `reactive()` for Vue 3 Composition API +- Use `composables` instead of `mixins` for shared logic +- Use `middleware` for route protection and validation + +### Grammar Rules: +- **Sentence Length**: Maximum 20 words for code comments +- **Active Voice**: Prefer active voice in documentation +- **Function Names**: Use camelCase with descriptive verbs +- **Variable Names**: Use camelCase with clear, descriptive nouns + +### Code Style Guidelines: +- **Vue SFC Structure**: ` + + ++ {{ frameworkInfo.description }} +
+- Kedudukan - | -- Nama Lapangan Terbang - | -- Jumlah Pelawat - | -
---|---|---|
- {{ airport.rank }} - | -{{ airport.name }} | -- {{ airport.visitors.toLocaleString() }} - | -
+ {{ tool.description }} +
+{{ step.description }}
+
+ {{ step.command }}
+
+