Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐣 CMS 🐣

wakatime

Installation and usage

  1. Install docker and node
sudo apt update
sudo apt install docker.io docker-compose nodejs npm git
  1. Copy repo
git clone https://github.com/Daynlight/CMS
  1. Run container
docker compose up
  1. Login to Directus http://127.0.0.1:8055.
user: admin@admin.com
password: admin
  1. Shutdown container
docker compose down

Usage

headless cms/backend: http://127.0.0.1:8055 frontend: http://127.0.0.1:4000

Frontend pages

  • / - default user article page.
  • /access - all articles accessed with token.
  • /refresh - refresh cached articles (webhook).

Architecture

  • Frontend is build with express and axios.
  • Backend is headless cms (Directus).
  • Frontend and Backend are created via docker.
  • Backend have database postgresql save in ./data.
  • It have two types of content [Articles, Authors].
  • Articles and Authors are related many to one.
  • editor@editor.com is server editor that can edit articles and authors.
  • editor can't set status equal to published.
  • publisher@publisher.com is server publisher that can only set status of article to published.
  • Article can have 3 states [draft, review, published].
  • Frontend can get published content from backend via http://directus:8055/items/articles.
  • Front can access all content by using token for Authenticated user.
  • Authenticated user don't have password and login it provides only token to fetch all data.
  • When Article change status to published it sends api request to frontend to refresh articles.
  • If someone opens frontend and there is no article than it fetches data from backend.
  • Articles are automatically updated every minute.
  • headless cms is just user friendly backend.

Kittie

About

Headles CMS + express frontend. Created for learning purposes. Have some user policies, webhook, articles and authors.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages