Skip to content

SevlaMare/TrackDayAPI

Repository files navigation

Track Day API

This is the backend to track day app.

screenshot

A project made to practice all core concepts of building APIs, such as having endpoints, authorization with tokens and tests


A full-featured API.

Content

Documentation

Base URL

https://trackday-api.herokuapp.com/api/v1/

End Points

  • Create an account and receive a token
    /users
    POST, params: username, password

  • Log in and receive a token
    /sessions
    POST, params: username, password

  • Retrieve all measures (Categories like)
    /measures
    GET, no token required

  • Create new measurement
    /measurements
    POST, params: value, measure_id
    Header: Authorization Token

Requirements

  • Draw schema
  • Auth with JWT Tokens
  • Handle CORs
  • Encrypt password
  • Deploy

Requisites

Install

You will need to install:

Get a local copy

Get a local copy, if you are using Git:

git clone git@github.com:SevlaMare/TrackDayAPI.git

Otherwise just hit (Download Zip) on the green button (Code) at top of this page.

Setup

Install all dependencies with:

bundle install

Setup database with:

rake db:schema:load

Populate the database with defaults using:

rails db:seed

Run Tests

rspec

Run App

rails server

Now is available on the browser
http://localhost:3000

Possible improvements

  • Middle table for fast queries
  • Includes admin

Built With

  • Ruby and Ruby On Rails
  • Postgres
  • Rspec
  • ESlint and Rubocop (Linters)
  • GitHub Actions (CI Tool)
  • Heroku (Server and CD Tool)
  • Git, Github and VScode

Contributing

Contributions, issues and feature requests are welcome!
You can do it on issues page.

Acknowledgments

A special thanks to the code reviewers.

Author

👤 Thiago Miranda

License

MIT

Releases

No releases published

Packages

No packages published

Languages