Skip to content

Commit 68c60af

Browse files
authored
Monorepo with website and mobile (#49)
* feat: add google sign in * build: increment minor number * refactor: put mobile app in mobile/ folder * refactor: update workflow to work with new subdirectory * refactor: remove unused variable for analyze to work * feat: add website, set up CI/CD for firebase hosting Also set up firebase hosting target
1 parent 8d4cb96 commit 68c60af

143 files changed

Lines changed: 1233 additions & 292 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.firebaserc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"projects": {
33
"default": "financial-planner-72109"
4+
},
5+
"targets": {
6+
"financial-planner-72109": {
7+
"hosting": {
8+
"website": ["financial-planner-72109"]
9+
}
10+
}
411
}
512
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- release
9+
paths:
10+
- "website/**"
11+
- ".github/workflows/firebase-hosting-merge.yml"
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: FirebaseExtended/action-hosting-deploy@v0
18+
with:
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FINANCIAL_PLANNER_72109 }}
21+
channelId: live
22+
projectId: financial-planner-72109
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy to Firebase Hosting on PR
2+
on:
3+
pull_request:
4+
paths:
5+
- "website/**"
6+
- ".github/workflows/firebase-hosting-pull-request.yml"
7+
permissions:
8+
checks: write
9+
contents: read
10+
pull-requests: write
11+
jobs:
12+
build_and_preview:
13+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: FirebaseExtended/action-hosting-deploy@v0
18+
with:
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FINANCIAL_PLANNER_72109 }}
21+
projectId: financial-planner-72109

.github/workflows/flutter.yaml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
61
name: Flutter
72

8-
on:
9-
["pull_request"]
3+
on: ["pull_request"]
104

115
jobs:
126
analyze:
@@ -25,9 +19,11 @@ jobs:
2519

2620
- name: Install Dependencies
2721
run: flutter pub get
22+
working-directory: mobile
2823

2924
- name: Analyze Code
3025
run: flutter analyze
26+
working-directory: mobile
3127

3228
build-apk:
3329
name: Build APK
@@ -45,21 +41,22 @@ jobs:
4541

4642
- name: Install Dependencies
4743
run: flutter pub get
44+
working-directory: mobile
4845

4946
- name: Decode Keystore
5047
run: |
51-
echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/app/keystore.jks
48+
echo "${{ secrets.KEYSTORE }}" | base64 --decode > mobile/android/app/keystore.jks
5249
5350
- name: Create key.properties
5451
run: |
55-
echo "storeFile=keystore.jks" > android/key.properties
56-
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
57-
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
58-
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
59-
52+
echo "storeFile=keystore.jks" > mobile/android/key.properties
53+
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> mobile/android/key.properties
54+
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> mobile/android/key.properties
55+
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> mobile/android/key.properties
6056
6157
- name: Build APK
6258
run: flutter build apk --release
59+
working-directory: mobile
6360

6461
build-aab:
6562
name: Build App Bundle
@@ -77,17 +74,19 @@ jobs:
7774

7875
- name: Install Dependencies
7976
run: flutter pub get
77+
working-directory: mobile
8078

8179
- name: Decode Keystore
8280
run: |
83-
echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/app/keystore.jks
81+
echo "${{ secrets.KEYSTORE }}" | base64 --decode > mobile/android/app/keystore.jks
8482
8583
- name: Create key.properties
8684
run: |
87-
echo "storeFile=keystore.jks" > android/key.properties
88-
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
89-
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
90-
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
85+
echo "storeFile=keystore.jks" > mobile/android/key.properties
86+
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> mobile/android/key.properties
87+
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> mobile/android/key.properties
88+
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> mobile/android/key.properties
9189
9290
- name: Build App Bundle
9391
run: flutter build appbundle
92+
working-directory: mobile

.gitignore

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,4 @@
1-
# Miscellaneous
2-
*.class
3-
*.log
4-
*.pyc
5-
*.swp
6-
.DS_Store
7-
.atom/
8-
.buildlog/
9-
.history
10-
.svn/
11-
migrate_working_dir/
12-
13-
# IntelliJ related
14-
*.iml
15-
*.ipr
16-
*.iws
17-
.idea/
18-
19-
# The .vscode folder contains launch configuration and tasks you configure in
20-
# VS Code which you may wish to be included in version control, so this line
21-
# is commented out by default.
22-
#.vscode/
23-
24-
# Flutter/Dart/Pub related
25-
**/doc/api/
26-
**/ios/Flutter/.last_build_id
27-
.dart_tool/
28-
.flutter-plugins
29-
.flutter-plugins-dependencies
30-
.pub-cache/
31-
.pub/
32-
/build/
33-
34-
# Symbolication related
35-
app.*.symbols
36-
37-
# Obfuscation related
38-
app.*.map.json
39-
40-
# Android Studio will place build artifacts here
41-
/android/app/debug
42-
/android/app/profile
43-
/android/app/release
44-
45-
# Key
46-
android/key.properties
1+
.vscode/
2+
.vs/
3+
.idea/
4+
.DS_STORE

.metadata

Lines changed: 0 additions & 36 deletions
This file was deleted.

android/app/google-services.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

assets/images/onboarding.png

-75.9 KB
Binary file not shown.

firebase.json

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
{
2-
"flutter": {
3-
"platforms": {
4-
"android": {
5-
"default": {
6-
"projectId": "financial-planner-72109",
7-
"appId": "1:859455980881:android:8f21d0626a1810ac903f70",
8-
"fileOutput": "android/app/google-services.json"
9-
}
10-
},
11-
"dart": {
12-
"lib/firebase_options.dart": {
13-
"projectId": "financial-planner-72109",
14-
"configurations": {
15-
"android": "1:859455980881:android:8f21d0626a1810ac903f70"
16-
}
17-
}
18-
}
19-
}
20-
},
21-
"firestore": {
22-
"rules": "firestore.rules",
23-
"indexes": "firestore.indexes.json"
24-
},
25-
"emulators": {
26-
"auth": {
27-
"port": 9099
28-
},
29-
"firestore": {
30-
"port": 8080
31-
},
32-
"ui": {
33-
"enabled": true
34-
},
35-
"singleProjectMode": true
36-
}
2+
"flutter": {
3+
"platforms": {
4+
"android": {
5+
"default": {
6+
"projectId": "financial-planner-72109",
7+
"appId": "1:859455980881:android:8f21d0626a1810ac903f70",
8+
"fileOutput": "android/app/google-services.json"
9+
}
10+
},
11+
"dart": {
12+
"lib/firebase_options.dart": {
13+
"projectId": "financial-planner-72109",
14+
"configurations": {
15+
"android": "1:859455980881:android:8f21d0626a1810ac903f70"
16+
}
17+
}
18+
}
19+
}
20+
},
21+
"firestore": {
22+
"rules": "firestore.rules",
23+
"indexes": "firestore.indexes.json"
24+
},
25+
"emulators": {
26+
"auth": {
27+
"port": 9099
28+
},
29+
"firestore": {
30+
"port": 8080
31+
},
32+
"ui": {
33+
"enabled": true
34+
},
35+
"singleProjectMode": true
36+
},
37+
"hosting": [
38+
{
39+
"target": "website",
40+
"public": "website",
41+
"ignore": [
42+
"firebase.json",
43+
"**/.*",
44+
"**/node_modules/**"
45+
]
46+
}
47+
]
3748
}

0 commit comments

Comments
 (0)