Sign inSign up

dyallo/waifuland_api

By dyallo

•Updated 6 months ago

WaifuLand is a REST API that provides information about the anime world.

Image
API management
0

2.1K

dyallo/waifuland_api repository overview

⁠🎲 WAIFULAND-API

Codacy Badge

All Contributors

WaifuLand

WaifuLand is a REST API that provides information about the anime world. It is a project that is still in development, but it is already functional.

⁠🗒 About the project

  • The project is a REST API which gives random waifu images, they are uploaded to cloudinary and their public url is stored in mongodb
  • Learning throught documentation and breaking things
  • Expect many bugs and errors in the code
  • You are free to collaborate with the project or use it as you wish

⁠🚧 Routes

  • GET Grab a random image api/images
  • GET Grab an array of random images api/images?size=<Size>
  • GET Grab a random image api/images?tag_id=<tag_id>

⁠✍️ Examples

$ curl https://waifuland.jonathan.com.ar/api/images -H "Accept: application/json"
$ curl https://waifuland.jonathan.com.ar/api/images\?size\=5\&tag_id\=1 -H "Accept: application/json"

⁠📖 Status

  • Want to see how the project is going? check this -> Issue⁠

⁠🌐 Can I use the api?

  • Yes! is currently being hosted in DigitalOcean -> Get waifu⁠

⁠📚 Stack

  • Nodejs
  • Express
  • Typescript
  • Multer
  • Cloudinary
  • Mongodb
  • Mongoose

⁠🏗️ Build the project locally

Fill the fields in the .env.example

# App port
PORT=

# Your mongodb uri
DB_HOST=

# Your secret hash for signing petitions
TOKEN=

# Your cloudinary information
CLOUD_NAME=
CLOUD_API_KEY=
CLOUD_SECRET=
CLOUDINARY_URL=

# Rollbar information
ROLLBAR_TOKEN=
ROLLBAR_ENVIRONMENT=

>> cp .env.example .env

>> bun install

>> bun run dev

⁠🧱 Structure

  • User enters the page Login
  • Once user is logged into the page Token

⁠📁 Folders

📦src
┣ 📂app
┣ 📂common
┣ 📂image
┗ 📂user
┃ ┣ 📂dto
┃ ┣ 📂interfaces
┃ ┃ ┗ 📜user-interface.ts
┃ ┣ 📂schema
┃ ┃ ┗ 📜user-schema.ts
┃ ┣ 📜user-controller.ts
┃ ┣ 📜user-middleware.ts
┃ ┣ 📜user-repository.ts
┃ ┣ 📜user-routes.ts
┃ ┗ 📜user-service.ts

⁠📝 License

This project is under the MIT license. See the LICENSE⁠ for more information.

⁠🤝 Contribute

⁠Contributors ✨

Thanks goes to these wonderful people (emoji key⁠):

This project follows the all-contributors⁠ specification. Contributions of any kind welcome!

Tag summary

Content type

Image

Digest

sha256:df7fb38be…

Size

116.4 MB

Last updated

6 months ago

docker pull dyallo/waifuland_api