Study Time Track App Backend is a back-end API, which provides data to the Study-Time-Track-Frontend which is an app that allows the user to register the time he/she spends on a given task.
-
It allows the users to register and log in using a username and password.
-
Authorization managed with JWT token so the user session persists.
-
The user can create a study session and add study subjects and the time she/he spent studying it to that particular session.
-
The user can check each session.
-
The user can get the latest and longest sessions, and top 5 most studied subjects.
- Ruby v3.0.0
- Ruby on Rails v6.1.3.1
- PostgreSQL
- JWT
- Heroku for deployment
- Tests with RSpec, FactoryBot, Faker, Database Cleaner, and Shoulda Matchers
Study-Time-Track-App: Live version Hosted on a Heroku free account, it may take a while to load.
To get a local copy up and running follow these simple steps.
Clone the repo with:
https://github.com/ferbaco86/study-time-track-backend.git
Install gems with:
bundle install
Setup database with:
rails db:create
rails db:migrate
Start server with: (localhost:3000)
rails server
User Login:
/login
User creation:
/users
Session creation:
/sessions
Subject creation:
/subjects
Get the logged user:
/auto_login
Get the longest session (Session with the highest subjects accumulated time):
/longest/:id
Get the latest session:
/latest/:id
Get the top 5 most studied subjects(Subjects with the highest time values):
/top/:id
Get the specified user:
/users/:id
Get the specified session:
/sessions/:id
To run all tests use this command:
bundle exec rspec
To run only model tests run this instead:
bundle exec rspec spec/models
For requests tests only, execute this:
bundle exec rspec spec/requests
👤 Fernando Bahamondes
- Github: @ferbaco86
- Twitter: @ferbac0
- Linkedin: linkedin
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
Test Driven Development of a RESTful JSON API With Rails by Uduak Essien
This project is MIT licensed.