sam-sepi / Cmsimple

A trivial cms built with php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMSimple

Trivial CMS in PHP and JS

Get started

git clone https://github.com/sam-sepi/Cmsimple

Documentation

CMSimple does not use databases. Any content shared between server and client is a JSON object.

To add or update the contents you must authenticate by sending the user and pass data in JSON format to the jwt.php file (located in the api folder). After checking the correspondence with the data in the .env file, a JWT is released and saved in local storage.

Then you can send data (id, title, description, text) via POST in JSON format to save the content on the server. The ID parameter will also be the name of the .txt file saved online and has a maximum of 20 characters. Same ID changes the contents of the file.

Among the headers of the request, the JWT must also be sent according to the protocol specifications.

In the text parameter html code can be filtered.

Examples of how to manage the client side are the auth.html, post.html, update.html files. Personally I recommend keeping these files locally and pointing with js fetch to the server (if the cms was online).

Depend.

PHP-JWT

phpdotenv

Author

Sam Sepi - Init. work

License

MIT

About

A trivial cms built with php


Languages

Language:PHP 47.9%Language:HTML 45.2%Language:CSS 7.0%