All world's influence in a map. Ruby and Hanami open source project.
http://pinfluence.org - All world's influence in a map. Non-profit open source project.
This is an open source project for a study purpose in order to develop a real application using mainly Ruby and Hanami, and other technologies which could fit well, like GraphQL.
You can use it as a reference for building your own project, and of course, you are welcome to contribute on this one as well.
.env.development.example
to .env.development
;.env.development
and .env.test
files and configure the DATABASE_URL
with your local database informationsThis is a Ruby project, so it is nice to have RVM or Rbenv installed.
$ gem install bundler
$ bundle # install all gems
After, you need to setup your database.
$ bundle exec hanami db prepare
Now, run the server:
$ bundle exec hanami server
Website will be available in http://localhost:2300
The project has three apps:
/
), which has all code to show public information, like Map;/api
), is a public GraphQL API which web
app makes use;/admin
), is the dashboard. This is a restrict area.When you run the server you run all these apps.
To create an access to admin, just create an user using hanami console
:
$ bundle exec hanami console
CreateUser.call name: "Your Name", email: "[email protected]", password: "your-plain-password"
And done. You now have access to local admin area.
Since this project is using capybara-webkit
, make sure you have all dependencies installed. Click here for instructions
You need to prepare your test database
$ HANAMI_ENV=test bundle exec hanami db prepare
Now, run the tests. If everything is fine, all tests are going to pass.
$ bundle exec rspec
A Guardfile
is also available if you want to bundle exec guard
.
$ cap production deploy
Before it, see the code of conduct.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Copyright © 2017 Rafael Soares – Released under MIT License