Skip to content

Commit 92b3197

Browse files
committed
feat: Add login page and its functionality; add dependencies, add environment variables, etc.
1 parent daf5e35 commit 92b3197

36 files changed

Lines changed: 754 additions & 71 deletions

.env.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Application Programming Interface
2+
API_BASE_URL=
3+
4+
# Firebase
5+
FIREBASE_API_KEY=
6+
FIREBASE_APP_ID=
7+
FIREBASE_AUTH_DOMAIN=
8+
FIREBASE_MESSAGING_SENDER_ID=
9+
FIREBASE_PROJECT_ID=
10+
FIREBASE_STORAGE_BUCKET=
11+
12+
# Token
13+
CSRF_TOKEN=
14+
JWT_SECRET_KEY=

.github/workflows/production.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Production
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "v*"
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
verify:
15+
name: Verify Code Quality
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repository
19+
uses: actions/checkout@v4
20+
- name: Setup Java (For Android tools)
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: "zulu"
24+
java-version: "17"
25+
- name: Setup Flutter
26+
uses: subosito/flutter-action@v2
27+
with:
28+
channel: "stable"
29+
cache: true
30+
- name: Install Dependencies
31+
run: flutter pub get
32+
- name: Check Formatting
33+
run: dart format --output=none --set-exit-if-changed .
34+
- name: Static Code Analysis
35+
run: flutter analyze
36+
- name: Run Unit & Widget Tests
37+
run: flutter test --coverage
38+
build-android:
39+
name: Build Production Android
40+
needs: verify
41+
runs-on: ubuntu-latest
42+
if: github.event_name == 'push'
43+
steps:
44+
- name: Checkout Repository
45+
uses: actions/checkout@v4
46+
- name: Setup Java
47+
uses: actions/setup-java@v4
48+
with:
49+
distribution: "zulu"
50+
java-version: "17"
51+
- name: Setup Flutter
52+
uses: subosito/flutter-action@v2
53+
with:
54+
channel: "stable"
55+
cache: true
56+
- name: Install Dependencies
57+
run: flutter pub get
58+
- name: Decode Android Keystore
59+
run: |
60+
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks
61+
- name: Build Android App Bundle (AAB)
62+
env:
63+
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
64+
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
65+
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
66+
run: |
67+
flutter build appbundle --release \
68+
--dart-define=APP_ENV=production
69+
- name: Upload Android Artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: production-appbundle
73+
path: build/app/outputs/bundle/release/app-release.aab
74+
build-ios:
75+
name: Build Production iOS
76+
needs: verify
77+
runs-on: macos-latest
78+
if: github.event_name == 'push'
79+
steps:
80+
- name: Checkout Repository
81+
uses: actions/checkout@v4
82+
- name: Setup Flutter
83+
uses: subosito/flutter-action@v2
84+
with:
85+
channel: "stable"
86+
cache: true
87+
- name: Install Dependencies
88+
run: flutter pub get
89+
- name: Install Apple Certificate and Provisioning Profile
90+
env:
91+
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
92+
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
93+
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
94+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
95+
run: |
96+
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
97+
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
98+
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
99+
100+
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
101+
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
102+
103+
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
104+
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
105+
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
106+
107+
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
108+
security list-keychain -d user -s $KEYCHAIN_PATH
109+
110+
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
111+
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/
112+
- name: Build iOS IPA
113+
run: |
114+
flutter build ipa --release \
115+
--export-options-plist=$HOME/export_options.plist \
116+
--dart-define=APP_ENV=production
117+
- name: Upload iOS Artifact
118+
uses: actions/upload-artifact@v4
119+
with:
120+
name: production-ipa
121+
path: build/ios/ipa/*.ipa

.vscode/settings.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
{
22
"cmake.ignoreCMakeListsMissing": true,
3+
"[dart]": {
4+
"editor.formatOnPaste": false,
5+
"editor.formatOnSave": false,
6+
"editor.formatOnType": false,
7+
"editor.selectionHighlight": false,
8+
},
9+
"dart.autoImportCompletions": true,
10+
"dart.previewFlutterUiGuides": true,
11+
"files.associations": {
12+
"*.css": "tailwindcss",
13+
},
14+
"files.exclude": {
15+
"**/*.g.dart": true,
16+
"**/.dart_tool": true,
17+
"**/.DS_Store": true,
18+
"**/.git": true,
19+
"**/.hg": true,
20+
"**/.idea": true,
21+
"**/.plugin_symlinks": true,
22+
"**/.svn": true,
23+
"**/.symlinks": true,
24+
"**/android": true,
25+
"**/build": true,
26+
"**/dist": true,
27+
"**/flutter/ephemeral": true,
28+
"**/Flutter/ephemeral": true,
29+
"**/ios": true,
30+
"**/linux": true,
31+
"**/macos": true,
32+
"**/out": true,
33+
"**/Thumbs.db": true,
34+
"**/windows": true,
35+
},
336
"material-icon-theme.folders.associations": {
437
"dashboard": "home",
538
"expense_tracker": "database",

lib/features/auth/register/components/form.dart renamed to assets/.gitkeep

File renamed without changes.

lib/core/network/api_client.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class ApiClient {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class SslPinningConfig {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class SecureStorage {}

lib/core/utils/formatters.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class Formatters {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import 'package:flutter/material.dart';
2+
3+
class ForgotPasswordPage extends StatelessWidget {
4+
const ForgotPasswordPage({super.key});
5+
6+
@override
7+
Widget build(BuildContext context) {
8+
return Scaffold(
9+
appBar: AppBar(title: const Text('Forgot Password')),
10+
body: const Center(child: Text('Hi, this is the forgot password page!')),
11+
);
12+
}
13+
}

lib/features/auth/login/components/form.dart

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

0 commit comments

Comments
 (0)