Skip to content

brunodsazevedo/marketspace

Repository files navigation

Marketspace

License

[README PORTUGUESE-BR VERSION]

💻 Project

Marketspace is a mobile application for buying and selling new and used items.

🚀 Technologies

This project was developed with the following technologies:

  • Expo
  • React Native
  • TypeScript
  • Axios
  • NativeWind
  • React Native Async Storage
  • React Query
  • Expo Router
  • React Native Gesture Handler
  • React Native Reanimated
  • Yup

📋 Prerequisites

  • NodeJS >= 20.0
  • yarn
  • Android Studio (Optional)
  • Xcode (macOS only - optional)

⚙️ Running the Project

  1. Install the project dependencies using yarn

    yarn
  2. Configure the local API

    NOTE: The application consumes a REST API for operations such as sign in, sign up, product registration, product listing, etc. At the moment, the backend API is not hosted. To use the application locally, download and use this repository.

  3. Adjust the axios base URL

    Before running and opening the application, if you are running the API locally, you will need to adjust the axios base URL according to your IP.

    On Linux systems:

    ip a

    Look for the network interface you are using (usually eth0 for wired connections and wlan0 or wlp2s0 for wireless connections). The IP address will be listed under inet.

    On Windows systems:

    ipconfig

    Look for the active network connection (Ethernet adapter for wired connections or Wireless LAN adapter for wireless connections). The IP address will be listed as "IPv4 Address".

    On macOS systems:

    ifconfig

    Look for the network interface you are using (en0 for wired connections and en1 or en0 for wireless connections). The IP address will be listed under inet.

  4. Update the axios configuration

    Open the file src/services/api/api-config.ts and update the base URL on line 19 with your IP acquired from the commands suggested above:

    const api = axios.create({
      // Insert your IP here
      baseURL: 'http://192.168.1.130:3333',
    }) as ApiInstanceProps
  5. Run the application

    npx expo start

    If everything is configured correctly, you will see a screen like this in your terminal: Expo Terminal

  6. Opening the application

    • Physical Device: If you have the Expo Go app on your device (Android or iPhone), scan the QR Code to open the app.
    • Emulator: To open in the emulator, press the corresponding key for the emulator you want to open ("a" for Android, and "i" for iOS).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published