Git Product home page Git Product logo

younic's Introduction

younic Build Status

Lightweight Web Content Management System without a Database and an Administration Backend

View a running example on Cloud-Run - Please note: the first request will give a 404 error as the Cloud-Run needs some seconds for a cold start. Just try to refresh your browser. The page is showing this repo: https://github.com/escv/younic-sample

The central idea is to use a File System based Content Repository. Folders represent pages consisting of documents that are converted and put into a context map. Currently, younic supports plain text, html, csv, xml, docx (Word) or md (Markdown) documents which are put to the context map by their filename. File more deeper in the folder hierachy replace more general files having the same name (matching algorithm). Appropriate resource converters are able to interpret these files and their content is available inside templates to.

The page context map will be provided to a thymeleaf template engine that renders a html webpage. The rendering is based on a main template and folders define a specific templated used for rendering their context documents. Those specific template output will be placed to the main template. Younic is based on a OSGi environment (Felix) so it can be extend by new bundles easily.

Cloud Native

The CMS was designed for typical cloud requirements. It is using a distributed version controll system (Git) to synchronize the data between CMS nodes. If there are newer versions of pages, templates and content available, all Younic nodes get those changes via GIT synchronization (Younic does not use any databases). Therewith typical CMS processes can be mapped to git concept:

  • Git Branches are used for Staging
  • Pull Request are used for (simple) Workflows and Publish-Management
  • Git Version are used for Asset Version Histries (and rollback)

Younic offers ready to use images and script for Docker and Kubernetes environmets.

Get started (Developer)

  • younic and Felix OSGi framework currently only support Java8
  • clone the repository (or a fork) https://github.com/escv/younic-sample next to this project
  • duplicate /net.younic.core.dispatcher/launch.bndrun to a personal one (launch.{name}.bdnrun example launch.aalbert.bndrun) and add it to gitignore
  • modify the launch.{name}.bndrun (your copy) config -runproperties to fit your environment
  • to not modify logging config - create a /var/log/younic.log file add give appropriate permissions for your user account

Using Eclipse + bndtools

  • Use eclipse bndtools (tested with latest version 4.1 and eclipse photon)
  • Open your bndrun file (step 2) and click on either "Run OSGi" or "Debug OSGi"

Using IntelliJ

  • Download the Amdatu Plugin at: https://plugins.jetbrains.com/plugin/10639-amdatu and install it in IDEA
  • Start IDEA and Select File -> New -> Project from Existing Sources... -> Select the younic root Folder (proceed with default selections)
  • Launch it with: Run -> Edit Configurations... -> Click the [+] -> BND OSGi -> Run Launcher -> At the right form: Choose your launch.{name}.bndrun Descriptor -> Apply Changes and run it

If you prefer to launch younic as a container, please use the grade build target:

gradle clean compileJava dist docker dockerRun

Or from Docker Hub:

docker run -e "YOUNIC_CMS_ROOT_GIT=https://github.com/escv/younic-sample.git" --name younic -p 8080:8080 escv/younic

run standalone as jar:

./gradlew startServerStandalone

Cloud Deployments

Younic also supports a kubernetes cluster deployment. To do so, checkout the project and inspect the container/kubernetes folder. First you need to adjust the younic.properties to point your YOUNIC_CMS_ROOT to a repository containing your cms content. Following that: please create a kubernetes namespache such as younic. Use this namespace in the kustomization.yaml

Also, there is an ingress to adjust - please adjust host: test.example.com in ingr.yml to follow your needs.

Execute the deployment via:

kubectl apply -k ./

Credits:

The sample web page is based on: http://demo.themewagon.com/preview/bootstrap-4-classified-website-template The hero image was taken from https://pixabay.com/en/fog-forest-mountain-world-clouds-1535201/

younic's People

Contributors

dependabot[bot] avatar escv avatar jrodan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jrodan

younic's Issues

Implement Content search mechanism

Implement a OSGi Service to search for contents.
In a simple default bundle, the Cache Memory of Resource can be searched (it contains all non binary contents in a VM Memory Map).

Later and optional, a certain bundle could search using a Lucene Index based on file system documents. An indexer could read in files from filesystem to be searched.

Support .docx as /content Documents

Add an OSGi IResourceConverter Component in content bundle to support reading-in Word .docx files.

Only basic style information should be extracted from Word document so that styling is done in CSS files.

Maybe, instead of using external libraries such as apache poi, it is possible to read in the .docx XML with a XML parser directly (it is a zip'ed XML) and extract text there.

The result of the ResourceConverter should be a clean and simple XHMTL snippet representing the Word document.

Support Markdown .md Files as /content Documents

Implement a IResourceConverter OSGi Component in content module to support reading in .md files.
The result should be a XHTML plain and simple markup.
The Code can be aligned to CSVResourceConvert. It should be checked if an additional markdown library is required or a GIST/Snippet can be used to implement it fully without 3rdParty dependencies.

Some external libraries do not fully support OSGi bundling.

Properly support "dev" mode

When creating a website with younic, each kind of caching is obstructive.
There some places in younic caching resources and template rendering.
There is yet a property net.younic.devmode but it usage in source code is not complete.

Also in devmode, all thymeleaf usages should be color bordered

Implement younic.Forms

Design a form description document that can be placed into /documents from whose a xhtml form and validators can be generated in template. Also a generic form handle service with extension points for E-Mail, CSV oder external Service should be created

Support App Components

Currently the /content Folder only supports displayable Content for the /templates

The Idea is here to also support an App Component that displays a (client based) WebApp.
There could be an appname.app (structured) file inside the content page tree that consists of initialization config (required Resource files) and params for a WebApp.

There will be a simple app Template (part of younic) that consist of a App Root

Container to render the app into it. Doing some webpack logic can initialize an App here. The app can make use of a REST backend directly hosted on younic itself (OSGi R7 Bundles can host JAX-RS service endpoints).

Maybe there will be a resource/ts next to resource/js to support typescript apps that are transpiled (upon detected changes) and servered by the younic dispatcher.

younic is well suited for WebApps because of the focus on serving static file resources as well as the posibility to host a service endpoint using JAX-RS.

Allow custom Bundles of cms-root to be integrated to platform

There should be a folder (e.g. "bundle") inside of the cms-root git repo whose jar bundles are automatically installed to the platform. A possible user of younic should not modify the files/folder of the platform. Similar to content updates, newer bundle versions should be installed automatically.

Integrate Keycloack Authentication

Allow authentication forwarding from a keycloack instance. Keyclock should not be bundled on younic server but should forward required authentication tokens and/or Roles of the principal.

A Concept is needed how to define RequiredRoles on younic folders.

Implementing an Onsite Content Editing feature

Create a Bundle to allow marking of HTML Fragments (Decorator) that are based on /content documents and an additional Button to edit them onplace.
Marking can be done by adding a css class to all elements having th:text or th:utext thymeleaf marker before template processing will be done.

This mentioned feature will be simalar to /fileadmin but targets more non-technical users.

Create a younic cms-root Repository than can be forked and clone to start a new WebPage

Currrently, there is a separate Younic-Sample project than can be used as a cms-root (https://github.com/escv/younic-sample).
However, this repo is rather a technical playground than a clean starting point for new web pages.

The cms-root startingpoint Repository should be clean and should use state of the art Responsive-Web technologies. Also it must not contain any commercial licensed artifacts that might cause problems on created web pages by clients.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.