Publishing Online
For public web deployment with SEO optimization and clean URLs:
Static Page Generation
Generate SEO-friendly static pages:
python3 datannur.py staticTo generate static pages and deploy in one step:
python3 datannur.py static-deployConfiguration in data/static-make.config.json:
- domain: Your public domain (e.g.,
"https://yourdomain.com") - required for sitemap generation whenindexSeo: true - indexSeo:
trueto allow search engine indexing,falseto addnoindexmeta tag (default:false) - languages: Language folders to generate, for example
["en", "fr"]; when set, static pages are written under language-prefixed paths such as/en/datasetsand/fr/datasets - entities: Which entity types to generate static pages for
- routes: Which routes to pre-generate
Note: This setup requires an Apache server with mod_rewrite enabled. Static generation creates SEO-optimized HTML files while maintaining the full SPA functionality. In multilingual static output, each generated page records its language so the hydrated app keeps the same interface language as the served HTML.
Apache / Shared Hosting Mode
The generated package includes an .htaccess file for Apache deployments, including typical shared hosting environments. It supports both domain-root installs such as https://example.org/ and subfolder installs such as https://example.org/datannur/.
Apache deployment provides:
- Clean application URLs such as
/dataset/accident_route - Language-prefixed static URLs such as
/en/dataset/accident_routeand/fr/dataset/accident_routewhen multilingual static generation is enabled - Static HTML pages when generated, with SPA fallback when a static page is missing
- Public API entry points under
/api/, including Raw API docs and REST API routes - PHP LLM proxy endpoints under
/api/llm/when LLM web integration is enabled
For subfolder installs, upload the package contents into the target directory (for example datannur/) and keep the included .htaccess file next to index.html. Links and assets are resolved relative to that install path, so the same package can be installed at the domain root or in a subfolder.
GitHub Pages Mode
GitHub Pages does not support Apache .htaccess rewrites. The project deployment workflow keeps the default hash routing, so internal links use URLs such as /datannur/#/folder/example.
Pre-generated static HTML pages remain preferable for public SEO pages. Hash routing is mainly for app navigation, shared links, and direct reloads on static servers without URL rewriting.
Deployment
The deployment command python3 datannur.py deploy automates the process of publishing your app to a remote server using rsync over SSH.
Usage:
python3 datannur.py deployHow it works:
- Reads deployment settings from
deploy.config.json(seeapp/data-template/deploy.config.jsonfor an example). - Uses
rsyncto synchronize your local files to the remote server, with options for excluding files and deleting removed files. - Supports SSH key authentication and custom port configuration.
- Shows progress and errors directly in the terminal.
Configuration options:
host,port,username,privateKeyPath: SSH connection detailsremotePath: Destination folder on the serverignore: Array of file/folder patterns to excludesyncOption.delete: If true, files deleted locally are also deleted remotely
If no config is found, create one from the template (
app/data-template/deploy.config.json).
URL Rewriting
The included .htaccess file enables:
- Clean URLs:
/dataset/123instead of#/dataset/123 - Static page fallback: Serves pre-generated HTML when available
- HTTPS redirect: Automatic redirect to secure connection
- Caching: Optimized cache headers for assets