billygriffin / far-flung-genius

Genius-style annotation prototype for the FAR (Federal Acquisition Regulation)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Far-flung-genius

Build Status Test Coverage Code Climate Continua11y

Far-flung-genius is a prototype that tries to make regulations for acquisitions more reasonable and also more personalized. Teams within government have their own policies and practices around regulation. This prototype combines the great ideas in [https://http://genius.com/](the Genius lyric annotation application) and tries to apply it to the electonic regulations.

Additional resources:

Contributing

See CONTRIBUTING for additional information.

Development work

This is an express application written in node.js. Install all dependencies via:

npm install

This is a basic express app, so there are a couple of npm scripts to make reloading the application while working almost seamless.

To reload the general application code while running a server use this script:

npm run dev

Unfortunately, rerunning the sass is a different process. To compile the css takes an addition script:

npm run dev_sass

Running both those scripts while developing can give a good reloadable environment.

Environmental variables

To get started copy the sample file to .env.

cp .env-sample .env

Database

Database is postgres and you need to create these databases outside the application scripts:

createdb far-flung-genius-test # for test env
createdb far-flung-genius-development # for development

The database sql abstraction is provided by the module knex, and other database configuration options can be found in the ./knexfile.js.

Migrations are also handled by this module.

Creating a new migration can be done via:

node_modules/.bin/knex migrate:make ___migration_name_here___

Migrate the databases via

NODE_ENV=development node_modules/.bin/knex migrate:latest
NODE_ENV=test        node_modules/.bin/knex migrate:latest

Testing

All types of tests use mocha as the test runner.

Run tests via npm test. Under the covers that runs mocha recursively on the test directory.

See mocha documentation for details about running tests in isolation or running a single file.

Starting the app

There is a script for that:

npm start

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

About

Genius-style annotation prototype for the FAR (Federal Acquisition Regulation)

License:Other