Viloveul Content Management System (Rest API)
PHP7, OpenSSL, php-apcu/php-redis
composer create-project viloveul/cms-restapi your-project-name
cd your-project-name
Edit file .env anda sesuai kebutuhan :
KEY | VALUE | KETERANGAN |
---|---|---|
VILOVEUL_AUTH_NAME | string | Header name untuk basic auth (default = Bearer) |
VILOVEUL_AUTH_PRIVATE_KEY | string | path ke file private key |
VILOVEUL_AUTH_PUBLIC_KEY | string | path ke file public key |
VILOVEUL_AUTH_PASSPHRASE | string | phrase untuk encrypt (require) |
VILOVEUL_DB_HOST | string | |
VILOVEUL_DB_PORT | string | |
VILOVEUL_DB_NAME | string | |
VILOVEUL_DB_USERNAME | string | |
VILOVEUL_DB_PASSWD | string | |
VILOVEUL_DB_PREFIX | string | |
VILOVEUL_DB_CHARSET | string | |
VILOVEUL_DB_COLLATION | string | |
VILOVEUL_CACHE_ADAPTER | string | Adapter untuk cache (default = redis, opsi = redis or apcu) |
VILOVEUL_CACHE_LIFETIME | number | waktu caching |
VILOVEUL_CACHE_HOST | string | available for redis adapter |
VILOVEUL_CACHE_PORT | number | available for redis adapter |
anda dapat menyesuaikan konfigurasi .env anda dengan cara menjalankan perintah berikut
sbin/viloveulc cms:envi
kemudian memulai tahap instalasi dengan perintah :
sbin/viloveulc cms:install
membuat user "Administrator":
sbin/viloveulc cms:admin
Dummy content (Optional):
sbin/viloveulc cms:dummy
setelah selesai proses instalasi, jalankan perintah berikut:
php -S localhost:19911 -t public
UNDER DOCKER
simple, just run
docker run -p 19911:19911 -e VILOVEUL_AUTH_PASSPHRASE=dordor -e ADMIN_EMAIL=your@mail.com -e ADMIN_PASSWORD=YourP@s5w0rdH3rE -e VILOVEUL_DB_HOST=YOUR_DB_HOST fajrulaz/viloveul-cms-restapi
your local ready : http://localhost:19911
- Note: ini adalah headless CMS, bukan Stack CMS
FEATURES
MODULE | ENDPOINT | KETERANGAN |
---|---|---|
AUTH | POST /auth/login |
authentication user yang telah terdaftar |
POST /auth/register |
register user / create account | |
POST /auth/forgot |
request password sementara | |
USER | POST /user/create |
create new user account |
GET /user/index |
get all registered user | |
GET /user/detail/{:id} |
get detail user | |
GET /user/me |
get current user | |
POST /user/update/{:id} |
update user account | |
POST /user/relations/{:id} |
set user role relations | |
DELETE /user/delete/{:id} |
delete registered user (only flag) | |
GET /user/profile/{:id} |
get profile user | |
POST /user/profile/{:id} |
set profile user | |
ROLE | POST /role/create |
create new role user |
GET /role/index |
get all created roles | |
GET /role/detail/{:id} |
get detail role | |
POST /role/assign/{:id} |
Assign some role to another role (parent-child) | |
POST /role/unassign/{:id} |
delete assigned role from other role | |
POST /role/update/{:id} |
update role | |
DELETE /role/delete/{:id} |
delete role | |
TAG atau KATEGORI | POST /tag/create |
Create new tag |
GET /tag/index |
Get all tag | |
GET /tag/detail/{:id} |
Get detail tag | |
POST /tag/update/{:id} |
Update tag | |
DELETE /tag/delete/{:id} |
Delete tag | |
POST atau KONTEN | POST /post/create |
Create new post/content |
GET /post/index |
Get all post/content | |
GET /post/detail/{:id} |
Get detail post/content | |
POST /post/update/{:id} |
Update post/content | |
DELETE /post/delete/{:id} |
DELETE post/content | |
MEDIA atau GALERI | POST /media/upload |
UPLOAD FILE(S) |
GET /media/index |
Get uploaded FILES | |
GET /media/detail/{:id} |
Get detail media | |
DELETE /media/delete/{:id} |
delete media |