Skip to content

The platform of the global Fab Labs Network

License

Notifications You must be signed in to change notification settings

bnore/fablabs.io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FabLabs

Code Climate Build Status Test Coverage

This is the official repository for fablabs.io platform project.

Fab labs provide widespread access to modern means for invention. They began as an outreach project from MIT’s Center for Bits and Atoms (CBA), and became into a collaborative and global network. You can find more information about Fab Labs on the Fab Foundation Website.

If you are a Fab labs entusiast and/or you would like to contribute to the project please feel free to get in touch by opening a new issue.

Vote for features

Feature Requests

Getting started

Local development

  1. npm i

  2. rake db:setup

  3. rails s

  4. Add this to your /etc/hosts:

    127.0.0.1 www.fablabs.local 127.0.0.1 api.fablabs.local

  5. Visit http://www.fablabs.local:3000

Tests

Run tests with:

bundle exec rake

Starting with docker-compose

  1. Add all the secrets to an .env file - Minimum example is in the env.example file

  2. Also copy cp config/application.example.yml config/application.yml

  3. Start the project:

    docker-compose up web app

  4. Create database (only the first time):

    docker-compose exec app rake db:setup

    If npm does not successfully install do:

    docker-compose exec app npm i

  5. Add this to your /etc/hosts:

    127.0.0.1 www.fablabs.local

    127.0.0.1 api.fablabs.local

  6. Visit http://www.fablabs.local:3000

  7. API is served on http://api.fablabs.local:3000

  8. Add test users and data with

    docker-compose exec app rake db:seed

    This will create a normal user (email=[email protected], password=password) and an admin user (email=[email protected], password=password)

  9. Run tests with

    docker-compose exec app rake db:setup RAILS_ENV=test

    docker-compose exec app rake spec

  10. If you make changes to the code, rebuild the app and deploy the new image

    docker-compose build

    docker-compose up -d

  11. Backup your db at any time with the included script:

    ./scripts/docker-backup-db.sh
    

API Documentation

Take a look at the developer guide for information on how to integrate Fablabs.io in your application.

Check out also the API Reference, the Examples, and the fablabs.js library.

Production notes

If you are running in production:

  • you need to setup the SSL hosts and .env vars from the docker-compose.yml

  • you must define Amazon S3 env vars, all thumbnails and images depend on this:

S3_BUCKET=your_fablabs.io
S3_KEY=<amazon key>
S3_SECRET=<amazon secret>
S3_REGION=<amazon region code>
  • you need to run the assets pipeline to update public/assets

docker-compose exec app bundle exec rake tmp:clear docker-compose exec app bundle exec rake assets:precompile docker-compose restart app

Pull requests

All PRs are tested on Travis. Make sure the tests run fine.

Versioning

Currently using this tool to manually handle versioning: https://github.com/gregorym/bump

Use this command to update the VERSION file + create a git tag

bump patch --tag

Then push the git tag with:

git push --tags

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL) - see the LICENSE.md file for details.

About

The platform of the global Fab Labs Network

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 51.1%
  • HTML 30.2%
  • API Blueprint 7.9%
  • CSS 7.4%
  • CoffeeScript 2.5%
  • Shell 0.7%
  • Dockerfile 0.2%