GithubHelp home page GithubHelp logo

gitkodev / pokemon-api Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 6.33 MB

:unicorn::lion::monkey_face: Pokedex REST API created with GO and PostgreSQL

Go 97.61% Makefile 2.15% Dockerfile 0.24%
clean-architecture docker go golang golang-api-examples pokedex-api pokemon rest-api mock-testing

pokemon-api's Introduction

Go Pokedex REST API

Nest Logo

Pokedex REST API allows users to keep track of caught pokemon and their stats: TYPE, HP, ATTACK, and DEFENSE. The API utilizes JWT authentification for additional security as well as a number of other tools (look below). The projects structure implements clean architecture and dependecy injection principles

Endpoints

API

  • /v1/pokemon   =>POST=>   Add pokemon
  • /v1/pokemon   =>GET=>   Get all pokemon
  • /v1/pokemon/{id}   =>GET=>   Get pokemon by id
  • /v1/pokemon/{id}   =>PUT=>   Update pokemon by id
  • /v1/pokemon/{id}   =>DELETE=>   Delete pokemon by id

Other

  • /health   =>GET=>   Ping the database connection
  • /auth/sign-up   =>POST=>   Create new pokemon trainer
  • /auth/sign-in   =>POST=>   Sign in with existing profile to generate JWT authentification token

Tools used

  • App configuration   =>   Viper
  • Logging   =>   Logrus
  • Routing   =>   Chi
  • Database   =>   Postgres + pgx
  • Database migrations   =>   Goose
  • Containerization   =>   Docker + Docker Compose
  • Authentification and middleware   =>   JWT Go
  • Testing   =>   Sqlmock + Gomock + Testify

Installation

make initUp

Running the app

# rebuild containers
make build

# start the app
make run

# run psql utility
make startPsql

pokemon-api's People

Contributors

gitkodev avatar

Stargazers

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