Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricardoliveira5ro/pathwayapi
PathwayAPI is designed to help users create, manage and track personalized roadmaps breaking them down into manageable steps
https://github.com/ricardoliveira5ro/pathwayapi
devise devise-jwt jsonapi-serializer postgresql restful-api ruby ruby-on-rails
Last synced: about 1 month ago
JSON representation
PathwayAPI is designed to help users create, manage and track personalized roadmaps breaking them down into manageable steps
- Host: GitHub
- URL: https://github.com/ricardoliveira5ro/pathwayapi
- Owner: ricardoliveira5ro
- Created: 2024-06-24T21:24:14.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-29T21:17:55.000Z (4 months ago)
- Last Synced: 2024-10-10T04:43:02.830Z (about 1 month ago)
- Topics: devise, devise-jwt, jsonapi-serializer, postgresql, restful-api, ruby, ruby-on-rails
- Language: Ruby
- Homepage: https://pathwayapi.onrender.com/api/v1/
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PathwayAPI
PathwayAPI is a robust and flexible RESTful API designed to help users create, manage, and track personalized roadmaps for achieving various goals. It enables users to follow predefined roadmaps or create their own custom plans, breaking them down into manageable steps with detailed descriptions, deadlines, and progress tracking.
`pathwayapi.onrender.com/api/v2/` hosts a public instance of the API.
> [!WARNING]
> The first request may take up to 60 seconds due to tier restrictions. (Subsequent requests will be normalized)## 🚀 Getting Started
This section will guide you through using PathwayAPI, including how to authenticate and access the available features.
#### 🔐 Authentication / Authorization
Each endpoint requires prior authentication based on bearer token. This token can be obtained after signing up and/or logging in as returned header. The token has 30 days expiration date.
**POST** /signup
```
{
"user": {
"email": "[[email protected]]",
"password": "[your-password]",
"name": "[your-username]"
}
}
```**POST** /login
```
{
"user": {
"email": "[[email protected]]",
"password": "[your-password]"
}
}
```
In the response headers you will see you got your **authorization token** that will be needed in every request you make to the available endpoints.#### 📍 Endpoints
**GET** /roadmaps
**GET** /roadmaps?per_page=2&page=1 (paginate response)
**GET** /roadmaps/:id**DELETE** /roadmaps/:id
**POST** /roadmaps
**PUT** /roadmaps/:id
```
{
"roadmap": {
"title": "First Roadmap",
"description": "First description of the new roadmap",
"category_ids": [2,6],
"steps_attributes": [
{
"title": "First Step",
"description": "First Step Description",
"order": 1
}
]
}
}
```
*steps_attributes* is **optional** and in update action (PUT /:id) it **appends to existent steps**, it does not override unlike the other fields**GET** /roadmaps/:id/steps
**POST** /roadmaps/:id/steps
```
{
"step": {
"title": "Step title",
"description": "Step description",
"order": 1
}
}
```**POST** /roadmaps/:id/steps/batch_steps
```
{
"steps": [
{ "title": "Step 1", "description": "Description 1", "order": 1 },
{ "title": "Step 2", "description": "Description 2", "order": 2 },
{ "title": "Step 3", "description": "Description 3", "order": 3 }
]
}
```---
**GET** /categories
**GET** /categories/:id---
**GET** /steps/:id
**PUT** /steps/:id
```
{
"step": {
"title": "Step title",
"description": "Step description",
"order": 1
}
}
```---
**POST** /steps/:id/tracker
```
{
"tracker": {
"completed": true
}
}
```
## 💻 Technical Details
This section is for the developers who want to explore the technical characteristics of the API.
#### 🛠️ Tech stack
* Ruby (v3)
* Ruby on rails (v7)
* Postgresql
* devise (gem)
* devise-jwt (gem)
* will_paginate (gem)#### 🚀 Run
* Run `bundle install`
* Create the user/role in your local postgres database
* Edit your *database.yml* to include your local database information provided by your keys in *credentials.yml.enc*
* Run `rails db:create` and `rails db:migrate` (every time there is a change in your schema)
* Edit your *seeds.rb* file to include any preloaded data and run `run db:seed`
* Start the server `rails s`#### 💭 Considerations
* Postgre database hosted in *neon.tech*
* Webservice hosted in *render.com*
* All endpoints were tested with *Postman*