Git Product home page Git Product logo

milhasapi's Introduction

โœˆ๏ธ Milhas API

Docker Linux Spring MySQL Git VSCode

Aimeos logo

The goal is to provide information and resource related to possible travel destinations, showing photos, texts and also resources about testimonials from other travelers. In addition to integrating AI into your application.



๐Ÿ” Table Of Content

๐Ÿ“œ About

API in development to the 7th Back-end Challenge of Alura.

Used Technologies:

  • Language: Java
  • Framework: Spring Boot
  • Migration Tool: Flywaydb
  • Documentation: SpringDoc Swagger
  • OpeanAI Integration: openai-java
  • Other libraries: Lombok, DataFaker
  • Database: MySQL
  • Development environment: Docker
  • Code Editor: VS Code

๐ŸŽฏ The Challenge

In this 7th Backend challenge, we are going to develop an API that will be integrated with Frontend. Our challenge is to provide information and resources from the database related to possible travel destinations, displaying photos and eye-catching text that encourages the user to want to visit that destination.

In addition, we will also provide resources on testimonials from other travelers and, finally, we will integrate AI into our application.

Project steps

  • First Week

    • Testimonial CRUD Create /depoimentos endpoint to perform CRUD operations.
    • Random Testimonials: Create depoimentos-home endpoint to show 3 random testimonials
    • CORS Enable CORS request from any origin on the development phase.
    • Test Verify the status code of GET, POST, PUT, DELETE of /depoimentos endpoint
  • Second Week

    • Destination CRUD Create /destinos endpoint to perform CRUD operations.
    • Search Destination by name.
    • Test destinos endpoint
  • Third and Fourth Week

    • Update destinos endpoint with the fields
      • id
      • Photo 1
      • Photo 2
      • Name
      • Meta (max 160 characters)
      • Description text (optional)
    • /destinos/{id} endpoint should retrieve
      • Photo 1
      • Photo 2
      • Name
      • Meta
      • Description text
    • AI integration to generate description about destination, in case of some destination has no description
    • Test destinos endpoint

๐Ÿ‘ฃ Walkthrough

Check my steps to develop this project here

๐Ÿ“œ API Doc

This projects uses SpringDoc (Swagger) to generate API documentation. You can check it by runing the project and accessing swagger-ui

๐Ÿš€ Running locally

# clone the repository
git clone https://github.com/ecureuill/milhasapi.git

# Navigate to the cloned directory
cd milhasapi

MilhasAPI uses MySQL as the database. Create a MySQL database, named milhasapi and update the database configuration in src/main/resources/application.properties file:

spring.datasource.url=jdbc:mysql://[URL]:[PORT]/milhasapi
spring.datasource.username=[USERNAME]
spring.datasource.password=[PASSWORD]

MilhasAPI is integrated to ChatGPT to generate destination description. Create an API key on openai platform and export it as environmet variable.

export OPENAI_KEY=123

Run the project

mvn spring-boot:run

To use this API, you can make HTTP requests to the provided endpoints using tools like cURL or Postman.

milhasapi's People

Contributors

ecureuill avatar logikasciuro avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.