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.
- Ruby (>= 2.4.1)
- Postgresql (>= 9.3)
- QT (== 5.5) Installation instructions
- Bundler
- Make a copy of
.env.development.example
to.env.development
; - Open
.env.development
and.env.test
files and configure theDATABASE_URL
with your local database informations
This 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:
- WEB (
/
), which has all code to show public information, like Map; - API (
/api
), is a public GraphQL API whichweb
app makes use; - ADMIN (
/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: "your_email@domain.com", 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.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Copyright © 2017 Rafael Soares – Released under MIT License