@artilingo/artiframe-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/assets/logo.png +0 -0
  2. package/assets/logo.svg +22 -0
  3. package/assets/logo.webp +0 -0
  4. package/assets/logo@0.5x.png +0 -0
  5. package/assets/logo@0.75x.png +0 -0
  6. package/assets/logo@1.5x.png +0 -0
  7. package/assets/logo@2x.png +0 -0
  8. package/assets/logo@3x.png +0 -0
  9. package/assets/logo@4x.png +0 -0
  10. package/bin/artiframe.js +57 -0
  11. package/bin/artiframe.php +45 -0
  12. package/core-stubs/app/ApiControl.php +81 -0
  13. package/core-stubs/app/Database.php +69 -0
  14. package/core-stubs/app/DotEnv.php +63 -0
  15. package/core-stubs/app/R2Manager.php +130 -0
  16. package/core-stubs/app/ViewControl.php +24 -0
  17. package/core-stubs/bin/SystemMethod.php +271 -0
  18. package/core-stubs/bin/ViewMethod.php +354 -0
  19. package/core-stubs/docs/de.html +951 -0
  20. package/core-stubs/docs/en.html +952 -0
  21. package/core-stubs/docs/es.html +947 -0
  22. package/core-stubs/docs/fr.html +850 -0
  23. package/core-stubs/docs/tr.html +951 -0
  24. package/core-stubs/public/assets/css/components/footer.css +0 -0
  25. package/core-stubs/public/assets/css/components/header.css +0 -0
  26. package/core-stubs/public/assets/css/components/mobilenav.css +0 -0
  27. package/core-stubs/public/assets/css/components/sidebar.css +0 -0
  28. package/core-stubs/public/assets/css/components/theme-modal.css +0 -0
  29. package/core-stubs/public/assets/css/root/app.css +61 -0
  30. package/core-stubs/public/assets/js/components/header.js +0 -0
  31. package/core-stubs/public/assets/js/components/mobilenav.js +0 -0
  32. package/core-stubs/public/assets/js/components/sidebar.js +0 -0
  33. package/core-stubs/public/assets/js/components/theme-modal.js +0 -0
  34. package/core-stubs/public/assets/js/root/app.js +30 -0
  35. package/core-stubs/public/includes/footer.php +5 -0
  36. package/core-stubs/public/includes/head.php +26 -0
  37. package/core-stubs/public/includes/header.php +5 -0
  38. package/core-stubs/public/includes/mobilenav.php +5 -0
  39. package/core-stubs/public/includes/sidebar.php +5 -0
  40. package/core-stubs/public/includes/theme-modal.php +5 -0
  41. package/core-stubs/readme/de.md +29 -0
  42. package/core-stubs/readme/en.md +29 -0
  43. package/core-stubs/readme/es.md +29 -0
  44. package/core-stubs/readme/fr.md +29 -0
  45. package/core-stubs/readme/tr.md +29 -0
  46. package/package.json +49 -0
  47. package/scripts/postinstall.js +21 -0
  48. package/src/App.php +266 -0
  49. package/src/Commands/MakeApiCommand.php +71 -0
  50. package/src/Commands/MakeClassCommand.php +88 -0
  51. package/src/Commands/MakeViewCommand.php +95 -0
  52. package/src/Commands/NewProjectCommand.php +633 -0
  53. package/src/Commands/VersionCommand.php +92 -0
  54. package/src/Lang/de.php +53 -0
  55. package/src/Lang/en.php +53 -0
  56. package/src/Lang/es.php +53 -0
  57. package/src/Lang/fr.php +53 -0
  58. package/src/Lang/tr.php +53 -0
  59. package/src/Services/Safeguard.php +48 -0
  60. package/src/Services/Translator.php +52 -0
