ShopStop is a mobile application to make organizing shopping easier!
Getting started • Running tests • Deployment • License • Links
Our application is divided into two main parts, a React Native frontend and a Django backend.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.x
- NodeJS
- pip (Included by default on python 3.4 or later)
- yarn
# Clone this repository
$ git clone https://gitlab.stud.idi.ntnu.no/tdt4140-2020/67.git
# Navigate to the backend folder
$ cd 67/shopstop_backend
# Install the required python dependencies
# If you are running Windows and this step fails, remove "uWSGI" from requirements.txt and try again
$ pip install -r requirements.txt
# Migrate the database
$ python manage.py migrate
# Run the server
$ python manage.py runserver IPADDRESS:8000
Where IPADDRESS
is the IPv4 address of your machine.
ENV.dev.apiUrl
in 67/shopstop-frontend/environment.js to IPADDRESS:8000
.
If you have trouble setting up the backend locally, you can change ENV.dev.apiUrl
in 67/shopstop-frontend/environment.js to https://staging.shopstop.xyz/
though this is not recommended.
# Install expo-cli globally
$ npm install -g expo-cli
# Navigate to the frontend folder
$ cd 67/shopstop-frontend
# Install the node dependencies
$ yarn
# Start the Expo server
$ yarn start
The console should now show a QR code.
- If you are using an Android device, you can scan the QR code using the expo app for android.
- If you are using an Iphone you can scan the QR code using your Apple Camera App, but you need the expo app for Iphone installed.
# Navigate to the frontend folder
$ cd 67/shopstop-frontend
# Run the linter
$ yarn lint
# Some problems are fixable using
$ yarn lint --fix
# Navigate to the backend folder
$ cd 67/shopstop_backend
# Run the linter
$ flake8 shopstop
# Navigate to the backend folder
$ cd 67/shopstop_backend
# Run the test suite
$ coverage run --source="shopstop" manage.py test
# Get report of the tests ran
$ coverage report
This project utilizes the continuous deployment features of gitlab.
- When a branch is merged into the develop branch, the backend will be built and deployed to https://staging.shopstop.xyz/.
- When the develop branch is merged into the master branch, the backend will be built and deployed to https://shopstop.xyz/.
The frontend must be distributed manually. By using expo publish you can get an .apk or .ipa depending on if you want to distribute on Android or Iphone, which can be published on their respective app store. Whenever you run expo publish
the .apk or .ipa will get the updated version with OTA (over-the-air) updates, which means you do not need to redistribute the application.
This project is distributed under the MIT license
- Wiki
- Download on Google Play Store
- Backend API documentation