Performance Review API is a backend side of performance review application; an application that allows employees to submit feedback toward each other's performance review.
Written in ruby 2.72 with mysql for database
API documentation is provided inside doc
folder, it has two files as follows:
index.html
: A static html file which contains API documentation, generated by aglioapi/index.apib
: API documentation in API Blueprint format
Both of documentation is automatically generated by rspec tests with rspec_api_documentation.
You can regenerate documentation by running bundle exec rake docs:generate
. Node.js is required to generate html view with aglio.
There's several way to start the application, either with docker or manual setup.
Note that you can use db:create
and db:migrate
if you do not wish to seed the table with fake data.
- Copy
.env.sample
to.env
and configure application setting - Install required gem with bundler, use
gem install bundler
if bundler is not installed then proceed withbundle install
- Run
bundle exec rake db:setup
to run database migrations - Run
bundle exec puma -C config/puma.rb config.ru
- Press CTRL+C to stop the application
- Copy
.env.sample
to.env
and configure application setting - Run
docker build -t performance-review-api .
to build application as docker image - Run
docker run --rm --env-file .env --entrypoint="" performance-review-api bundle exec rake db:setup
if database is not migrated yet - Run
docker run --rm --env-file .env -p 8000:8000 performance-review-api
to create new container and start it - Press CTRL+C to stop the application
Note: Development and test gems aren't included.
- Copy
.env.sample
to.env
and configure application setting - Run
docker-compose build
to build application and it's dependencies as docker image - Run
docker-compose up -d
to start application and it's dependencies in background - Run
docker-compose run --rm --entrypoint="" performance-review-api bundle exec rake db:setup
if database is not migrated yet. Make sure to give some time before execute the command to let mysql container start up - Run
docker-compose stop
in project directory to stop application and it's dependencies
Note:
- Development and test gems aren't included
- Application may throw error if accessed before migration is executed.
This is an open-sourced application licensed under the MIT License.