Skip to content

A react native application using authentication through an API rest.

License

Notifications You must be signed in to change notification settings

BinaryLeo/react_native_petlover

Repository files navigation

PetLovers

Welcome to my animal adoption mobile application project! This is a small React Native application that allows users to authenticate using a RESTful API, list available animals for adoption, and view details of individual animals. The application was developed as part of a coding challenge and is publicly available on Github. Feel free to download and use the code as a reference for your own projects.

Thank you for your interest in my project!

License GitHub last commit GitHub top language

rsz_whatsapp_image_2023-04-24_at_0010181

Skills

Video signIn Filter Pet List Details
live.mp4

Dependencies

State management:

yarn add @reduxjs/toolkit
yarn add react-redux
yarn add @types/react-redux -D

Component:

yarn add @react-native-picker/picker

Navigation:

yarn add @react-navigation/native
yarn add @react-navigation/stack
yarn add react-native-gesture-handler
yarn add react-native-reanimated
yarn add react-native-safe-area-context

Styling:

yarn add styled-components
yarn add @types/styled-components-react-native
yarn add react-native-svg
yarn add react-native-svg-transformer

API Requests:

yarn add axios

Testing:

npx expo install jest-expo jest

Endpoints

SignIn
url: {baseURL}/auth/signin
tipo: POST
corpo: {
  "username": "username ...",
  "password": "password"
}
resposta:
{
    "token": "...",
    "type": "Bearer"
}
Categories and animals
url: {baseURL}/categories
tipo: GET
cabeçalhos:
  - Authorization
resposta:
[
    {
        "name": "Weimaraner",
        "id": "1"
    },
    ...
]
url: {baseURL}/animals
tipo: GET
cabeçalhos:
  - Authorization
resposta:
[
    {
        "id": "1",
        "categoryId": "1",
        "name": "Oriental",
        "age": 7,
        "img": "http://loremflickr.com/640/480/animals?lock=1"
    },
    ...
]

Details

url: {baseURL}/animals/{id}
tipo: GET
cabeçalhos:
  - Authorization
resposta:
{
    "id": "1",
    "categoryId": "1",
    "name": "Oriental",
    "age": 7,
    "img": "http://loremflickr.com/640/480/animals?lock=1",
    "description": "...",
    "phone": "+55 77 7609-0427",
    "email": "kenja@att.net"

} 
``