Giter Site home page Giter Site logo

studious-rotary-phone's Introduction

SRP

REST API backend done using Ruby on Rails and Postgresql. Supports jwt authentication. This application was designed from very basic requirements (job technical interview take-home assignment). But with the correct changes, it should serve as a nice backend for a "report something is happening here"-with-GPS-support application, e.g. , report people throwing parties during current lockdown.

Table of Contents

Environment variables

Needed for Production, Test and Development modes

JWT

Defaults to memory store. If Redis store is preferred, configure according.

Hosts

  • CORS_HOST Host where responses originates. In development or test modes, set it to http://localhost:3000; if your rails is configured to run in another port, change accordingly.
  • MAIL_HOST In development, set it to http://localhost:3000; if your rails is configured to run in another port, change accordingly.
  • HOSTURL Host's URL (http://localhost:3000 in production).

Mailer

  • MAIL_SMTP_ADDR SMTP Address.
  • MAILER_EMAIL Email address that will be used to send recovery password email.
  • MAIL_SMTP_PORT SMTP Port. Default 587.
  • MAIL_SMTP_USER Your SMTP User credential.
  • MAIL_SMTP_PASS Your SMTP Password credential.
  • MAIL_SMTP_AUTH_TYPE Auth type. Default is plain.

Database (Postgresql)

  • DATABASE_URL Full connection url with credentials (production).
  • DATABASE_DEVELOPMENT_URL Full connection url with credentials (development).
  • DATABASE_TEST_URL Full connection url with credentials (test).

Rails

  • RAILS_MASTER_KEY Master key used by Rails.

Endpoints

Go to wiki.

Schema

User            Usuário          --   Schema                     Validation
Name            Nome                  name                       min 13, only alphabetic. Only middle names can be preceded by whitespace
Password        Senha                 password
Email             -                   email                      yes, follows RFC standard

Report          Denúncia      
Description     Descrição             description (text)
Status          -                     status (string)
Latitude        -                     lat (decimal (10,6))
Longitude       -                     lng (decimal (10,6))
Response        Medida adotada        response (text)

Docker

https://github.com/pmop/studious-rotary-phone-docker

More information on the wiki.

studious-rotary-phone's People

Contributors

pmop avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.