Android app for a decentralized ethereum smart contract-based crowdfunding application.
Prerequisites: set up ganache-cli and truffle 1.1. Clone the solidity backend.
1.2 Run ganache-cli in one terminal and truffle migrate in another in the cloned directory.
1.3 Write down the contract address from truffle migrate and at least one of the accounts public and private keys from ganche-cli. They will be needed later.
2.1. Download apk from releases or build the application yourself how you typically would for android (The recommended method is by cloning it and building it via android studio).
2.2. Launch the downloaded application on an Android emulator or mobile phone.
2.3. Go to the settings:
- If running on emulator and
ganache-cliis hosted on localhost, set RPC url ashttp://10.0.2.2:8545 - Enter the previously copied contract address received from
truffle migrate - Log in with one of the accounts from the output of
ganache-cliwith a public and private key. - Save
2.4. Go back to feed and refresh (swipe down)
3.1. If you plan on developing this application further, you will also need to set up Web3j to automate data.sol.CrowdSourcing.java generation. This is how you would typically autogen that file with Web3j CLI: (note - this is assuming you are running it from the backend folder, you will have to change path to dCrowd's android app)
web3j generate truffle --truffle-json build/contracts/CrowdSourcing.json -o /pathTo/dCrowd/app/src/main/java/ -p com.arnasmat.dcrowd.data.sol- Web3j for interaction with smart contracts, files to interact with solidity (CrowdSourcing.java) autogeneration
- Kotlin
- Jetpack Compose & Material3 for UI
- Navigation3 for navigation (Wanted to test it out as it's newly released)
- Dagger-Hilt for Dependency Injection
- Coil for loading network images
- Jetpack DataStore for local storage
I do not like the codebase of this project. It's very heavily vibecoded as it was done with time constraints. Nonetheless, I believe it's an interesting prototype for a decentralized app, however a real app like this would function quite differently.