Skip to content

evanilukhin/usernames_declensions

Repository files navigation

Username Declensions CircleCI Reviewed by Hound

Declines last name, first name, middle name for added users. Works only for russian names thanks Petrovich.

This application consists of two parts:

  • Single Page Application on the React that worked as a view and partly as a router.
  • API manipulates data from the database. (Documentation there)

Web site deployed on heroku.

Latest builds on dockerhub.

Setup

Ruby

  • install ruby. Version there
  • install bundler gem install bundler
  • run bundle install

JS

  • install YARN from there
  • run yarn install

Database

To prepare the database you must:

  • install postgres or get credentials for the existed database
  • add the next environment variables:
    • DB_LOGIN - role in database that has rights to create database and to login;
    • DB_PASS - password;
    • DB_NAME -(optional in development and test environment) - name for the database. By default in development - usernames_declensions, in test - usernames_declensions_test;
    • DB_HOST - host (localhost - if this database deployed local)
    • DB_PORT - port
  • run rake db:setup
  • run rake db:migrate

After it, run bin/rails s.

..or

In both cases server will be available on localhost:3000.

Features

What there are and what there aren't:

✔️ Almost 100% test coverage (only backend)

✔️ Cool API

✔️ Automatic tests by using Circle-CI

✔️ Fantastic documentation for the API

🐳 Docker. Autobuilds in docker-hub.

❌ Handling errors on the front-end

❌ Documentation for errors in the openapi specification

☠️ Fantastic(seriously) SPA. (I didn't add no one css file)

☠️ Unrivaled protection from attacks (Don't show this site to OWASP)

☠️ Absolutely readable React code (I spent only 4 hours on it and I don't know React)