Skip to content

Lightweight alternative to Discourse written in Nim

License

Notifications You must be signed in to change notification settings

andinus-contrib/nimforum

 
 

Repository files navigation

nimforum

NimForum is a light-weight forum implementation with many similarities to Discourse. It is implemented in the Nim programming language and uses SQLite for its database.

Examples in the wild

forum.nim-lang.org

forum.nim-lang.org

Features

  • Efficient, type safe and clean single-page application developed using the Karax and Jester frameworks.
  • Utilizes SQLite making set up much easier.
  • Endlessly customizable using SASS.
  • Spam blocking via new user sandboxing with great tools for moderators.
  • reStructuredText enriched by Markdown to make formatting your posts a breeze.
  • Search powered by SQLite's full-text search.
  • Context-aware replies.
  • Last visit tracking.
  • Gravatar support.
  • And much more!

Setup

See this document.

Dependencies

The following lists the dependencies which you may need to install manually in order to get NimForum running, compiled*, or tested†.

  • libsass
  • SQLite
  • pcre
  • Nim (and the Nimble package manager)*
  • geckodriver
    • Firefox†

[*] Build time dependencies

[†] Test time dependencies

Development

Check out the tasks defined by this project's nimforum.nimble file by running nimble tasks, as of writing they are:

backend              Compiles and runs the forum backend
runbackend           Runs the forum backend
frontend             Builds the necessary JS frontend (with CSS)
minify               Minifies the JS using Google's closure compiler
testdb               Creates a test DB (with admin account!)
devdb                Creates a test DB (with admin account!)
blankdb              Creates a blank DB
test                 Runs tester
fasttest             Runs tester without recompiling backend

To get up and running:

git clone https://github.com/nim-lang/nimforum
cd nimforum
git submodule update --init --recursive

# Setup the db with user: admin, pass: admin and some other users
nimble devdb

# Run this again if frontend code changes
nimble frontend

# Will start a server at localhost:5000
nimble backend

Development typically involves running nimble devdb which sets up the database for development and testing, then nimble backend which compiles and runs the forum's backend, and nimble frontend separately to build the frontend. When making changes to the frontend it should be enough to simply run nimble frontend again to rebuild. This command will also build the SASS nimforum.scss file in the public/css directory.

Copyright

Copyright (c) 2012-2018 Andreas Rumpf, Dominik Picheta.

All rights reserved.

License

NimForum is licensed under the MIT license.

About

Lightweight alternative to Discourse written in Nim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Nim 86.6%
  • HTML 6.7%
  • CSS 5.6%
  • TSQL 1.1%