Skip to content

Mister-Smiley/dragonball

 
 

Repository files navigation

Dragonball

dragonball

GitHub GitHub code size in bytes GitHub top language GitHub last commit GitHub stars

This is the dragon ball rest api, an idea to provide to anyone, relevant information about the anime. The application is compound of the following features:

  1. SSL support
  2. Data caching with Redis
  3. Clustering via pm2 package
  4. JWT authentication and routes protection
  5. Fancy OAPI Front-end
  6. Notifications through AWS's SES

As a side note endpoint tests via mocha and supertest packages were added for major robustness.

This is the list of endpoints currently available:

VerbResourceDescriptionScope
GET/swaggerSwagger UIPublic
POST/authAuthentication resourcePublic
GET/charactersGet the list of charactersPublic
GET/characters/:nameGet a single characterPublic
POST/charactersCreate a characterProtected
DELETE/characters/:idDelete a characterProtected
PATCH/characters/:idUpdate a characterProtected
GET/sagasGet the list of sagasPublic
GET/sagas/:nameGet a single sagaPublic
POST/sagasCreate a sagaProtected
DELETE/sagas/:idDelete a sagaProtected
GET/filmsGet a list of related filmsPublic
GET/films/:nameGet info about a single filmPublic
POST/filmsCreate a filmProtected
DELETE/films/:idDelete a filmProtected

There's a OAPI resource to test all the endpoints, you have to log yourself in in order to test those endpoints who are protected. This is how the swagger page looks like:

swagger

🚀 How to run it ?

Before doing anything you should clone the repo:

foo@bar:~$ git clone https://github.com/wwleak/dragonball.git

You should first install docker and docker compose by running:

foo@bar:~$ sudo apt-get install docker.io docker-compose

Then log into your docker hub account by typing:

foo@bar:~$ docker login

⚠️ Important

If for any reason, you come across with the following error while trying to log in (as i did) ...

`Error saving credentials: error storing credentials - err: exit status 1, out: `Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached``

... I could solve that by installing the following packages:

foo@bar:~$ sudo apt install gnupg2 pass

Finally run compose:

foo@bar:~$ docker-compose up

Enjoy life!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

📌 License

This project is licensed under the MIT License - see the LICENSE.md file for details

MADE WITH ❤ BY ABRAHAM

About

🐉 Dragon ball rest api

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%