Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jd-apprentice/waifuland-api

❤️ Waifuland API - Get random waifus!
https://github.com/jd-apprentice/waifuland-api

cloudinary express mongodb multer nodejs typescript

Last synced: about 2 months ago
JSON representation

❤️ Waifuland API - Get random waifus!

Awesome Lists containing this project

README

        

# 🎲 WAIFULAND-API

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/a1af9f77714c498282b102bfb0fd7bf3)](https://app.codacy.com/gh/jd-apprentice/waifuland-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)

![WaifuLand](https://user-images.githubusercontent.com/68082746/155921172-311bb682-cfed-494f-89c5-371e22ac25a6.gif)

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=`
- `GET` Grab a random image `api/images?tag_id=`

## ✍️ Examples

```bash
$ 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"
```

## 📚 Stack

- Bunjs
- Express
- Typescript
- Multer
- Cloudinary
- Mongodb
- Mongoose
- Rollbar
- Husky

## 🏗️ 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](https://user-images.githubusercontent.com/68082746/164032923-64c5d286-e232-478f-b121-39d28b71b416.png)
- Once user is logged into the page
![Token](https://user-images.githubusercontent.com/68082746/164033037-6191489e-3561-46b3-a0c4-7324faf9abb7.png)

## 📁 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](./LICENSE) for more information.

## 🤝 Contribute

- For more information, check the [CONTRIBUTE](./CONTRIBUTE.md) file

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Jonathan Dyallo

💻 ⚠️ 📖 🚧

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!