- Database : MySQL
- API : Python, Django
- Web app : JavaScript, React, JSX
- Mobile app : JavaScript, React-Native, TypeScript
- infra/build.sh: builds image from Dockerfile
- infra/run.sh: runs container from an already built image
- cd ./apartments-listing
- sh ./db/infra/run.sh # wait for 1 min for db to start
- sh ./api/infra/build.sh
- sh ./api/infra/run.sh
- sh ./prep_db.sh
- sh ./web/infra/build.sh
- sh ./web/infra/run.sh
add apartment with json post request body | /app/apartments - [POST]
curl --request POST --url http://127.0.0.1:8000/app/apartments --data '{"number": 33, "floor":44, "building":22, "city":"Cairo", "area_m2":200, "price":4444.44, "description": "nice one"}'
get all apartments | /app/apartments - [GET]
curl --request POST --url http://127.0.0.1:8000/app/apartments
get a single apartment - apartments/1 | /app/apartments/<apartment-id> - [GET]
curl --request POST --url http://127.0.0.1:8000/app/apartments/1
- The app uses a WebView component (react-native-webview) to implement the interface
- All code is within App.tsx
- This strategy was followed to take advantage from the React web app already implemented
- To run successfully run it, change the IP address in the WebView component to the WLAN IP of the connected machine
- This will allow it to connect to the React app hosted on the machine
- cd apartments-listing
- Run sh ./mobile/infra/build.sh
- Run sh ./mobile/infra/run.sh #you'll be directed to a shell session within the container
- Connect your device via USB
- Check connection by running 'adb devices'
- cd into the app's directory
- run npm run android (or IOS)
- run npm start