Giter Club home page Giter Club logo

pokedex's Introduction

Pokedex

A small Pokedex Rest API that serves data to a web application providing a list of Pokemons and their corresponding details.

In this project I have tried to follow DDD and hexagonal architecture. Note that I have decided to place the repository interface in the domain, based on the idea that the repository is a fundamental part of the domain and that its interface is a contract that defines the data persistence operations necessary to fulfil the domain requirements. However, if we wanted to follow ports and adapters, we could define the interface in the application layer, in the output ports package, and in the infrastructure we could define the adapter within the repository package.

I am using Java 17 and Spring Boot 3.1.1 to develop the project.

How To Start

Executing docker compose up a mysql and the application will be up with a few pokemons migrated with Flyway.

There is a Swagger at http://localhost:8080/swagger-ui.html.

Next Steps

  • As a first approach, since the database has a few pokemons, I am not using pagination. It would be convenient to use pagination with a larger database, in order to avoid the Spring Data findAll anti-pattern we are using by returning all pokemons.
  • We could put some endpoints together, such as /pokemons and /pokemons/search, but in order to keep it simple, and also to provide greater clarity and separation of responsibilities, I have opted for this option first, considering the most important thing that the API is easy to understand, use and maintain. Putting it together would not avoid this, but it would need to be properly documented how it should be used, and more so if filters could grow in the future.
  • If we wanted for example to search for pokemons that have more combar power, we could add to the criteria filters an operator field, to distinguish when we want to search for the same or similar strings; for higher, lower or equal numbers...

pokedex's People

Contributors

pabloaguilarmartinez 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.