Commit Graph

159 Commits

Author SHA1 Message Date
stephan
f4ccc45a3b Strip api.neuronetz.ai from documentation; chat config stays in env
The Ollama URL was leaking via:
  - prose in /en/, /de/, /ja/, /es/, /fr/ docs (oracle, deployment,
    local-testing, ai/module/{overview,embed,training})
  - code blocks teaching users to curl the host directly
  - .env.example, Dockerfile, docker-compose.yml defaults
  - providers.mjs, translate-docs.mjs, build-oracle-index.mjs defaults
  - LandingScripts.astro comment
  - lora-runbook.md prose + SSH host
  - the GET handler at /api/oracle which echoed `ollamaUrl` back to public callers
  - the "Oracle is silent" fallback message at /api/oracle POST

Replacements:
  - prose: "neuronetz.ai" → "your Ollama instance"
  - example URLs in code blocks: https://api.neuronetz.aihttps://your-ollama-host.example
  - code-level defaults: → http://localhost:11434 (Ollama's standard local port)
  - GET /api/oracle: dropped the `ollamaUrl` field; provider + model still exposed
  - runbook SSH host: neuronetz@cloud.neuronetz.ai → <gpu-user>@<gpu-host>

Production chat is unaffected: docs/.env (gitignored) on the production
host still pins OLLAMA_BASE_URL=https://api.neuronetz.ai. The only
change in the running container is that the GET handler no longer
echoes the URL.

analytics.neuronetz.ai (Umami tracking) is intentionally left intact —
it's a public, brand-owned subdomain meant to be visible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:14:17 +02:00
stephan
9b7fd15ca1 Drop nested location blocks from nginx vhost overrides — they 404 assets
The first version of vhost.d/<host>_location nested four `location { … }`
blocks (for /_astro/, images, /sw.js, /llms.txt) inside the proxy's
generated `location / { … }` to set Cache-Control. nginx accepts the
syntax, but a nested location with no `proxy_pass` directive falls through
to filesystem root and 404s the asset — which is why CSS / JS / images
were missing on the live site even though the HTML loaded fine.

Astro already emits sensible Cache-Control on hashed _astro bundles, so
we don't need the proxy to set them. Removed all four nested blocks; the
vhost.d files now only carry proxy headers, gzip, and security headers,
all of which are valid inside a location {} block without proxy_pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 16:23:11 +02:00
stephan
a44df81b71 Split docs into apex + www containers, add nginx vhost overrides
The acme-companion on the production host doesn't accept comma-separated
VIRTUAL_HOST / LETSENCRYPT_HOST values, so cert issuance was failing for
the combined `nibiru-framework.com,www.nibiru-framework.com` entry.

docker-compose.yml — now defines two services sharing the same image:
  - docs      → VIRTUAL_HOST=nibiru-framework.com (apex)
  - docs-www  → VIRTUAL_HOST=www.nibiru-framework.com (built once, reused)
A YAML anchor (x-docs-shared-env) keeps the Oracle/LLM/Anthropic config in
lockstep so the two containers can never drift.

docs/nginx/vhost.d/ — per-host nginx-proxy overrides applied at the
location-block level by jwilder/nginx-proxy. Both files set:
  - X-Forwarded-* trust + buffering off (Oracle SSE streaming)
  - HSTS / X-Content-Type / X-Frame / Referrer-Policy / Permissions-Policy
  - gzip with the right MIME set for Astro/Starlight assets
  - Aggressive cache on /_astro/ (immutable hashed bundles)
  - 30-day cache on images/fonts
  - no-store on /sw.js (so PWA updates land)
  - 24-hour cache on /llms.txt for AI crawlers
docs/nginx/README.md explains how to mount these into an existing
nginx-proxy (bind-mount + reload, or bake into the proxy image).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:45:02 +02:00
stephan
5be20ebd08 Add docs/.npmrc so the Docker build COPY succeeds
The Dockerfile's `COPY package.json package-lock.json .npmrc ./` requires
the file to exist; the build was failing on a fresh clone with
`failed to compute cache key … "/.npmrc": not found`.

Contents are intentionally minimal: silence npm's audit/funding chatter
during CI/Docker builds and enable legacy-peer-deps so Astro 6 + Starlight
0.38 + @vite-pwa/astro can install together without npm's strict peer
resolver rejecting the lockfile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:35:54 +02:00
stephan
48c839d927 Initial public push: docs cosmos v4 + AI module + framework groundwork
This is the snapshot the production landing site (nibiru-framework.com) is
deployed from. Brings together the recent splash + docs migration to the v4
"Cosmos" design system, the new in-framework AI module, and the framework
groundwork that backs the framework-reference extraction.

