Skip to content

This is a challenge to test your skills on building APIs.The ClickBus serivices use mainly Java and Springboot technologies.However, you can use language and framwork that you feel more confortable.

Notifications You must be signed in to change notification settings

NathanaelSantos/ClickBus-Placeservice-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

clickbus-destaque


Backend Developer Challenge

This is a simple challenge to test your skills on building APIs.The ClickBus serivices use mainly Java and Springboot technologies.However, you can use language and framwork that you feel more confortable.

What to do

Create a simple API to manage places (CRUD).This API should allow to:

- Create a place
- Edit a placa
- Get a specific place
- List places and filter them by name
A place must have the following fields:

- name
- slug
- city
- state
- created at
- update at

Requirements

- All API responses must be JSON
- Provide a README.md file with usage instructions(how to run, endpoints etc)
- Provide a testing environment(docker, etc)

Recommendations

- Tests, tests and tests
- SOLID
- Code and commits in english(methods, classes, variables, etc)

Evaluation

- Project structure, architecturing and organization
- Programming good practices
- VCS practices

Delivery

You musk fork this repository and commit the solution in the solution folder.Your repository must be public.After that, send the repository link on the kenoby platform


🚀 Technologies Used

This project was developed with the following technologies:

  • Spring Boot
  • Spring Webflux
  • Spring Data + R2DBC

external-patterns-data-analytics-flaticons-flat-flat-icons Patterns Used

The following design patterns were used in this project:

  • SOLID
  • Integration tests

💻 How to Run the Project

To run this project locally, follow these steps:

  1. Clone the git repository to your local machine using git clone.
  2. Navigate to the project folder and run the command mvn spring-boot:run to start the application.
  3. The API will be available at localhost:8080.

api API Endpoints

To make HTTP requests, you can use the httpie tool, Postman, or any other of your preference.

api-docs-swagger

Screenshot 2024-05-28 213755

Screenshot 2024-05-10 215951

Here is an example of how to make a POST request to the /places endpoint:

http POST :8080/places name="Place Name" state="State"

🧪 Testes do PlaceService

Os testes do PlaceService são escritos usando JUnit 5 e o WebTestClient do Spring Boot.

Screenshot 2024-05-10 222445

docker Docker

  1. Project Compilation

    The following command is used to compile the project and package the result into a JAR file:

    ./mvnw clean package
  2. Building the Docker Image

    The following command is used to build a Docker image of the project using the Spring Boot:

    ./mvnw spring-boot:build-image
  3. Running the Docker Image

    The following command is used to run the Docker image:

    docker run --name placeservice -p 8080:8080 -d placeservice:0.0.1-SNAPSHOT

    This will start a Docker container named placeservice, map the container's port 8080 to the host's port 8080, and run the container in the background.

Screenshot 2024-05-10 225605

About

This is a challenge to test your skills on building APIs.The ClickBus serivices use mainly Java and Springboot technologies.However, you can use language and framwork that you feel more confortable.

Topics

Resources

Stars

Watchers

Forks

Languages