Code Monkey home page Code Monkey logo

goodnight-api's Introduction

GOODNIGHT-API

a simple api app to track sleep time

Features

  • User Create and Index
  • Users can Follow And Un-follow Each Other
  • Users can Clock-In and Clock-out to track sleep time
  • Users can view friends previous week's sleep time records in order of sleep duration

Technologies and Gems used

  • Ruby on Rails (Ruby: 3.2.2, Rails: 7.0.4.3)
  • Test: rspec, factory_bot_rails, shoulda-matchers
  • Database: Postgres 14

How to run locally

  • Ensure Ruby on Rails, Postgres, Git and other prerequisites are installed properly
  • You can use your desired poster to connect to api
# Clone Repository
git clone [email protected]:mfcruz/goodnight-api.git

# Go to Folder
cd ./goodnight-api

# Run bundle to install dependencies
bundle

# Create Database
rails db:create

# Run migration
rails db:migrate

# Start the server
rails s

Run Specs

bundle exec rspec

APIs List

No. End Point Request Type Description
1. /api/v1/users?name="NAME" POST Create User
2. /api/v1/users GET List Users
3. /api/v1/users/:user_id/follow/:followee_id POST Follow User
4. /api/v1/users/:user_id/unfollow/:followee_id DELETE Un-Follow User
5. /api/v1/users/:user_id/followees/sleep_records GET User's Followees' Last Week Sleep Time Records
6. /api/v1/users/:user_id/sleep_times/clock_in POST Clock In Event
7. /api/v1/users/:user_id/sleep_times/clock_out PATCH Clock Out Event

TODO

  • User authentication
  • Services for next version

goodnight-api's People

Contributors

mfcruz avatar

Watchers

 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.