Code Monkey home page Code Monkey logo

gandhi's Introduction

We are actively looking for contributors, and are willing to pay for quality pull requests! If you are at all interested, please send Mike an email!

Gandhi

wercker status

Gandhi is an open source, online grant management system. It is built with node, uses the impeccable rethinkdb as its primary data store and redis for cluster coordination and scheduling. While it's still alpha software, it is already being used with great success by a few groups.

Installation

###Install Dependencies

  1. node
  2. rethinkdb
  3. redis

###Simple

Gandhi can be run as a stand-alone app. Make sure RethinkDB and redis are running on your machine. Simply clone Gandhi and start it:

git clone https://github.com/mike-marcacci/gandhi.git
cd gandhi
npm install
npm start

###Advanced

Gandhi is available as an NPM package, and can be used in your existing express app. This is also the best way to run Gandhi if you plan on building custom modules or using community-supported ones.

Add Gandhi as a dependency to your app:

npm install --save gandhi

Import gandhi and add it to your app:

var app = require('express')();
var config = {
	// configure here
};

app.use(require('gandhi')(config));

app.listen(3000);

Configuration

{
	// This is the he root path for the portal, without trailing slash. It
	// might be used to host your system at www.example.com/portal.
	root: '',

	// These are the connection details for RethinkDB.
	db: {
		host: '127.0.0.1',
		db: 'gandhi'
	},

	// To make things run faster, we keep a pool of Rethinkdb connections
	// inside each process. You can tune the pool's settings here.
	pool: {
		max: 30,
		min: 1,
		timeout: 30000
	},

	// These are the connection details for Redis.
	redis: {
		host: '127.0.0.1'
	},

	// When gandhi can't use an atomic operation to alter a document in
	// rethinkdb, we need to lock it so we don't try to process multiple
	// writes at the same time. You can tune the lock settings here.
	lock: {
		retry: 100,
		timeout: 30000
	},

	// Authentication is made persistant by ust of Json Web Tokens. You
	// must provide a secret for cryptographically signing these tokens.
	// Make sure this stays secret, or an attacker could impersonate
	// system users.
	auth: {
		secret: ''
	},

	// Gandhi used nodemailer to support almost any mail sending option
	// out there. You can configure it here. Learn more at:
	// https://github.com/andris9/Nodemailer
	mail: {
		transport: {
			service: 'Mandrill',
			auth: {
				user: '[email protected]',
				pass: '0eCce8d2FKfLrTxiFYOReg'
			}
		},
		defaults: {
			from: '[email protected]'
		}
	},

	// Gandhi uses a module system to add new functionality. In fact,
	// many core components are actually written as modules. This must
	// be an array of paths to the various different modules you wish
	// to use.
	//
	// In this example, we programatically build a list of modules from
	// the modules directlry.
	modules: fs.readdirSync(__dirname + '/lib/modules').map(function(dir){
		return __dirname + '/lib/modules/' + dir;
	}),

	// Where do you want to store uploaded files? Right now, this only
	// supports using the local filesystem or NFS, but in the future
	// it will support other options like S3 and CloudFiles
	files: {
		directory: __dirname + '/uploads'
	},

	// On what port do you want gandhi to listen? In our opinion, it's
	// best to run apps behind something like NGINX, but there's nothing
	// stoppingy you from just running directly on port 80.
	port: 3000
}

Demo

Coming Soon!

gandhi's People

Contributors

mike-marcacci avatar chrismckenzie avatar

Watchers

James Cloos avatar  avatar

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.