Skip to content

Çağrı Gülbeycan Practice App Individual Contribution Report

Çağrı Gülbeycan edited this page May 12, 2023 · 5 revisions

Çağrı Gülbeycan, Group 1 - Disaster Response Platform.

Issues And Pull Requests:

API Research

Issues: 179

I have searched for an API for the practice-app development. I have Chosen GeoJs API. I think that the location information of the people who use the Disaster Response Platform might be useful. For instance, it might show the users close to the disaster area. This data might be useful in the future for analyzing the situation.

API Implementation

Issues: 220 193 194
Pull Requests: 163 187 192 198 218

I developed a class named GeoJsController in the controller package to handle user requests. I then forwarded the requests to the GeoJsService class within the service package so that the service layer could handle them. I developed a class called GeoJsData to hold the information from API responses. The IpList object, which is an entity, and IpListRepository repository were built by me. Data Access Objects (DAOs) were created using Spring Data JPA, while Hibernate served as Object Relational Mapping(ORM) with database PostgreSQL.

Utilized third party URIs:

You can see the GeoJs API page that I have used from here

The URI that I used is https://get.geojs.io/v1/ip, which accepts IP addresses as String. The GeoJs API is a service that accepts an HTTP request and returns a JSON that stores the relevant information about the IP address. I have added the necessary scripts so that users are able to send GET request to /get_info_from_ip endpoint, which uses GeoJs IP API in the backend. Also, users are able to send POST request to /saveIp endpoint so that they can store the previous IP addresses in the database. Furthermore, one can send GET request to /getIpList endpoint to fetch all stored IP addresses from PostgreSQL.

API Endpoints

GET /get_info_from_ip with request parameter ip:string. This API endpoint allows user to get the necessary information about an IP address.
POST /saveIp with request parameter ip:string. This API endpoint allows user to save the given IP address to the database.
GET /getIpList. This API endpoint allows user to fetch all saved IP addresses.

Unit Tests

This test is to check /get_info_from_ip with
image

This test is to check /saveIp Endpoint
image

Sample Calls:

http://localhost:4000/api/get_info_from_ip?ip=150.107.224.214
Response:
Header:
image

Body:
{ "country": "Turkey", "city": "Ankara", "timezone": "Europe/Istanbul", "latitude": "39.9282", "organization": "AS6718 Nav Communications Srl", "ipAddress": "150.107.224.214", "region": "Ankara", "longitude": "32.8564" }

http://localhost:4000/api/saveIp?ip=150.107.224.214
Header: image

Body: CREATED http://localhost:4000/api/getIpList?ip=150.107.224.214
Header:
image

Body: [ { "id": 1, "ip": "150.107.224.214" } ]

Significant Work

I have done some code reviews. Besides I have attended some discord meetings to help the process.

Challenges

The whole project was very challenging for me because I had no previous knowledge of Java Spring Boot and React. I suggested using Django for the project. However, many people in our team have previous experience with Java Spring Boot. Therefore, we went on with Java Spring Boot and React. Therefore, I have learned many things. The most challenging part was resolving conflict issues for pull requests until I got used to it. Then I can say building the project and opening it with docker was the most challenging part.

🏠 Home

Team Members

Cmpe451 Ind. Cont. Reports

Project Plan

Requirements

Refactored Mockups

Refactored UML Diagrams

  • ..

Milestone Reports for Cmpe451

Lab Reports

Communication Plan

Templates


Cmpe 352

Clone this wiki locally