@@ -0,0 +1,61 @@
1
+ /* ==========================================================================
2
+ ArtiFrame Global Variables & Base Styles
3
+ (Driven by data-attributes: data-theme and data-mode)
4
+ ========================================================================== */
5
+
6
+ /* Light Mode (Varsayılan) */
7
+ html[data-theme="default"][data-mode="light"] {
8
+ --accent: #3b82f6;
9
+ --accent-hover: #2563eb;
10
+ --accent-bg: rgba(59, 130, 246, 0.08);
11
+ --menu-bg: #ffffff;
12
+ --canvas-bg: #f8fafc;
13
+ --card-bg: #ffffff;
14
+ --border: #e2e8f0;
15
+ --text-main: #0f172a;
16
+ --text-muted: #64748b;
17
+ --danger: #ef4444;
18
+ --success: #10b981;
19
+ --warning: #f59e0b;
20
+ }
21
+
22
+ /* Dark Mode */
23
+ html[data-theme="default"][data-mode="dark"] {
24
+ --accent: #60a5fa;
25
+ --accent-hover: #93c5fd;
26
+ --accent-bg: rgba(96, 165, 250, 0.15);
27
+ --menu-bg: #141619;
28
+ --canvas-bg: #0b0c0e;
29
+ --card-bg: #1a1d21;
30
+ --border: #262b32;
31
+ --text-main: #f8fafc;
32
+ --text-muted: #94a3b8;
33
+ --danger: #f87171;
34
+ --success: #34d399;
35
+ --warning: #fbbf24;
36
+ }
37
+
38
+ /* Base Reset & Genel Stiller */
39
+ *, *::before, *::after {
40
+ box-sizing: border-box;
41
+ margin: 0;
42
+ padding: 0;
43
+ }
44
+
45
+ body {
46
+ background-color: var(--canvas-bg);
47
+ color: var(--text-main);
48
+ font-family: 'Inter', system-ui, -apple-system, sans-serif;
49
+ line-height: 1.5;
50
+ transition: background-color 0.3s ease, color 0.3s ease;
51
+ }
52
+
53
+ a {
54
+ color: var(--accent);
55
+ text-decoration: none;
56
+ transition: color 0.2s ease;
57
+ }
58
+
59
+ a:hover {
60
+ color: var(--accent-hover);
61
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * ArtiFrame Global JS
3
+ * Kural: Event'ler (Click, Submit vb.) asla id veya class üzerinden bağlanmaz!
4
+ * Tüm etkileşimli elemanlar `data-js` özniteliği üzerinden yönetilir.
5
+ */
6
+
7
+ document.addEventListener('DOMContentLoaded', () => {
8
+ // 1. Tema Değiştirme (Theme Toggle) Mantığı
9
+ // Sayfanın herhangi bir yerinde <button data-js="theme-toggle"> tıklandığında çalışır.
10
+ document.addEventListener('click', (e) => {
11
+ const toggleBtn = e.target.closest('[data-js="theme-toggle"]');
12
+ if (!toggleBtn) return;
13
+
14
+ e.preventDefault();
15
+ const html = document.documentElement; // <html> etiketi
16
+ const currentMode = html.getAttribute('data-mode');
17
+ const newMode = currentMode === 'light' ? 'dark' : 'light';
18
+
19
+ html.setAttribute('data-mode', newMode);
20
+
21
+ // Kullanıcının tercihini tarayıcıya kaydet
22
+ localStorage.setItem('artiframe_theme_mode', newMode);
23
+ });
24
+
25
+ // Sayfa Yüklendiğinde: Kullanıcının daha önce seçtiği bir tema varsa uygula
26
+ const savedMode = localStorage.getItem('artiframe_theme_mode');
27
+ if (savedMode) {
28
+ document.documentElement.setAttribute('data-mode', savedMode);
29
+ }
30
+ });
@@ -0,0 +1,5 @@
1
+ <!-- Footer Component Starts Here -->
2
+ <footer class="app-footer">
3
+
4
+ </footer>
5
+ <!-- Footer Component Ends Here -->
@@ -0,0 +1,26 @@
1
+ <meta charset="UTF-8">
2
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
3
+ <meta name="robots" content="index, follow">
4
+
5
+ <!-- CSRF Token (AJAX/Fetch işlemleri için global erişim sağlar) -->
6
+ <meta name="csrf-token" content="<?= \Bin\SystemMethod::generateCsrf() ?>">
7
+
8
+ <!-- Favicon -->
9
+ <link rel="icon" type="image/x-icon" href="/assets/images/favicon.ico">
10
+ <link rel="manifest" href="/site.webmanifest">
11
+
12
+ <!-- Global Assets -->
13
+ <link rel="stylesheet" href="/assets/css/root/app.css?v=<?= APP_VERSION ?>">
14
+ <script src="/assets/js/root/app.js?v=<?= APP_VERSION ?>" defer></script>
15
+
16
+ <!-- Component Assets (Bileşen CSS/JS Dosyaları) -->
17
+ <link rel="stylesheet" href="/assets/css/components/header.css?v=<?= APP_VERSION ?>">
18
+ <link rel="stylesheet" href="/assets/css/components/footer.css?v=<?= APP_VERSION ?>">
19
+ <link rel="stylesheet" href="/assets/css/components/sidebar.css?v=<?= APP_VERSION ?>">
20
+ <link rel="stylesheet" href="/assets/css/components/mobilenav.css?v=<?= APP_VERSION ?>">
21
+ <link rel="stylesheet" href="/assets/css/components/theme-modal.css?v=<?= APP_VERSION ?>">
22
+
23
+ <script src="/assets/js/components/header.js?v=<?= APP_VERSION ?>" defer></script>
24
+ <script src="/assets/js/components/sidebar.js?v=<?= APP_VERSION ?>" defer></script>
25
+ <script src="/assets/js/components/mobilenav.js?v=<?= APP_VERSION ?>" defer></script>
26
+ <script src="/assets/js/components/theme-modal.js?v=<?= APP_VERSION ?>" defer></script>
@@ -0,0 +1,5 @@
1
+ <!-- Header Component Starts Here -->
2
+ <header class="app-header">
3
+
4
+ </header>
5
+ <!-- Header Component Ends Here -->
@@ -0,0 +1,5 @@
1
+ <!-- Mobile Navigation Component Starts Here -->
2
+ <nav class="app-mobilenav">
3
+
4
+ </nav>
5
+ <!-- Mobile Navigation Component Ends Here -->
@@ -0,0 +1,5 @@
1
+ <!-- Sidebar Component Starts Here -->
2
+ <aside class="app-sidebar">
3
+
4
+ </aside>
5
+ <!-- Sidebar Component Ends Here -->
@@ -0,0 +1,5 @@
1
+ <!-- Theme Modal Component Starts Here -->
2
+ <div class="app-theme-modal" id="themeModal">
3
+
4
+ </div>
5
+ <!-- Theme Modal Component Ends Here -->
@@ -0,0 +1,29 @@
1
+ # ArtiFrame
2
+
3
+ **Null Overhead, null externe Abhängigkeiten. Skalierbares Web-Entwicklungs-Framework mit Native PHP.**
4
+
5
+ ## Willkommen!
6
+ Wir freuen uns sehr, Sie im ArtiFrame-Ökosystem begrüßen zu dürfen. Es ist an der Zeit, das Paket-Chaos und endlose Fragen wie „Welche Bibliothek soll ich verwenden?“, „Wo kommt diese Datei hin?“ oder „Ist meine App sicher genug?“ hinter sich zu lassen. ArtiFrame bietet Ihnen ein makelloses Fundament, das ausschließlich auf der reinen Kraft von Native PHP basiert und dem strikten Null-Abhängigkeits-Prinzip (Zero-Dependency) folgt. Dank unserer strengen Architekturregeln sind Sicherheit (XSS/CSRF), strukturelle Ordnung und hohe Leistung standardmäßig integriert. Ihnen bleibt nur noch, die Programmierung Ihres Traumprojekts zu genießen. Für detaillierte technische Informationen und Architekturregeln öffnen Sie bitte die Datei **`handbuch.html`** in Ihrem Browser.
7
+
8
+ ---
9
+
10
+ ### 🚀 Schnellstart
11
+
12
+ ```bash
13
+ # ArtiFrame CLI global installieren
14
+ npm install -g @artilingo/artiframe-cli
15
+
16
+ # Interaktive Shell starten
17
+ artiframe
18
+
19
+ # Ein neues Projekt erstellen
20
+ artiframe> new mein-projekt
21
+ ```
22
+
23
+ ### 📖 Dokumentation
24
+
25
+ Um tiefer in die gesamte Architektur von ArtiFrame, die Dateistruktur, XSS/CSRF-Firewalls, API-Entwicklungsstandards und Hilfsfunktionen (Helper) einzutauchen, öffnen Sie einfach die Datei **`handbuch.html`**, die sich im Stammverzeichnis des Projekts befindet, in einem beliebigen Webbrowser. Die gesamte Dokumentation ist offline, direkt in Ihrem Projekt, immer griffbereit.
26
+
27
+ ---
28
+ **Lizenz:**
29
+ AGPLv3 — Open Source. Abgeleitete Werke müssen offen bleiben und der Urheberrechtshinweis muss erhalten bleiben.
@@ -0,0 +1,29 @@
1
+ # ArtiFrame
2
+
3
+ **Zero overhead, zero external dependencies. Scalable web development framework with Native PHP.**
4
+
5
+ ## Welcome!
6
+ We are thrilled to have you in the ArtiFrame ecosystem. It's time to leave behind the package clutter and the endless questions of "which library should I use?", "where does this file go?", or "is my app secure enough?". ArtiFrame provides you with a flawless foundation using the pure power of Native PHP, built on a strict zero-dependency principle. Thanks to our strict architectural rules, security (XSS/CSRF), structural order, and high performance come built-in by default; all that is left for you is to enjoy coding your dream project. For detailed technical information and architectural rules on how the framework operates, please open the **`guide.html`** file in your browser.
7
+
8
+ ---
9
+
10
+ ### 🚀 Quick Start
11
+
12
+ ```bash
13
+ # Install ArtiFrame CLI globally
14
+ npm install -g @artilingo/artiframe-cli
15
+
16
+ # Start the interactive shell
17
+ artiframe
18
+
19
+ # Create a new project
20
+ artiframe> new my-project
21
+ ```
22
+
23
+ ### 📖 Documentation
24
+
25
+ To dive deep into ArtiFrame's entire architecture, file structure, XSS/CSRF firewalls, API development standards, and Helper functions, simply open the **`guide.html`** file located in the project root in any web browser. All documentation is available offline, right inside your project, always at your fingertips.
26
+
27
+ ---
28
+ **License:**
29
+ AGPLv3 — Open source. Derivative works must remain open and copyright notice must be preserved.
@@ -0,0 +1,29 @@
1
+ # ArtiFrame
2
+
3
+ **Cero sobrecarga, cero dependencias externas. Framework de desarrollo web escalable con PHP nativo.**
4
+
5
+ ## ¡Bienvenido!
6
+ Estamos encantados de tenerte en el ecosistema ArtiFrame. Es hora de dejar atrás el desorden de paquetes y las interminables preguntas sobre "¿qué biblioteca debo usar?", "¿dónde va este archivo?" o "¿es segura mi aplicación?". ArtiFrame te ofrece una base impecable utilizando el poder puro de PHP nativo, bajo un estricto principio de cero dependencias. Gracias a nuestras estrictas reglas arquitectónicas, la seguridad (XSS/CSRF), el orden estructural y el alto rendimiento vienen incorporados por defecto; lo único que te queda por hacer es disfrutar codificando el proyecto de tus sueños. Para obtener información técnica detallada y reglas de arquitectura sobre cómo funciona el framework, abre el archivo **`guia.html`** en tu navegador.
7
+
8
+ ---
9
+
10
+ ### 🚀 Inicio Rápido
11
+
12
+ ```bash
13
+ # Instalar ArtiFrame CLI globalmente
14
+ npm install -g @artilingo/artiframe-cli
15
+
16
+ # Iniciar el shell interactivo
17
+ artiframe
18
+
19
+ # Crear un nuevo proyecto
20
+ artiframe> new mi-proyecto
21
+ ```
22
+
23
+ ### 📖 Documentación
24
+
25
+ Para sumergirte profundamente en toda la arquitectura de ArtiFrame, la estructura de archivos, los firewalls XSS/CSRF, los estándares de desarrollo de API y las funciones auxiliares (Helper), simplemente abre el archivo **`guia.html`** ubicado en la raíz del proyecto en cualquier navegador web. Toda la documentación está disponible sin conexión, directamente dentro de tu proyecto, siempre al alcance de tu mano.
26
+
27
+ ---
28
+ **Licencia:**
29
+ AGPLv3 — Código abierto. Las obras derivadas deben permanecer abiertas y se debe preservar el aviso de derechos de autor.
@@ -0,0 +1,29 @@
1
+ # ArtiFrame
2
+
3
+ **Zéro surcharge, zéro dépendance externe. Framework de développement web évolutif avec PHP natif.**
4
+
5
+ ## Bienvenue !
6
+ Nous sommes ravis de vous compter parmi nous dans l'écosystème ArtiFrame. Il est temps de laisser derrière vous le chaos des paquets et les questions interminables telles que "quelle bibliothèque dois-je utiliser ?", "où va ce fichier ?" ou "mon application est-elle assez sécurisée ?". ArtiFrame vous offre une fondation impeccable en utilisant la puissance pure de PHP natif, selon un principe strict de zéro dépendance. Grâce à nos règles d'architecture strictes, la sécurité (XSS/CSRF), l'ordre structurel et les hautes performances sont intégrés par défaut ; il ne vous reste plus qu'à profiter du codage du projet de vos rêves. Pour des informations techniques détaillées et les règles d'architecture sur le fonctionnement du framework, veuillez ouvrir le fichier **`guide_fr.html`** dans votre navigateur.
7
+
8
+ ---
9
+
10
+ ### 🚀 Démarrage Rapide
11
+
12
+ ```bash
13
+ # Installer ArtiFrame CLI globalement
14
+ npm install -g @artilingo/artiframe-cli
15
+
16
+ # Démarrer le shell interactivo
17
+ artiframe
18
+
19
+ # Créer un nouveau projet
20
+ artiframe> new mon-projet
21
+ ```
22
+
23
+ ### 📖 Documentation
24
+
25
+ Pour plonger au cœur de l'architecture complète d'ArtiFrame, sa structure de fichiers, ses pare-feux XSS/CSRF, ses normes de développement d'API et ses fonctions utilitaires (Helper), ouvrez simplement le fichier **`guide_fr.html`** situé à la racine du projet dans n'importe quel navigateur web. Toute la documentation est disponible hors ligne, directement dans votre projet, toujours à portée de main.
26
+
27
+ ---
28
+ **Licence :**
29
+ AGPLv3 — Open source. Les œuvres dérivées doivent rester ouvertes et l'avis de droit d'auteur doit être préservé.
@@ -0,0 +1,29 @@
1
+ # ArtiFrame
2
+
3
+ **Sıfır overhead, sıfır dış bağımlılık. Native PHP ile ölçeklenebilir web geliştirme çerçevesi.**
4
+
5
+ ## Hoş Geldiniz!
6
+ ArtiFrame ekosistemine adım attığınız için çok mutluyuz. Geliştirici dünyasında sıkça karşılaştığımız "hangi kütüphaneyi kullansam?", "bu dosyayı nereye koysam?" veya "uygulamam yeterince güvenli mi?" gibi soruları ve karmaşık paket yığınlarını arkanızda bırakma vakti geldi. ArtiFrame, sıfır dış bağımlılık (zero-dependency) ilkesiyle, tamamen Native PHP'nin gücünü kullanarak size kusursuz bir temel sunar. Katı kurallara sahip mimarimiz sayesinde güvenlik (XSS/CSRF), yapısal düzen ve yüksek performans varsayılan olarak gelir; size sadece hayalinizdeki projeyi kodlamanın keyfini çıkarmak kalır. Çerçevenin nasıl çalıştığına dair detaylı teknik bilgi ve mimari kurallar için lütfen projenizdeki **`kilavuz.html`** dosyasını tarayıcınızda açın.
7
+
8
+ ---
9
+
10
+ ### 🚀 Hızlı Başlangıç
11
+
12
+ ```bash
13
+ # ArtiFrame CLI'yi global olarak kurun
14
+ npm install -g @artilingo/artiframe-cli
15
+
16
+ # İnteraktif kabuğu başlatın
17
+ artiframe
18
+
19
+ # Yeni bir proje oluşturun
20
+ artiframe> new benim-projem
21
+ ```
22
+
23
+ ### 📖 Dokümantasyon
24
+
25
+ ArtiFrame'in tüm mimarisini, dosya yapısını, XSS/CSRF güvenlik duvarlarını, API geliştirme standartlarını ve Helper (yardımcı) fonksiyonlarını derinlemesine öğrenmek için projenin kök dizinindeki **`kilavuz.html`** dosyasını herhangi bir web tarayıcısında açmanız yeterlidir. Bütün dokümantasyon çevrimdışı (offline) olarak projenizin içinde, her zaman elinizin altındadır.
26
+
27
+ ---
28
+ **Lisans:**
29
+ AGPLv3 — Açık kaynak. Türev çalışmalar açık kalmalı ve telif bildirimi korunmalıdır.
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@artilingo/artiframe-cli",
3
+ "version": "1.0.0",
4
+ "description": "ArtiFrame — Zero-dependency native PHP framework with a powerful multilingual CLI. Scaffold projects, generate views, APIs and classes instantly.",
5
+ "main": "bin/artiframe.js",
6
+ "bin": {
7
+ "artiframe": "bin/artiframe.js"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node scripts/postinstall.js"
11
+ },
12
+ "files": [
13
+ "bin/artiframe.js",
14
+ "bin/artiframe.php",
15
+ "src/",
16
+ "core-stubs/",
17
+ "assets/",
18
+ "scripts/",
19
+ "LICENSE"
20
+ ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/artilingo/artiframe.git"
24
+ },
25
+ "homepage": "https://artiframe.org",
26
+ "bugs": {
27
+ "url": "https://github.com/artilingo/artiframe/issues"
28
+ },
29
+ "keywords": [
30
+ "php",
31
+ "framework",
32
+ "cli",
33
+ "artilingo",
34
+ "scaffold",
35
+ "native-php",
36
+ "zero-dependency",
37
+ "multilingual",
38
+ "mvc",
39
+ "api"
40
+ ],
41
+ "author": {
42
+ "name": "Artilingo",
43
+ "url": "https://artilingo.com"
44
+ },
45
+ "license": "AGPL-3.0",
46
+ "engines": {
47
+ "node": ">=14.0.0"
48
+ }
49
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * ArtiFrame CLI — postinstall script
3
+ *
4
+ * Sets the execute permission on bin/artiframe.php on Unix-like systems.
5
+ * Silently skipped on Windows (not needed).
6
+ */
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ if (process.platform === 'win32') {
12
+ process.exit(0);
13
+ }
14
+
15
+ const target = path.join(__dirname, '..', 'bin', 'artiframe.php');
16
+
17
+ try {
18
+ fs.chmodSync(target, 0o755);
19
+ } catch (e) {
20
+ // Non-fatal — if permissions fail (e.g. read-only fs), skip silently.
21
+ }