https://github.com/fabianoleittes/code-challenge-levee-ruby
🎓 Backend Engineer Code Challenge - Levee
https://github.com/fabianoleittes/code-challenge-levee-ruby
backend docker insomnia jwt postgresql rails ruby solid-principles tdd
Last synced: 6 months ago
JSON representation
🎓 Backend Engineer Code Challenge - Levee
- Host: GitHub
- URL: https://github.com/fabianoleittes/code-challenge-levee-ruby
- Owner: fabianoleittes
- License: mit
- Created: 2021-02-10T18:29:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-16T21:34:34.000Z (over 4 years ago)
- Last Synced: 2025-02-04T15:49:26.621Z (8 months ago)
- Topics: backend, docker, insomnia, jwt, postgresql, rails, ruby, solid-principles, tdd
- Language: Ruby
- Homepage:
- Size: 95.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Code challenge Levee API
Backend Engineer Code Challenge - Levee
Status: WIP
About •
Features •
How it works •
Tech Stack •
Author •
License## About
This project is a simple API for some `Job` routines, such as creating, listing, and activate.
---
## Features
- [x] Create job
- [x] List the all jobs
- [x] Activate the status for a specific job
- [x] List the percentage and number of active jobs by category.
- [x] JWT Token Based Authentication
- [x] API versioning
- [x] JSON Schema implementation
- [x] Setup scripts---
## How it works
This project is Restful API:
1. Backend### Pre-requisites
Before you begin, you will need to have the following tools installed on your machine:
[docker](https://docs.docker.com/install/), [docker compose](https://docs.docker.com/compose/install/), [Git](https://git-scm.com).In addition, it is good to have an editor to work with the code like [VSCode](https://code.visualstudio.com/)
#### Running the Backend (server)
```bash
# Clone this repository
$ git clone https://github.com/fabianoleittes/code-challenge-levee-ruby# Access the project folder cmd/terminal
$ cd code-challenge-levee-ruby# building the project
$ docker-compose build# Run the application in development mode
$ docker-compose up# The server will start at port: 3000 - go to http://localhost:3000
# Run tests in container
$ docker-compose run --rm api bin/rspec spec```
#### API Request
### Signup/Login
| URL / ENDPOINT | VERB | DESCRIPTION |
| ----------------------- | ---- | ---------------- |
| /v1/signup | POST | Create user |
| /v1/auth/login | POST | Generate token |### Jobs
| URL / ENDPOINT | VERB | DESCRIPTION |
| ----------------------- | ---- | ---------------- |
| /v1/jobs | POST | Create Job |
| /v1/jobs | GET | Returns all Job |
| /v1/jobs/:id | PUT | Update Job Status |
| /v1/category/:id | GET | List percentage |
---## Test endpoints `API` using Insomnia
---
## Tech StackThe following tools were used in the construction of the project:
#### **API** ([Ruby on Rails](https://rubyonrails.org/) + [PostgreSQL](https://www.postgresql.org/))
- **[rspec](https://github.com/rspec/rspec-rails)**
- **[Factory Bot](https://github.com/thoughtbot/factory_bot_rails)**
- **[Shoulda Matchers](https://github.com/thoughtbot/shoulda-matchers)**
- **[JWT](https://github.com/jwt/ruby-jwt)**
- **[ffaker](https://github.com/ffaker/ffaker)**
- **[Rack Cors](https://github.com/cyu/rack-cors)**> See more [Gemfile](https://github.com/fabianoleittes/mob2con-challenge-ruby/blob/main/Gemfile)
**Utilities**
- Commit Conventional: **[Commitlint](https://github.com/conventional-changelog/commitlint)**
- API Test: **[Insomnia](https://insomnia.rest/)**
---## Author
[](https://twitter.com/fabianoleittes) [](https://www.linkedin.com/in/fabianoleittes/)
---
## License 📝
This project is under the license [MIT](./LICENSE).
##### Made with love by Fabiano Leite 👋🏽 [Get in Touch!](Https://www.linkedin.com/in/fabianoleittes/)
---