Labs is a lightweight CMS for blog and idea management for businesses
oyvindn Merge pull request #12 from digipost/jonas
Added profile picture for Jonas
Latest commit f5a0c54 Sep 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
backend Next snapshot version Jun 14, 2016
frontend Added profile picture for Jonas Sep 28, 2018
scripts Cleaning the script directory, moving screen and mongodb config to a … Aug 19, 2014
.gitignore The source code for frontend and backend Dec 12, 2013
LICENSE Initial commit Nov 1, 2013
README.md Update README.md Nov 12, 2014

README.md

Labs

Labs is a lightweight CMS for blog and idea management for businesses.

Features

Labs is a tailor-made solution for businesses who want to use blog posts to communicate with their customers, and collect their customers' ideas.

Features includes:

  • Let admins create blog posts, twitter quotes and ideas.
  • Let users comment on blog posts.
  • Let users contribute ideas.
  • Let users comment on ideas.
  • Let users vote for ideas.
  • Let users share content on Twitter, Facebook and Google+.

Technologies used

Labs is a single page js app with a Scalatra backend with MongoDb.

Frontend

Backend

Demo

Digipost Labs

Install

Clone repository

$ git clone https://github.com/digipost/labs.git

Backend

Install and run MongoDB:

$ cd labs/backend
$ sudo apt-get install mongodb
$ sudo mkdir -p /data/db
$ sudo chown $USER /data/db
$ mongod

Start the mongo shell and create the required collections:

$ /usr/bin/mongo
> show dbs
local   0.078125GB
> use labs
switched to db labs
> db.users.save({})
> db.sessions.save({})
> db.items.save({})
> show dbs
labs    0.203125GB
local   0.078125GB

Create a dummy secret.conf file:

$ echo "labs {
    oauth {
        clientId = "OAUTH_ID_FROM_DIGIPOST"
        secret = "SECRET"
    }
}" > secret.conf

Start the backend:

$ ./sbt
> run

Frontend

The dependencies are already included in the repository, but you can update to newer versions with bower if necessary:

$ cd ../frontend
$ sudo apt-get install nodejs nodejs-dev npm
$ sudo npm install -g bower
$ ./bower

Get Pacbot and fire up the frontend:

$ sudo npm install -g pacbot
$ pacbot -d

Startup script

We have supplied a startup script for development purposes. It starts a multi window screen with nodeproxy, mogodb, frontend and backend at the same time. Before running the script for the first time, you need to install node.js and npm, run the setup script to install npm packages, and edit the mongod.conf file to fit your db needs. The setup.sh script will promt for sudo password.

Prepare the script dependencies:

$ cd labs/script
$ sudo apt-get install nodejs nodejs-dev npm
$ ./setup.sh

Run the script:

$ ./run

Direct your browser to https://localhost:7000/

Enjoy!

License

Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0

Images and logos for Posten and Digipost is (C) Posten Norge AS and not licensed under Apache License, Version 2.0.