What lands:
- docs/: Astro + Starlight site with the v4 dark cosmic palette, GalaxyHero
  canvas constellation, Mission Control chat (wired to /api/oracle →
  api.neuronetz.ai via providers.mjs Ollama), 5-panel MMVC stage
  (Model · AI · Module · Controller · View), translated EN/DE/JA/ES/FR
  content, PWA + sitemap + llms.txt + Umami analytics.
- docs/design-system/: canonical mockup bundle (source/index-v2.html for
  splash, source/docs-system.html + preview/ for docs, SPEC.md, tokens).
- docs/scripts/extraction/framework-reference-v2.md: deep framework
  reference (~1.6k lines, file:line citations, every public factory and
  idiom — basis for the LoRA training corpus.
- application/module/ai/: AI module with chat / embed / RAG / agent
  plugins, plus pdoQuery / httpGet / fileRead tools and Modelfile +
  smoke-test in training/.
- application/module/users/: user / ACL / form-factory traits used as the
  reference plugin pattern for the framework docs.
- application/settings/config/database/: schema + seed migrations
  including the AI module tables (200–203).
- Form factory + autogenerator changes the framework-reference-v2 covers.

Production secrets stay out: docs/.env, settings.production.ini and
ai.production.ini are all gitignored (.example files are in tree).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:22:18 +02:00
stephan.kasdorf
a60ce90643 Use pathinfo() for file extension checks in module registry. 2026-02-18 17:08:18 +01:00
stephan.kasdorf
bb7a081a68 Restrict settings file processing to .ini files in module registry. 2026-02-18 14:19:53 +01:00
stephan.kasdorf
ea6575932f 🚀 Nibiru Framework CLI v2.0.0 - PostgreSQL Support & Modern UI
 New Features
🐘 PostgreSQL Database Support
Multi-database architecture: Full PostgreSQL support alongside existing MySQL/MariaDB
Automatic driver detection: Seamlessly switches between MySQL and PostgreSQL based on INI configuration
Conditional compilation: Builds with or without PostgreSQL libraries (graceful degradation)
Database-agnostic migrations: Same migration interface for both database types
Production-ready: PostgreSQL-specific SQL syntax handling (SERIAL, information_schema, etc.)
Configuration:``` ini
[DATABASE]
driver = "postgresql"  # or "mysql" for MySQL/MariaDB
hostname = "localhost"
port = 5432
username = "your-user"
password = "your-password"
basename = "your-database"
```

🎨 Modern UI Redesign
New ASCII art logo: Beautiful Unicode box-drawing characters
Light cyan color scheme: Modern terminal aesthetics matching brand colors
Gradient effects: Bright white to cyan color transitions
Proper alignment: Clean, professional box layout
Horizontal separator: Visual separation between content and footer
🔧 Technical Improvements
Files Added:
PostgreSQLMigrator.h - PostgreSQL migration handler interface
PostgreSQLMigrator.cpp - Full libpq-based implementation
Files Modified:
CMakeLists.txt - PostgreSQL library detection and conditional compilation
main.cpp - Database driver selection logic and modern UI
ModuleCreator.h/.cpp - New color definitions for cyan/bright white
Migration Commands Enhanced:
-mi {environment} - Now supports both MySQL and PostgreSQL
-mi-reset {environment} - Database-agnostic migration reset
-mi-reset-file {filename} {environment} - Single migration reset

🎯 Backward Compatibility
 100% backward compatible with existing MySQL configurations
 Defaults to MySQL when driver field not specified
 No changes required to existing INI files
 Zero modifications to working MySQL implementation

📝 Dependencies
Required:
Boost >= 1.74.0 (program_options, serialization)
MariaDB/MySQL client library
ncurses
libwebp
base64
Optional:
libpq-dev (for PostgreSQL support)

🐛 Bug Fixes
Fixed include order conflict between ncurses and Boost headers
Corrected ASCII art alignment issues
Removed unwanted screen jumping in help output

Installation: Download the binary and place it in your framework root directory, or build from source using the instructions above.
Compatibility: Linux x86_64, tested on Debian/Ubuntu-based distributions

© 2024-2026 Stephan Kasdorf
2026-02-10 16:21:10 +01:00
stephan.kasdorf
7ea8e28598 🚀 Nibiru Framework CLI v2.0.0 - PostgreSQL Support & Modern UI
 New Features
🐘 PostgreSQL Database Support
Multi-database architecture: Full PostgreSQL support alongside existing MySQL/MariaDB
Automatic driver detection: Seamlessly switches between MySQL and PostgreSQL based on INI configuration
Conditional compilation: Builds with or without PostgreSQL libraries (graceful degradation)
Database-agnostic migrations: Same migration interface for both database types
Production-ready: PostgreSQL-specific SQL syntax handling (SERIAL, information_schema, etc.)
Configuration:``` ini
[DATABASE]
driver = "postgresql"  # or "mysql" for MySQL/MariaDB
hostname = "localhost"
port = 5432
username = "your-user"
password = "your-password"
basename = "your-database"
```

🎨 Modern UI Redesign
New ASCII art logo: Beautiful Unicode box-drawing characters
Light cyan color scheme: Modern terminal aesthetics matching brand colors
Gradient effects: Bright white to cyan color transitions
Proper alignment: Clean, professional box layout
Horizontal separator: Visual separation between content and footer
🔧 Technical Improvements
Files Added:
PostgreSQLMigrator.h - PostgreSQL migration handler interface
PostgreSQLMigrator.cpp - Full libpq-based implementation
Files Modified:
CMakeLists.txt - PostgreSQL library detection and conditional compilation
main.cpp - Database driver selection logic and modern UI
ModuleCreator.h/.cpp - New color definitions for cyan/bright white
Migration Commands Enhanced:
-mi {environment} - Now supports both MySQL and PostgreSQL
-mi-reset {environment} - Database-agnostic migration reset
-mi-reset-file {filename} {environment} - Single migration reset

🎯 Backward Compatibility
 100% backward compatible with existing MySQL configurations
 Defaults to MySQL when driver field not specified
 No changes required to existing INI files
 Zero modifications to working MySQL implementation

📝 Dependencies
Required:
Boost >= 1.74.0 (program_options, serialization)
MariaDB/MySQL client library
ncurses
libwebp
base64
Optional:
libpq-dev (for PostgreSQL support)

🐛 Bug Fixes
Fixed include order conflict between ncurses and Boost headers
Corrected ASCII art alignment issues
Removed unwanted screen jumping in help output

Installation: Download the binary and place it in your framework root directory, or build from source using the instructions above.
Compatibility: Linux x86_64, tested on Debian/Ubuntu-based distributions

© 2024-2026 Stephan Kasdorf
2026-02-10 15:15:28 +01:00
stephan.kasdorf
6e19fb6228 Add soft 404 error handling with errorController and template
Introduced `errorController` for handling unreachable pages with a soft 404 response. Added configurable error handling via `settings.development.ini` and implemented a new `error.tpl` template. Updated `dispatcher.php` to route non-existent pages to the error controller.
2025-12-16 14:19:42 +01:00
stephan.kasdorf
e4462e9402 Enhance IDb.php, pdo.php, and mysql.db.php with deleteRowById method for improved database handling. 2025-11-28 09:24:09 +01:00
stephan.kasdorf
ef6bce4002 Enhance formattributes.php and typeopenany.php with role attribute for improved functionality. 2025-10-13 14:14:44 +02:00
stephan.kasdorf
8688cdea12 Enhance typeopenany.php with new attributes for improved functionality. 2025-10-13 14:10:26 +02:00
stephan.kasdorf
0abbb49b80 Enhance formattributes.php with new attributes for improved functionality. 2025-10-13 12:27:59 +02:00
stephan.kasdorf
cd7c0f723a Enhance typeopenany.php with new attributes for improved functionality. 2025-10-10 13:50:23 +02:00
stephan.kasdorf
0791d99310 Enhance typeopenany.php with new attributes and update IForm.php for improved form handling. 2025-10-10 13:48:50 +02:00
stephan.kasdorf
69c0916809 Enhance typeopenany.php with new attributes and update IForm.php for improved form handling. 2025-10-10 13:46:49 +02:00
stephan.kasdorf
b131d5cacc Enhance typeopenany.php with new attributes and update router.php for SEO URL handling and improved URL parsing. 2025-09-29 13:39:18 +02:00
stephan.kasdorf
b550605bc2 Handle trailing URL segments in router
Added logic to handle single trailing URL segments in the router, ensuring non-numeric segments are added to the `$_REQUEST` array if not already present. Improved URL parsing for consistent request handling.
2025-08-29 14:15:16 +02:00
stephan.kasdorf
197cab3691 Add SEO-friendly URL handling in router.php
Introduced a `handleSeoUrls` method to support SEO-friendly URLs by transforming them into standard routing. Added validation for slugs, IDs, and potential actions to ensure proper parsing and prevent conflicts with existing routes. Enhanced overall routing functionality to support framework-wide SEO optimizations.
2025-08-20 11:39:27 +02:00
stephan.kasdorf
157016ff35 Add TypeSwitch class and enhance attribute handling
Introduced a new `TypeSwitch` class to manage input type switch fields for forms, allowing simplified creation of toggle switches or binary options. Enhanced attribute handling in `formattributes.php` to conditionally remove the `checked` attribute only if not explicitly specified. Updated framework to include the new `TypeSwitch` class.
2025-07-14 12:20:09 +02:00
stephan.kasdorf
17166b8b6c Merge remote-tracking branch 'origin/v1.0.1' into v1.0.1 2025-07-07 15:14:50 +02:00
stephan.kasdorf
523fb822ef Add null return type and handling in getRequest method
The `getRequest` method in `controller.php` now includes a nullable return type and additional checks for array key existence in the `$_REQUEST` array. This update ensures robust error handling and prevents undefined index notices.
2025-07-07 15:14:38 +02:00
Stephan Kasdorf
1d607d99f6 Merge pull request #20 from alllinux/v1.0.1-form-checkbox-disabled
V1.0.1-rc
2024-12-03 11:17:25 +01:00
stephan.kasdorf
be9d217732 Add return type and values for update methods.
The methods `updateRowByFieldWhere` and `updateColumnByFieldWhere` in `mysql.db.php` and `pdo.php` now have a `bool` return type and explicitly return the result of the database operations. This change improves code readability and enforces consistent function outputs, aiding in better error handling and debugging.
2024-12-03 11:12:24 +01:00
Stephan Kasdorf
a68a1970c8 Add encryption handling to updateRowById method
Extended the updateRowById method across mysql, pdo, and IDb to support encrypted fields. Updated the PDO update logic to conditionally encrypt data using DES_ENCRYPT when specified. This ensures sensitive data is managed securely during updates.
2024-10-25 13:59:41 +02:00
Stephan Kasdorf
f1ebcef60f Add 'disabled' option to typecheckbox and update README
Extended the typecheckbox element to include a 'disabled' attribute. Updated the README to provide details on new command-line switches for creating and deleting CMS pages. In preparation of the upcoming AI/CMS module.
2024-10-25 12:55:05 +02:00
Stephan Kasdorf
267cfcad4f Merge pull request #19 from alllinux/v1.0.1
Changed Class reference and renamed Module.php file
2024-03-27 13:50:17 +01:00
stephan.kasdorf
bef8735c43 Changed Class reference and renamed Module.php file
The name of 'Module.php' file in 'core/c' directory has been renamed to lowercase 'module.php', ensuring consistency across all filenames. The code inside the file has been updated, replacing '__CLASS__' with 'get_called_class()', allowing the correct class scope to be referenced even in an inherited context and ensuring proper function of '_set' and '_get' methods.
2024-03-27 13:49:56 +01:00
Stephan Kasdorf
f27267c610 Merge pull request #18 from alllinux/v1.0.1
Refactor and enhance database and form operations
2024-03-27 12:24:55 +01:00
stephan.kasdorf
e92091f235 Refactor and enhance database and form operations
Significant changes have been implemented in the database operations, particularly in update and insert functions, ensuring more stable and efficient handling of queries. Form capabilities have been enhanced by adding new attributes for processing decimal steps, further improving data input methods. This update also includes considerable refactoring and security enhancements in the PDO class.
2024-03-27 12:24:25 +01:00
Stephan Kasdorf
b6068ce5a3 Merge pull request #17 from alllinux/v1.0.1
Update database operations and form capabilities
2024-03-21 16:25:49 +01:00
stephan.kasdorf
a793f79798 Update database operations and form capabilities
Database operations have been redefined and additional functionality has been added for handling database queries. Functions for updating rows by ID and inserting array into table have been updated for better reliability. In addition, new form attributes for managing decimal steps have been added to enhance data input capabilities. Refactoring and security improvements have also been addressed in the PDO class.
2024-03-21 16:25:13 +01:00
Stephan Kasdorf
0509790655 Merge pull request #16 from alllinux/v1.0.1
Add placeholder attribute to search form
2024-03-12 10:36:43 +01:00
stephan.kasdorf
a7ce13334c Add placeholder attribute to search form
A placeholder attribute has been added to the input type search in typesearch.php. This attribute allows a short hint, a word or a short phrase, to be displayed in the input field before the user enters a value. The change was made to enhance the user experience by providing contextual help in the search field.
2024-03-12 10:36:03 +01:00
Stephan Kasdorf
1397cace54 Merge pull request #15 from alllinux/v1.0.1
Replace DES_DECRYPT with AES_DECRYPT in auth.php
2024-03-11 10:25:39 +01:00
stephan.kasdorf
c7f89194ea Replace DES_DECRYPT with AES_DECRYPT in auth.php
The decryption method used in the SQL query within auth.php has been changed. The outdated DES_DECRYPT was replaced with AES_DECRYPT to improve security. The change is expected to provide a more secure and reliable decryption process for user passwords.
2024-03-11 10:23:32 +01:00
Stephan Kasdorf
68f8408d6a Merge pull request #14 from alllinux/v1.0.0
V1.0.0
2024-02-27 16:27:40 +01:00
stephan.kasdorf
16c1a08345 VERSION 1.0.0
Implement new auto class and refactor usages of deprecated autoloader

A new automatic class loading mechanism has been introduced (Auto), replacing the deprecated Autoloader. This refactoring includes updating directory paths, changing the ownership of directories, and modifying file content strings. The codebase has been scoured to replace all instances of the discontinued Autoloader with the new class/method calls.
2024-02-27 16:25:10 +01:00
stephan.kasdorf
a91372fd55 Update paths and change ownership for settings directories
The paths for "application/settings/database" and "application/settings/elastic" were updated to be more specific. Along with the change in directory paths, the ownership of these directories was re-set, thereby ensuring appropriate permissions and maintaining consistency across the application.
2024-02-26 16:15:18 +01:00
Stephan Kasdorf
cb55aa50cf Merge pull request #13 from alllinux/v0.9.9
Update README.md with new commands
2024-02-26 10:58:06 +01:00
stephan.kasdorf
447d460417 Update README.md with new commands
The commit includes additional commands for the Nibiru framework in the readme file. It provides detailed usage for the '-g' switch and '-ws {URL} -wp {PORT}' command helping users connect to a WebSocket and use a Graylog Server more effectively. Also added some file- and folder checks to the binary, in order to have the database folder and the elastic folder being created.
2024-02-26 10:57:02 +01:00
Stephan Kasdorf
7091fdfe5a Merge pull request #12 from alllinux/v0.9.9
Update README.md with new commands
2024-02-16 10:43:43 +01:00
stephan.kasdorf
70eb41428d Update README.md with new commands
Updates in the Readme reflect the additions to the binary.

Extended the README.md file for the Nibiru framework by including detailed usage for the '-g' switch and the '-ws {URL} -wp {PORT}' command. These new commands allow for versatility when a Graylog Server is present and when connecting to a WebSocket respectively.
2024-02-16 10:42:28 +01:00
Stephan Kasdorf
d1b2b3bd6a Merge pull request #11 from alllinux/v0.9.8
v0.9.8 - minor bugfix in the auth method in the framework library
2023-12-04 21:38:03 +01:00
Stephan Kasdorf
d885132629 v0.9.8 - minor bugfix in the auth method in the framework library, and some additions for the controller.php in order to handle sessions better. 2023-12-04 21:35:23 +01:00
Stephan Kasdorf
a138344234 Merge pull request #8 from alllinux/v0.9.7
V0.9.7
2023-08-17 16:25:30 +02:00
stephan.kasdorf
46af03b2c8 nibiru framework v0.9.7 - added a new README.md to have a better understanding for the framework itself, added a versioning system with version numbers. 2023-08-17 16:19:52 +02:00
stephan.kasdorf
d193cecac9 nibiru framework v0.9.7 - added a new README.md to have a better understanding for the framework itself, added a versioning system with version numbers. 2023-08-17 16:16:49 +02:00
Stephan Kasdorf
9bf0fe955d Merge pull request #7 from alllinux/v0.9.6.1
Version 0.9.6 beta - changed the model class mapper
2023-04-03 21:38:38 +02:00