- Clone this project:
git clone https://github.com/mario-r99/hackathon-2022.git
- Install Android Studio
- Open 'scanner' folder as project
- Build and run app on connected device or emulator
- scanner\app\src\main\java\com\hackathon2022\scanner\ThirdFragment.kt
- val serverUrl: Server URL for connection to Blockchain API Server
- var latitude: Default latitude for smartphone location
- var longitude: Default longitude for smartphone location
- Install Visual Studio Code
- Install Python version 3.8
- Open 'server' folder in VS Code
- Start run script:
python server.py
- Set up the needed configuration to connect to the blockchain in config.yaml file.
- Optional: Install Postman for Debugging HTTP requests
- server\utils.py
- token: API token for connection to InfluxDB Cloud
- org: InfluxDB organization
- bucket: Default InfluxDB bucket
- url: URL for connection to InfluxDB Cloud
- default_coords: Default coordinates for geolocation check
- Install Ganache
- Install NodeJS for node package manager (npm)
- Install Truffle:
npm install truffle
- To connect Truffle smart-contract building with Granache Blockchain use the truffle-config.js file.
- Build contracts:
truffle migrate
- InfluxDB runs currently on AWS Cloud
- Can also be hosted on any device, just URL and token has to be updated