just_match_api
just_match_api copied to clipboard
JustMatch API
JustMatch API 
Welcome to the official API for the Just Arrived matching service.
The API follows the JSON API 1.0 standard. Please report any violations.
If you're looking for help, ask questions, want to contribute or give feedback, you're more than welcome to join our Gitter chat. You can also checkout the tasks that are ready for development over at Waffle.io.
- Built with
- Getting started
- Tests
- Docs
- Deploy
- Commands
- Contributing
- Wish list
- Translations
- License
Built with
- Ruby 2.5
- Ruby on Rails 5.2
- PostgreSQL 9.5
- Redis 3
Getting started
Prerequisites: Ruby 2.5, PostgreSQL 9.5 or above and Redis 3.
To setup your development environment
$ git clone [email protected]:justarrived/just_match_api.git
$ cd just_arrived
$ script/setup
$ script/server
# You can now open http://localhost:3000
# The admin UI is available at http://admin.localhost:3000
You can generate some development seed data by running rails dev:seed.
If you navigate to http://localhost:3000 you'll find the API documentation (lvh.me is the same as using localhost:3000, though it supports subdomains etc).
Tests
This project uses rspec and you can find the tests in spec/.
You can run the test using
$ script/test
you can also run the test suite with some options
# Run single file
$ script/test spec/models/user_spec.rb
# Run a single test, on line 31, in file
$ script/test spec/models/user_spec.rb:31
# run with line coverage
$ COVERAGE=true script/test
We use CircleCI for CI.
Docs
Public JSON API documentation
Docs for the current version of the API.
The API documentation is generated right where the code for that particular endpoint is. That way the documentation is kept up to date.
During development you can run find the documentation at http://localhost:3000/api_docs, as long as you have a started your server (you start it by running script/server).
You can generate a static version of the API documentation with
$ script/docs
Internal documentation and configuration
In docs/README.md you'll find additional documentation.
Deploy
tl;dr let me deploy already
The simplest way to deploy is with Heroku, you can get your own version running in a few minutes.
You can also do it using the command line if you have the Heroku toolbelt installed.
$ heroku create my-server-name
$ git push heroku master
$ heroku run rails db:migrate
Commands
There are a few convenience commands
script/bootstrap- installs/updates all dependenciesscript/setup- sets up a project to be used for the first timescript/update- updates a project to run at its current versionscript/migrate- run local database migrationsscript/server- starts appscript/test- runs testsscript/console- opens a consolescript/release- create and publish application releasescript/deploy- deploy applicationscript/docs- generate docsscript/pull-translations- pull translation from Transifexscript/push-translations- push translation to Transifex
Contributing
Developer docs.
We would love if you'd like to help us build and improve this product for the benefit of everyone. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Any contributions, feedback and suggestions are more than welcome.
If you want to contribute please take a moment to review our contributing guide in order to make the contribution process easy and effective for everyone involved.
If you're not sure where to go you can always join our Gitter chat and ask :)
Wish list
- Dockerfile issue#314
- Login with Facebook, Google etc
- Speedup test suite issue#1166
Translations
Translations are managed at Transifex.
To push or pull new translations, you need to install the Transifex client.
Fetch translations
$ script/pull-translations
Push source language
$ script/push-translations
The configuration is in .tx/config.
License
This project is open source and licensed under AGPL.
