Rails REST API for Taskrly
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
config.ru

README.md

taskrly API

Basic

Back-end for taskrly. This API allows management of:

  • Users
  • Projects
  • Tasks
  • Comments

API

Login user (returns JWT token)

POST  /api/v1/auth

Create a user

POST  /api/v1/users

Get user info

GET   /api/v1/users/:id

Update user info

PUT   /api/v1/users/:id

Get all projects for a user (user determined by token in header)

GET   /api/v1/projects

Create a project and add user to it

POST  /api/v1/projects

Get project info

GET   /api/v1/projects/:id

Update project info

PUT   /api/v1/projects/:id

Get all tasks for a project

GET   /api/v1/projects/:project_id/tasks

Add a task to a project

POST  /api/v1/projects/:project_id/tasks

Get a task within a project

GET   /api/v1/projects/:project_id/tasks/:id

Update a task within a project

PUT   /api/v1/projects/:project_id/tasks/:id

Get all members in a project

GET   /api/v1/projects/:project_id/members

Add a user to project members

POST  /api/v1/projects/:project_id/members

Get all comments for a task

GET   /api/v1/tasks/:task_id/comments

Create a new comment for a task

POST  /api/v1/tasks/:task_id/comments

Stack

Rails, Postgres

Folder Structure

app/                        
  controllers/                Rails controllers
  models/                     Active Record models
bin/                          Rails management
config/                       Rails configuration
  database.yml                Configure Rails to use Postgres
  routes.rb                   Define REST endpoint to controller mapping
db/                           Database schema and migrations
lib/
  json_web_token.rb           JSON web token encoding/decoding
log/                          Rails logging
spec/                         Rspec tests and configuration
  models/                     Model tests
  requests/                   API tests
  support/                    
    authentication_helper.rb  Authenticates users for API tests
    factory_girl.rb           Create model instances for tests
  factories.rb                Factory Girl factory definitions
  rails_helper.rb
  spec_helper.rb              Rspec configuration
Gemfile                       Rails package dependencies
Rakefile                      Rake task configuration

Starting

rails s

This starts a Rails server at http://localhost:3000.

Testing

rake

This will run model and feature specs using Rspec testing framework.

License

MIT