# Luxa
Luxa is a simple yet modern headless CMS, which outputs JSON data through a RESTful API.
# Installation
1. Edit configuration.php and define the database and paths.
2. Import the Luxa SQL file, goto the index page and login with: username: admin, password: admin.
the password can be changed in the admin panel under settings.
# Requirements
PHP, MySQL, mod_rewrite
# API
By default, the API writes data from the database in JSON format.
Possible outputs:
1. filetype=csv will output CSV
2. filetype=array will output an array
3. filetype=json (or blank) will output JSON
4. filetype=unique will output unique (incremental) JSON
Example: https://localhost/CMS/API.php?filetype=unique&id=1
will fetch the index.html and increments the fields in JSON format.
(Note that all HTMLentities are encoded, and can be decoded by JavaScript as HTML is allowed in Luxa.)
# Uses
It could be used with a JavaScript framework like VUE.js, React or UX.js, which also accepts JSON data objects:
https://github.com/flaneurette/UX.js
# Demo with UX.js
With UX.js, the following code will fetch all JSON data from the API:
Which can then be accessed:
```
{{blogTitle}}
{{component_text}}