[README PORTUGUESE-BR VERSION]
Marketspace is a mobile application for buying and selling new and used items.
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
- NodeJS >= 20.0
- yarn
- Android Studio (Optional)
- Xcode (macOS only - optional)
-
Install the project dependencies using
yarn
yarn
-
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.
-
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 andwlan0
orwlp2s0
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 orWireless 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 anden1
oren0
for wireless connections). The IP address will be listed under inet. -
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
-
Run the application
npx expo start
If everything is configured correctly, you will see a screen like this in your terminal:
-
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).