|
12 | 12 |
|
13 | 13 | A sample food delivery application for a coffee shop. |
14 | 14 |
|
15 | | -🚧 I'm currently updating it to MVVM and using my own API instead of Firebase. 🚧 |
16 | | - |
17 | 15 | ## Features |
18 | 16 |
|
19 | 17 | - 100% Kotlin. |
20 | | -- MVP architecture. |
| 18 | +- MVVM architecture. |
21 | 19 | - Retrofit with Coroutines |
22 | 20 | - Room for local data storage. |
23 | | -- Firebase Authentication for Authentication. |
24 | | -- Firebase Cloud Firestore for remote database. |
25 | | -- Firebase Cloud Messaging for notifications. |
26 | | -- Firebase Crashlytics for crash reporting. |
27 | | -- Mpesa payment |
| 21 | +- Google Sign In or password Authentication. |
| 22 | +- Firebase messaging for notifications. |
| 23 | +- Sentry for error logging. |
| 24 | +- Koin for dependency injection. |
| 25 | +- M-Pesa payments. |
28 | 26 |
|
29 | | -## Cloning |
| 27 | +## Prerequisites |
30 | 28 |
|
31 | | -1. Clone the repository |
32 | | -2. Create a `keys.properties` file based on`keys.properties.sample`. |
| 29 | +### Firebase Project |
| 30 | + |
| 31 | +Used for messaging. |
| 32 | + |
| 33 | +1. Create an project on [Firebase](https://console.firebase.google.com/). |
| 34 | +2. Add an application `com.marknkamau.justjava.debug`. |
| 35 | + |
| 36 | +### GCP project |
| 37 | + |
| 38 | +Used for maps when adding a delivery address. |
33 | 39 |
|
34 | | -- Follow the deploy instructions for [JustJava-CloudFunctions](https://github.com/MarkNjunge/JustJava-CloudFunctions) |
35 | | - to get an api Key. If you don't want to use M-Pesa, you can leave the `API_KEY` as is. |
| 40 | +1. Go to the [GCP console](https://console.cloud.google.com) and switch to the project created by Firebase (or any other). |
| 41 | +2. Enable _Maps SDK for Android_ and _Places API_ in [API Library](https://console.cloud.google.com/apis/library). |
| 42 | +3. Take note of the API keys (AIza...) in [credentials](https://console.cloud.google.com/apis/credentials) or create one yourself. |
36 | 43 |
|
37 | | -3. Create a Firebase project and enable Email/Password sign in. Add three applications `com.marknkamau.justjava`, `com.marknkamau.justjava.debug` and `com.marknkamau.justjavastaff`. Add the `google-service.json` file to `/app` and `/justjavastaff`. |
| 44 | +**NB:** If you use your own API endpoint, you will need to change the `googleClientId` in [`/app/build.gradle`](/app/build.gradle#L24) |
| 45 | + |
| 46 | +### Sentry (optional) |
| 47 | + |
| 48 | +Used for error logging. |
| 49 | +It is only used in `release` builds. |
| 50 | + |
| 51 | +1. Create a project on [Sentry](https://sentry.io/) |
| 52 | +2. Take note of the project's DSN. _[Where can I find my DSN?](https://forum.sentry.io/t/where-can-i-find-my-dsn/4877)_ |
| 53 | + |
| 54 | +## Installation |
| 55 | + |
| 56 | +1. Clone the repository |
| 57 | +2. Create a `keys.properties` file based on`keys.properties.sample`. |
| 58 | +3. Add the `play-services.json` file from firebase to `./app`. |
38 | 59 | 4. Open and build in Android Studio. |
39 | 60 |
|
40 | 61 | ## Screenshots |
|
0 commit comments