## A Drogon CMS built with C, Drogon, CMake, Adwaita and GTK4. This is a Drogon Content Management System(CMS). ### License * GPL-3.0 ## Prominent Features and Strengths - Faster than NginX, WordPress and Strapi - Built on CMake/C/C++/GTK4/Drogon - Built on Freedom Software - Lightning Fast Architecture - Headless CMS Ready for Site Generators - Lightweight Reverse Proxy Security - Database Ready for SQLite3 & PostgreSQL 15 - Custom API Configurations - C Package Manager (CPM) - Excellent Documentation ## Community Plugins - Proxy/Local Caching Support - Website Builder - Website Preview/Drafts - WYSIWYG Editor - Image Gallery - ... ## Benchmarks ### A NodeJs Server Test on 2 IO threads ``` wrk -c200 -d5 -t2 http://localhost:3000 Running 5s test @ http://localhost:3000 2 threads and 200 connections Thread Stats Avg Stdev Max +/- Stdev Latency 51.58ms 159.51ms 1.43s 93.61% Req/Sec 7.56k 1.00k 8.24k 94.00% 75277 requests in 5.01s, 11.56MB read Requests/sec: 15033.66 Transfer/sec: 2.31MB ``` ### A drogon server with web sockets and drogon proxy on 2 IO threads ``` wrk -c200 -d5 -t2 ws://localhost:8088/ Running 5s test @ ws://localhost:8088/ 2 threads and 200 connections Thread Stats Avg Stdev Max +/- Stdev Latency 2.67ms 6.11ms 47.94ms 94.97% Req/Sec 57.95k 4.90k 69.61k 74.00% 576699 requests in 5.01s, 394.34MB read Non-2xx or 3xx responses: 576699 Requests/sec: 115151.94 Transfer/sec: 78.74MB ``` ### Getting a JSON token with web sockets and Drogon proxy on 2 IO threads. ``` wrk -c200 -d5 -t2 ws://localhost:8088/get-token Running 5s test @ ws://localhost:8088/get-token 2 threads and 200 connections Thread Stats Avg Stdev Max +/- Stdev Latency 1.91ms 402.84us 4.23ms 69.21% Req/Sec 50.74k 3.58k 56.43k 61.00% 504657 requests in 5.01s, 106.36MB read Requests/sec: 100798.10 Transfer/sec: 21.24MB ``` ## Development & Contributing ### Developer Dependency Requirements * GCC (GNU C/C++ Compiler) >= 13.2.1 * PostgreSQL >= 15.1(*Priority*) or SQLite3(*Default*) >= 3.43.1 [SEE 3RD PARTY SITE DEPENDENCIES] * CMake >= 3.28 * Drogon >= 1.9.1 [SEE 3RD PARTY SITE DEPENDENCIES] * Pkg-Config >= 1.8.1 * Gtk4 >= 4.0 * Adwaita >= 1.3.5 * OpenSSL >= 3.1.2 * *Optional* Cambalache >= 0.93 (Gtk4 Editor) [SEE 3RD PARTY SITE DEPENDENCIES] * *Optional* Geany IDE >= 1.38 * CLI Experience * Git/Github Experience *Note: This has been built and tested on Arch Linux* ### Steps to Build *DrogonCMS* from Source Code 0. Clone the repository `git clone https://git.sharpetronics.com/sharpetronics/DrogonCMS` and `cd DrogonCMS/` 1. *optional* checkout correct branch e.g. `git checkout drogonCMS-cmake` 2. Run `cmake -D CMAKE_BUILD_TYPE=Release .` 3. Then, to build the executable, we do `cmake --build .` 4. Run the app with `./DrogonCMS` ### Requirements *Drogon* framework compile/build dependencies. * Drogon >= 1.9.1 https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#System-Preparation-Examples ### Recommendations A GTK4 editor is a recommended tool for this project; all UI's and project files **.cmb** are stored in `./src/ui/`. * Cambalache >= 0.93 https://gitlab.gnome.org/jpu/cambalache An optional recommendation is Geany IDE. * Geany IDE https://www.geany.org/ ### IDE build commands via Geany `Build -> Set Build Commands` #### This is what my build commands look like in *Geany IDE* with **GNU Automake Tools**. | Name | Command | Working Directory | | ----------- | ------------------ | -------------------------------------------------------------------- | | Configure | ../configure | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | | AutoReconf | autoreconf -vi | /home/username/Desktop/Local-Development/cplusplus/drogon-dash | | Make | make | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | | Run | ./drogon_dashboard | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | | Make Bins | make dist | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | #### This is what my build commands look like in Geany IDE with **BSD CMake Tools**. | Name | Command | Working Directory | | ----------- | ------------------ | -------------------------------------------------------------------- | | Configure | cmake -D CMAKE_BUILD_TYPE=Release | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ | | Build | cmake --build . | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS | | Run GUI | ./DrogonCMS | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ | | Run API | ./DrogonCMS-API-Server | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/vendors/api-server/ | | Install | cmake --install | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ | ## Authors * SharpeTronics, LLC * oDinZu WenKi(Charles) ## Financial Support & Donations oDinZu WenKi(Charles) https://liberapay.com/oDinZu/ * Liberapay is a recurrent donations platform * Run by a non-profit organization * Source code is public * No commission fee * ~5% payment processing fee ## Learning Resources * Adawaita Documentation https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/index.html * Cambalache https://gitlab.gnome.org/jpu/cambalache * C References https://en.cppreference.com/w/c * CMake Documentation https://cmake.org/cmake/help/book/mastering-cmake/index.html * CPM Make Github https://github.com/cpm-cmake/CPM.cmake#snippets * Drogon Web Server https://github.com/drogonframework/drogon * Geany IDE https://www.geany.org/ * Gio Documentation https://docs.gtk.org/gio/index.html * GLib Documentation https://docs.gtk.org/glib/index.html * GObject Documentation https://docs.gtk.org/gobject/index.html * GTK 4 Demos https://gitlab.gnome.org/GNOME/gtk/-/tree/main/demos * GTK 4 Documentation https://docs.gtk.org/gtk4/ * PostgreSQL 15 Documentation https://www.postgresql.org/docs/15/index.html * SQLite3 Documentation https://www.sqlite.org/capi3ref.html *Notice: We focus implementation with the C programming language and only add various features of C ++ code.*