Jump to content

User:Juancarlospaco/sandbox

From Wikipedia, the free encyclopedia
Nim Website Creator
Original author(s)Thomas T. Jarløv, Juan Carlos Ojeda
Developer(s)Thomas T. Jarløv, Juan Carlos Ojeda
Initial release1 May 2018; 6 years ago (2018-05-01)
Stable release
6.0.0
Repositorygithub.com/ThomasTJdev/nim_websitecreator
Written inNim
Operating systemCross-platform, Unix-like
Platformx86-64, i386, ARM
Standard(s)NEP1
Available inEnglish
TypeWeb framework
LicensePPL
LicencePPL
Websitenimwc.org
As ofDecember 2019

Nim Website Creator (stylised as NimWC) is a free and open-source web framework.

NimWC primary goal is to ease the creation of complex database-driven websites. The framework emphasizes reusability and "pluggability" of components, less code, low coupling, rapid development, and the principle of don't repeat yourself. Nim Website Creator provides an administrative interface that is generated dynamically through introspection and configured via admin models. NimWC is for both advanced users who wants to write code them self, as well as for persons without special programming knowledge.

History

[edit]

NimWC first public release was on May 2018 by Thomas T. Jarløv (ThomasTJdev). In November 2018 Juan Carlos Ojeda (juancarlospaco) joined the development team.

Requirements

[edit]

NimWC is build with Nim (programming language), therefore an installation of Nim is required to build the NimWC executable. When NimWC is build, it can run on any Linux platforms without Nim.

Performance

[edit]

Nim Website Creator is designed for high performance and low memory and CPU consumption. It tries to solve the C10k problem. NimWC utilizes the web framework Jester and the extremely fast webserver httpbeast.

Licenses

[edit]

Nim Website Creator code is released under Peer Production License (PPL).

Various third-party Plugins are distributed with their own licenses, mostly MIT licenses.

Community

[edit]

Nim Website Creator do not have a dedicated chat or communication channel, besides Github issues, but new users are recommended to join the bridged chat channels of Nim on Gitter, Matrix, Telegram, IRC and Discord.

Most of the online community interaction happens on the bridged chat channels of Nim.

Features

[edit]

Blog and webpages

[edit]

The main feature of the NimWC is to provide a full featured website, where the user can customize all the pages. This includes:

  • 1-click blogging posts directly from the browser.
  • 1-click static web pages directly from the browser.
  • Raw HTML editing, WYSIWYG editor with Summernote and GrapesJS.
  • Custom title, meta description and keywords for each page, SEO friendly.
  • Custom head, navbar and footer, no hardcoded watermarks, links or logos.
  • Upload/Download files and images (private or public).

Security

[edit]

The security of the website is integrated into core of NimWC, and more opt-in security features are available. Some of them:

Configuration

[edit]

Almost all the settings can be changed within NimWC by the admin user. This includes:

  • Edit core or custom JS and CSS directly from browser, UI/UX designer friendly.
  • Log-viewer directly from browser.
  • Auto-rotating file Logger.
  • Server info page (system stats).
  • Force Server restart.
  • Edit main config file directly from browser
  • Recompilation (enabling/disabling plugins) without down times.

Plugins

[edit]

NimWC supports for plugins. The plugins a included during the compile of NimWC, and are a part of the final executable.

Published NimWC plugins are managed through the plugin repo, which users can browse through NimWC.

There are a variety of plugins, e.g.:

  • Backup feature
  • Basket for ecommerce and receipts
  • Newsletter
  • Statistics
  • and more

DevOps

[edit]

Dockerfile, Vagrantfile, SystemD Service, Desktop launcher file, pure Bash Auto-Install script are provided on a DevOps folder.

Nim Website Creator can be run in conjunction with Apache or Nginx.

Nim Website Creator officially supports database backends: PostgreSQL or SQLite.

Development tools

[edit]

For developing a NimWC project, no special tools are necessary, since the source code can be edited with any conventional text editor.

Nevertheless, a Skeleton Creator for plugins is built-in and can help increase the productivity of development.

Since NimWC is written in Nim, text editors which are aware of Nim syntax are recommended.

NimWC has command line options to update itself, also to create new Admin users, to create new data in the database and to create new databases.

Compile flags

[edit]

A full list of NimWC compile flags can be found on NimWC github repo.

Dev Mode

[edit]

A Dev mode is available as a compile flag for development purposes, the Dev mode makes the framework more verbose and bypass some security restrictions, like ReCAPTCHA.

On Dev mode sending errors via email to the Admin email is automatically disabled, to keep sending error reports via email, the -d:devemailon compile flag can be used.

The Dev mode is activated by adding -d:dev on the compile command.

Demo Mode

[edit]

A Demo mode is available as a compile flag for public demonstration purposes, the Demo mode makes the framework disable some features and fully reset itself every 1 hour.

On Demo mode only the test user is available and 2 Factor Authentication is ignored.

The Dev mode is activated by adding -d:demo on the compile command. The official Demo is running on Demo mode.

Postgres

[edit]

By default an SQLite database is used, because it does not require a database server. But it is possible to switch to Postgres database using the compile flag -d:postgres.

Force Recompile

[edit]

To force a recompilation a compile flag is provided for development purposes.

The force recompile is activated by adding -d:rc on the compile command.

Error Reporting

[edit]

Sending errors via email to the Admin email can be activated using the compile flag -d:adminnotify. Error reporting is disabled when Demo mode or Dev mode are activated.

Self Update

[edit]

The framework can update itself before compilation, using an Internet connection and Git as back-end.

The Git update is activated by adding -d:gitupdate on the compile command.

Running NimWC

[edit]

You can run NimWC in 3 different ways:

Auto install

curl https://raw.githubusercontent.com/ThomasTJdev/nim_websitecreator/master/devops/autoinstall.sh -sSf | sh

Nimble

nimble install nimwc
./nimwc

Clone

git clone https://github.com/ThomasTJdev/nim_websitecreator.git
cd nim_websitecreator
cp config/config_default.cfg config/config.cfg
nano nimwc.nim.cfg
nim c nimwc.nim
./nimwc help
./nimwc newuser -u:Admin -e:admin@admin.com -p:123456Pass
./nimwc insertdata bulma
./nimwc
chromium http://127.0.0.1:7000

Publications

[edit]

Online documentation

[edit]

Online documentation is linked from the Nim Website Creator home page, with videos, examples, API reference, complete library reference, FAQ, cheat sheet, online tools, etc.

Videos

[edit]

Presentation Slides

[edit]

See also

[edit]
[edit]