Skip to content

HuseinJ/profile-cms

Repository files navigation

profile-cms

The Profile-CMS is a content management system built using Kotlin, GraphQL, Nuxt.js, Svelte, and other modern technologies. The modules are live at hjusic.com.

This project was never meant to be the next WordPress—it's simply a playground for experimenting with new technologies. :)

Features include

  • Decoupled Backend and Frontend Architecture
  • Content Management via any GraphQL Client or the given admin-ui
  • SEO-Optimized Static Site Generation (google hates dynamic pages 👀️)
  • Robust Data Storage in MongoDB
  • Everything is Dockerized
  • Integration for Jenkins CI/CD

Short explanation

The Profile-API module is the core of the CMS. It contains the authentication logic, models, and endpoints for manipulating these models within a hexagonal architecture. The model represents everything needed to model a Website. Note that the model design is not fully optimized, as I wanted to conduct some tests speciffically in this configuration.

The User-UI module is entirely separate and has no direct dependencies on the Profile-API. The idea behind this setup is that the frontend is statically generated based on data provided by the API, resulting in a static HTML page that can be efficiently served by any simple web server. The CI generatesa clean container containing only static files and the website itself never calls the api again.

The Admin-UI module is a straightforward graphical interface for building pages. Users must authenticate to access it and can then create, edit, or delete pages, update user information, and perform basic administrative tasks.

Note that every function in the API is integration and/or unit tested. This really helped me building additional functions and playing with things without breaking everything. Building E2E tests are out of scope for this project.

Getting Started

To deploy it locally, you can utilize the provided docker-compose file. To get started, follow these steps:

  • Open your terminal and execute the following command:

docker compose up

  • Once the setup is complete, you will have a backend instance accessible at localhost:8081.
  • The initial configuration parameters, can be customized by editing the .env file.
  • The Frontend can be generated by either running

yarn generate or docker build --build-arg CMS_URL=localhost:8081 -t user-ui:devloval .