Compare commits

..

1 Commits

Author SHA1 Message Date
AppCakes 6bbc0632f9 build: f2992d4b-fbd4-4c34-aa8c-d652ae24e63d 2026-05-28 19:26:10 +00:00
26 changed files with 256 additions and 4507 deletions
Vendored
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -4,7 +4,7 @@ android {
namespace = "io.ionic.starter" namespace = "io.ionic.starter"
compileSdk = rootProject.ext.compileSdkVersion compileSdk = rootProject.ext.compileSdkVersion
defaultConfig { defaultConfig {
applicationId "com.basedeployer.app" applicationId "io.ionic.starter"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1 versionCode 1
-6
View File
@@ -21,12 +21,6 @@
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="com.basedeployer.app" />
</intent-filter>
</activity> </activity>
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<resources> <resources>
<string name="app_name">Base Deployer</string> <string name="app_name">PowerSlap</string>
<string name="title_activity_main">Base Deployer</string> <string name="title_activity_main">PowerSlap</string>
<string name="package_name">io.ionic.starter</string> <string name="package_name">io.ionic.starter</string>
<string name="custom_url_scheme">io.ionic.starter</string> <string name="custom_url_scheme">io.ionic.starter</string>
</resources> </resources>
+1
View File
@@ -15,4 +15,5 @@ ext {
cordovaAndroidVersion = '14.0.1' cordovaAndroidVersion = '14.0.1'
rgcfaIncludeGoogle = true rgcfaIncludeGoogle = true
androidxCredentialsVersion = '1.3.0' androidxCredentialsVersion = '1.3.0'
javaVersion = JavaVersion.VERSION_17
} }
+2 -2
View File
@@ -1,8 +1,8 @@
import type { CapacitorConfig } from '@capacitor/cli'; import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { const config: CapacitorConfig = {
appId: 'com.basedeployer.app', appId: 'io.powerslap.app',
appName: 'Base Deployer', appName: 'PowerSlap',
webDir: 'dist', webDir: 'dist',
plugins: { plugins: {
FirebaseAuthentication: { FirebaseAuthentication: {
+27 -44
View File
@@ -11,9 +11,6 @@ workflows:
- $HOME/.gradle/caches - $HOME/.gradle/caches
- $HOME/.gradle/wrapper - $HOME/.gradle/wrapper
scripts: scripts:
# Template ships with optional native plugins (maps, push, firebase auth) that most apps
# won't use. Keeping unused plugins in package.json adds SPM/Gradle deps and bloats the
# build. Strip any that have no import in src/ so only actually-used plugins are compiled.
- name: Strip unused scaffold packages - name: Strip unused scaffold packages
script: | script: |
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
@@ -24,16 +21,10 @@ workflows:
echo "Keeping $pkg (used in src/)" echo "Keeping $pkg (used in src/)"
fi fi
done done
# Delete package-lock.json (generated if user ever ran npm locally) so it doesn't
# conflict with yarn.lock. --legacy-peer-deps silences peer dep warnings from older
# Ionic/React packages that haven't updated their peerDependencies for React 18/19.
- name: Install dependencies - name: Install dependencies
script: rm -f package-lock.json && npm install --legacy-peer-deps script: rm -f package-lock.json && npm install --legacy-peer-deps
- name: Build web assets - name: Build web assets
script: npm run build script: npm run build
# Firebase config files are injected as base64 env vars by the Appcakes backend at
# build time. Decode them here so cap sync and Gradle can pick them up. Optional —
# builds without Firebase still succeed; native Firebase SDK just won't initialise.
- name: Write Firebase config - name: Write Firebase config
script: | script: |
if [ -n "$GOOGLE_SERVICES_JSON" ]; then if [ -n "$GOOGLE_SERVICES_JSON" ]; then
@@ -46,8 +37,6 @@ workflows:
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
echo "Wrote GoogleService-Info.plist ($(wc -c < ios/App/App/GoogleService-Info.plist) bytes)" echo "Wrote GoogleService-Info.plist ($(wc -c < ios/App/App/GoogleService-Info.plist) bytes)"
fi fi
# cap sync copies the built web assets (dist/) into android/app/src/main/assets/public/
# and updates Capacitor plugin registrations in MainActivity. Must run after npm build.
- name: Capacitor sync - name: Capacitor sync
script: npx cap sync android script: npx cap sync android
- name: Set up debug keystore - name: Set up debug keystore
@@ -239,25 +228,26 @@ workflows:
script: rm -f package-lock.json && npm install --legacy-peer-deps script: rm -f package-lock.json && npm install --legacy-peer-deps
- name: Build web assets - name: Build web assets
script: npm run build script: npm run build
# First sync: regenerates CapApp-SPM/Package.swift with the correct plugin list.
# Note: this project uses Capacitor SPM (no CocoaPods/Podfile), so cap sync replaces
# pod install — it regenerates CapApp-SPM/Package.swift and copies web assets.
- name: Capacitor sync - name: Capacitor sync
script: npx cap sync ios script: npx cap sync ios
# Decode Firebase plist to disk so it is present during the second sync.
- name: Write Firebase config - name: Write Firebase config
script: | script: |
if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
ruby -e "
require 'xcodeproj'
project = Xcodeproj::Project.open('ios/App/App.xcodeproj')
target = project.targets.find { |t| t.name == 'App' }
app_group = project.main_group['App']
unless app_group.files.find { |f| f.path == 'GoogleService-Info.plist' }
file_ref = app_group.new_reference('GoogleService-Info.plist')
target.resources_build_phase.add_file_reference(file_ref)
project.save
end
"
fi fi
# Second sync ensures CapApp-SPM/Package.swift is consistent after the plist write.
- name: Capacitor sync - name: Capacitor sync
script: npx cap sync ios script: npx cap sync ios
# Run configure_xcode.rb after both syncs so its xcodeproj changes (plist file
# reference + SPM product linking) are not overwritten by a subsequent cap sync.
# configure_xcode.rb is stamped fresh from template on every build push.
- name: Configure Xcode project
script: ruby configure_xcode.rb
- name: Set up signing - name: Set up signing
script: | script: |
keychain initialize keychain initialize
@@ -282,23 +272,11 @@ workflows:
echo "No signing credentials configured — build will fail at signing" echo "No signing credentials configured — build will fail at signing"
exit 1 exit 1
fi fi
# --workspace: Capacitor SPM projects require workspace context for Xcode to resolve
# the CapApp-SPM local package. Using --project causes xcodebuild to fail on
# Xcode 26+ because SPM resolution requires workspace scope. App.xcworkspace is a
# static file committed to the template (not generated by cap sync) that wraps
# App.xcodeproj for this purpose.
# --no-show-build-settings: xcode-project runs xcodebuild -showBuildSettings as a
# pre-build diagnostic. Xcode 26 fails this step for SPM projects even with
# --workspace, so we skip it. The actual archive step still surfaces real errors.
# --disable-xcpretty: xcpretty reformats and filters xcodebuild output, swallowing
# the actual error lines when a build fails. Raw output makes failures debuggable.
- name: Build IPA - name: Build IPA
script: | script: |
xcode-project build-ipa \ xcode-project build-ipa \
--workspace ios/App/App.xcworkspace \ --project ios/App/App.xcodeproj \
--scheme App \ --scheme App
--no-show-build-settings \
--disable-xcpretty
artifacts: artifacts:
- build/ios/ipa/*.ipa - build/ios/ipa/*.ipa
@@ -326,15 +304,24 @@ workflows:
script: npm run build script: npm run build
- name: Capacitor sync - name: Capacitor sync
script: npx cap sync ios script: npx cap sync ios
- name: Configure Xcode project - name: Write Firebase config
script: | script: |
if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
ruby -e "
require 'xcodeproj'
project = Xcodeproj::Project.open('ios/App/App.xcodeproj')
target = project.targets.find { |t| t.name == 'App' }
app_group = project.main_group['App']
unless app_group.files.find { |f| f.path == 'GoogleService-Info.plist' }
file_ref = app_group.new_reference('GoogleService-Info.plist')
target.resources_build_phase.add_file_reference(file_ref)
project.save
end
"
fi fi
- name: Capacitor sync - name: Capacitor sync
script: npx cap sync ios script: npx cap sync ios
- name: Configure Xcode project
script: ruby configure_xcode.rb
- name: Set up signing - name: Set up signing
script: | script: |
keychain initialize keychain initialize
@@ -356,16 +343,12 @@ workflows:
echo "$CM_PROVISIONING_PROFILE" | base64 --decode > "$HOME/Library/MobileDevice/Provisioning Profiles/profile.mobileprovision" echo "$CM_PROVISIONING_PROFILE" | base64 --decode > "$HOME/Library/MobileDevice/Provisioning Profiles/profile.mobileprovision"
xcode-project use-profiles xcode-project use-profiles
fi fi
# See ios-debug Build IPA comments for --workspace, --no-show-build-settings,
# and --disable-xcpretty rationale — same reasons apply here.
- name: Build IPA - name: Build IPA
script: | script: |
xcode-project build-ipa \ xcode-project build-ipa \
--workspace ios/App/App.xcworkspace \ --project ios/App/App.xcodeproj \
--scheme App \ --scheme App \
--config Release \ --config Release
--no-show-build-settings \
--disable-xcpretty
- name: Publish - name: Publish
script: | script: |
if [ "$SUBMIT_TO_TESTFLIGHT" = "true" ] || [ "$SUBMIT_TO_APP_STORE" = "true" ]; then if [ "$SUBMIT_TO_TESTFLIGHT" = "true" ] || [ "$SUBMIT_TO_APP_STORE" = "true" ]; then
-118
View File
@@ -1,118 +0,0 @@
#!/usr/bin/env ruby
# configure_xcode.rb — stamped fresh from template on every build (see gitea.service.ts)
#
# 1. Adds GoogleService-Info.plist to the Xcode target if present (xcodeproj gem)
# 2. Scans Swift sources for Firebase imports and injects matching products into
# CapApp-SPM/Package.swift — the correct approach for Capacitor SPM projects
# where all native linking goes through CapApp-SPM, not App.xcodeproj directly.
require 'xcodeproj'
PROJECT_PATH = 'ios/App/App.xcodeproj'
TARGET_NAME = 'App'
PLIST_SRC = 'ios/App/App/GoogleService-Info.plist'
CAP_APP_SPM = 'ios/App/CapApp-SPM/Package.swift'
# ── 1. GoogleService-Info.plist ───────────────────────────────────────────────
if File.exist?(PLIST_SRC)
project = Xcodeproj::Project.open(PROJECT_PATH)
target = project.targets.find { |t| t.name == TARGET_NAME }
if target
app_group = project.main_group['App']
unless app_group&.files&.find { |f| f.path == 'GoogleService-Info.plist' }
file_ref = app_group.new_reference('GoogleService-Info.plist')
target.resources_build_phase.add_file_reference(file_ref)
project.save
puts "Added GoogleService-Info.plist to target"
end
end
end
# ── 2. Scan Swift sources for Firebase imports ────────────────────────────────
swift_files = Dir['ios/App/App/**/*.swift']
firebase_imports = swift_files
.flat_map { |f| File.readlines(f) rescue [] }
.grep(/^\s*import\s+Firebase\w+/)
.map { |l| l.strip.split(/\s+/).last }
.uniq
.sort
if firebase_imports.empty?
puts "No Firebase imports found — skipping CapApp-SPM update"
exit 0
end
puts "Firebase imports detected: #{firebase_imports.join(', ')}"
unless File.exist?(CAP_APP_SPM)
warn "WARNING: #{CAP_APP_SPM} not found — was cap sync run?"
exit 0
end
# ── 3. Detect firebase-ios-sdk URL and version from node_modules ──────────────
# Read from the ACTUAL node_modules on this build machine (populated by npm install)
# so the version we inject matches what @capacitor-firebase/* already resolved.
firebase_url = nil
firebase_version = nil
Dir['node_modules/@capacitor-firebase/**/Package.swift',
'node_modules/@capacitor/push-notifications/**/Package.swift'].each do |f|
content = File.read(f) rescue next
url_m = content.match(/\.package\(url:\s*"(https:\/\/github\.com\/firebase\/firebase-ios-sdk[^"]*)"/)
ver_m = content.match(/firebase-ios-sdk[^)]+from:\s*"(\d+)\.(\d+)\.(\d+)"/)
next unless url_m && ver_m
firebase_url = url_m[1]
major = ver_m[1].to_i
firebase_version = "#{major}.0.0"
puts "Detected firebase-ios-sdk from #{f}: url=#{firebase_url} → using from: \"#{firebase_version}\""
break
end
# Fallback — should rarely be needed
unless firebase_url
firebase_url = 'https://github.com/firebase/firebase-ios-sdk.git'
firebase_version = '11.0.0'
puts "Could not detect firebase-ios-sdk version from node_modules — using fallback #{firebase_version}"
end
firebase_pkg = 'firebase-ios-sdk'
lines = File.read(CAP_APP_SPM).split("\n")
# ── 4. Inject firebase-ios-sdk as a direct package dependency if missing ──────
# Normalise URL check to handle both with and without .git suffix
firebase_url_base = firebase_url.sub(/\.git$/, '')
unless lines.any? { |l| l.include?(firebase_url_base) }
last_pkg_idx = lines.rindex { |l| l.include?('.package(') }
if last_pkg_idx
lines[last_pkg_idx] = lines[last_pkg_idx].rstrip
lines[last_pkg_idx] += ',' unless lines[last_pkg_idx].end_with?(',')
lines.insert(last_pkg_idx + 1,
" .package(url: \"#{firebase_url}\", from: \"#{firebase_version}\")")
puts "Added #{firebase_pkg} to CapApp-SPM package dependencies"
else
warn "WARNING: no .package( line found in #{CAP_APP_SPM} — cannot inject dependency"
end
end
# ── 5. Inject each detected product into the target dependencies if missing ───
firebase_imports.each do |product|
next if product == 'Firebase' # umbrella import — not a linkable SPM product
product_str = ".product(name: \"#{product}\", package: \"#{firebase_pkg}\")"
next if lines.any? { |l| l.include?(product_str) }
last_prod_idx = lines.rindex { |l| l.include?('.product(') }
if last_prod_idx
lines[last_prod_idx] = lines[last_prod_idx].rstrip
lines[last_prod_idx] += ',' unless lines[last_prod_idx].end_with?(',')
lines.insert(last_prod_idx + 1, " #{product_str}")
puts "Added #{product} to CapApp-SPM target dependencies"
else
warn "WARNING: no .product( line found in #{CAP_APP_SPM} — cannot inject #{product}"
end
end
File.write(CAP_APP_SPM, lines.join("\n"))
puts "CapApp-SPM/Package.swift updated"
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -6
View File
@@ -26,7 +26,6 @@
504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1A4EB3C21FED79650016851F /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = "<group>"; };
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; }; 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
958DCC722DB07C7200EA8C5F /* debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = debug.xcconfig; path = ../debug.xcconfig; sourceTree = SOURCE_ROOT; }; 958DCC722DB07C7200EA8C5F /* debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = debug.xcconfig; path = ../debug.xcconfig; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@@ -69,7 +68,6 @@
504EC30E1FED79650016851F /* Assets.xcassets */, 504EC30E1FED79650016851F /* Assets.xcassets */,
504EC3101FED79650016851F /* LaunchScreen.storyboard */, 504EC3101FED79650016851F /* LaunchScreen.storyboard */,
504EC3131FED79650016851F /* Info.plist */, 504EC3131FED79650016851F /* Info.plist */,
1A4EB3C21FED79650016851F /* App.entitlements */,
2FAD9762203C412B000D30F8 /* config.xml */, 2FAD9762203C412B000D30F8 /* config.xml */,
50B271D01FEDC1A000F3C39B /* public */, 50B271D01FEDC1A000F3C39B /* public */,
); );
@@ -297,7 +295,6 @@
baseConfigurationReference = 958DCC722DB07C7200EA8C5F /* debug.xcconfig */; baseConfigurationReference = 958DCC722DB07C7200EA8C5F /* debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = App/Info.plist; INFOPLIST_FILE = App/Info.plist;
@@ -308,7 +305,7 @@
); );
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.basedeployer.app; PRODUCT_BUNDLE_IDENTIFIER = io.powerslap.app;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@@ -320,7 +317,6 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = App/Info.plist; INFOPLIST_FILE = App/Info.plist;
@@ -330,7 +326,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.basedeployer.app; PRODUCT_BUNDLE_IDENTIFIER = io.powerslap.app;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = ""; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:App.xcodeproj">
</FileRef>
</Workspace>
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
+3 -3
View File
@@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Base Deployer</string> <string>PowerSlap</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@@ -51,10 +51,10 @@
<array> <array>
<dict> <dict>
<key>CFBundleURLName</key> <key>CFBundleURLName</key>
<string>com.basedeployer.app</string> <string>io.powerslap.app</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>com.basedeployer.app</string> <string>io.powerslap.app</string>
</array> </array>
</dict> </dict>
</array> </array>
+4 -11
View File
@@ -10,7 +10,7 @@
"lint": "eslint" "lint": "eslint"
}, },
"dependencies": { "dependencies": {
"@capacitor-firebase/authentication": "^8.0.0", "@capacitor-firebase/authentication": "^7.0.0",
"@capacitor/android": "8.3.4", "@capacitor/android": "8.3.4",
"@capacitor/app": "8.1.0", "@capacitor/app": "8.1.0",
"@capacitor/core": "8.3.4", "@capacitor/core": "8.3.4",
@@ -18,17 +18,12 @@
"@capacitor/haptics": "8.0.2", "@capacitor/haptics": "8.0.2",
"@capacitor/ios": "8.3.4", "@capacitor/ios": "8.3.4",
"@capacitor/keyboard": "8.0.3", "@capacitor/keyboard": "8.0.3",
"@capacitor/preferences": "^8.0.1",
"@capacitor/push-notifications": "^8.1.1", "@capacitor/push-notifications": "^8.1.1",
"@capacitor/status-bar": "8.0.2", "@capacitor/status-bar": "8.0.2",
"@hookform/resolvers": "^3.9.0",
"@ionic/pwa-elements": "^3.0.0", "@ionic/pwa-elements": "^3.0.0",
"@ionic/react": "8.8.7", "@ionic/react": "^8.5.0",
"@ionic/react-router": "8.8.7", "@ionic/react-router": "^8.5.0",
"@reown/appkit": "^1.8.21", "@supabase/supabase-js": "^2.0.0",
"@reown/appkit-adapter-wagmi": "^1.8.21",
"@supabase/supabase-js": "^2.108.1",
"@tanstack/react-query": "^5.101.1",
"firebase": "^11.0.0", "firebase": "^11.0.0",
"ionicons": "^7.4.0", "ionicons": "^7.4.0",
"katex": "^0.16.0", "katex": "^0.16.0",
@@ -38,8 +33,6 @@
"react-katex": "^3.0.1", "react-katex": "^3.0.1",
"react-router": "^5.3.4", "react-router": "^5.3.4",
"react-router-dom": "^5.3.4", "react-router-dom": "^5.3.4",
"viem": "^2.53.1",
"wagmi": "^3.6.18",
"zod": "^3.24.0", "zod": "^3.24.0",
"zustand": "^5.0.0" "zustand": "^5.0.0"
}, },
BIN
View File
Binary file not shown.
+18 -69
View File
@@ -1,72 +1,24 @@
import React, { useEffect } from 'react'; import React from "react";
import { Redirect, Route } from 'react-router-dom'; import { Redirect, Route } from "react-router-dom";
import { IonApp, IonRouterOutlet } from '@ionic/react'; import { IonApp, IonRouterOutlet } from "@ionic/react";
import { IonReactRouter } from '@ionic/react-router'; import { IonReactRouter } from "@ionic/react-router";
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import "@ionic/react/css/core.css";
import { WagmiProvider } from 'wagmi'; import "@ionic/react/css/normalize.css";
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi'; import "@ionic/react/css/structure.css";
import { base, type AppKitNetwork } from '@reown/appkit/networks'; import "@ionic/react/css/typography.css";
import { createAppKit } from '@reown/appkit/react'; import "@ionic/react/css/padding.css";
import "@ionic/react/css/float-elements.css";
import "@ionic/react/css/text-alignment.css";
import "@ionic/react/css/text-transformation.css";
import "@ionic/react/css/flex-utils.css";
import "@ionic/react/css/display.css";
import { setStatusBarStyle, Style } from './utils/statusBar'; import "./theme/variables.css";
import '@ionic/react/css/core.css'; import Home from "./pages/Home";
import '@ionic/react/css/normalize.css';
import '@ionic/react/css/structure.css';
import '@ionic/react/css/typography.css';
import '@ionic/react/css/padding.css';
import '@ionic/react/css/float-elements.css';
import '@ionic/react/css/text-alignment.css';
import '@ionic/react/css/text-transformation.css';
import '@ionic/react/css/flex-utils.css';
import '@ionic/react/css/display.css';
import './theme/variables.css'; const App: React.FC = () => (
import Home from './pages/Home';
// Setup QueryClient
const queryClient = new QueryClient();
// Setup AppKit
const projectId =
import.meta.env.VITE_WALLETCONNECT_PROJECT_ID ||
'01e0a2bf8d37317e040edb7878d70804';
const metadata = {
name: 'Base Deployer',
description: 'Base Mainnet GM dApp',
url: 'https://basedeployer.app',
icons: ['https://avatars.githubusercontent.com/u/37784886'],
};
const networks = [base as any] as [AppKitNetwork, ...AppKitNetwork[]];
const wagmiAdapter = new WagmiAdapter({
networks,
projectId,
ssr: false,
});
createAppKit({
adapters: [wagmiAdapter],
networks,
projectId,
metadata,
features: {
analytics: true,
},
});
const App: React.FC = () => {
useEffect(() => {
setStatusBarStyle(Style.Dark); // Dark background, light icons
}, []);
return (
<WagmiProvider config={wagmiAdapter.wagmiConfig}>
<QueryClientProvider client={queryClient}>
<IonApp> <IonApp>
<IonReactRouter> <IonReactRouter>
<IonRouterOutlet> <IonRouterOutlet>
@@ -75,9 +27,6 @@ const App: React.FC = () => {
</IonRouterOutlet> </IonRouterOutlet>
</IonReactRouter> </IonReactRouter>
</IonApp> </IonApp>
</QueryClientProvider> );
</WagmiProvider>
);
};
export default App; export default App;
+5 -10
View File
@@ -5,7 +5,7 @@ import { Capacitor } from '@capacitor/core';
import App from './App'; import App from './App';
// ── Ionic initialisation ────────────────────────────────────────────────────── // ── Ionic initialisation ──────────────────────────────────────────────────────
// ?mode=md|ios overrides (used by Appcakes preview); otherwise follow the platform. // ?mode=md|ios overrides (used by AppSuite preview); otherwise follow the platform.
const _urlMode = new URLSearchParams(window.location.search).get('mode'); const _urlMode = new URLSearchParams(window.location.search).get('mode');
const _platform = Capacitor.getPlatform(); // 'ios' | 'android' | 'web' const _platform = Capacitor.getPlatform(); // 'ios' | 'android' | 'web'
setupIonicReact({ setupIonicReact({
@@ -13,7 +13,7 @@ setupIonicReact({
}); });
// Derive the studio parent origin dynamically so this works in both dev // Derive the studio parent origin dynamically so this works in both dev
// (parent at localhost:3000) and production (parent at studio.appcakes.dev). // (parent at localhost:3000) and production (parent at appcakes.qqura.com).
const studioOrigin = (() => { const studioOrigin = (() => {
try { try {
if (document.referrer) return new URL(document.referrer).origin; if (document.referrer) return new URL(document.referrer).origin;
@@ -49,7 +49,7 @@ if (import.meta.hot) {
} }
// ── Session bridge ──────────────────────────────────────────────────────────── // ── Session bridge ────────────────────────────────────────────────────────────
// Post auth session to the Appcakes parent frame so the AI can test auth-protected // Post auth session to the AppSuite parent frame so the AI can test auth-protected
// Edge Functions. Uses import.meta.glob so Vite never errors if supabase.ts is absent. // Edge Functions. Uses import.meta.glob so Vite never errors if supabase.ts is absent.
(async () => { (async () => {
const mods = import.meta.glob('./supabase.ts', { eager: false }); const mods = import.meta.glob('./supabase.ts', { eager: false });
@@ -73,17 +73,12 @@ if (import.meta.hot) {
})(); })();
// ── Runtime error reporting ─────────────────────────────────────────────────── // ── Runtime error reporting ───────────────────────────────────────────────────
// Forward uncaught errors to the Appcakes dev server so the AI can read them. // Forward uncaught errors to the AppSuite dev server so the AI can read them.
// Extract projectId from the preview URL (/preview/{projectId}/) so errors are
// scoped per-project on the server rather than mixed into a global queue.
const _previewMatch = window.location.pathname.match(/\/preview\/([^/]+)/);
const _projectId = _previewMatch?.[1] ?? null;
function reportError(message: string, stack?: string) { function reportError(message: string, stack?: string) {
fetch(`${studioOrigin}/api/agent/runtime-error`, { fetch(`${studioOrigin}/api/agent/runtime-error`, {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message, stack, projectId: _projectId }), body: JSON.stringify({ message, stack }),
}).catch(() => {}); }).catch(() => {});
} }
+16 -1149
View File
File diff suppressed because it is too large Load Diff
-51
View File
@@ -1,51 +0,0 @@
// Ambient test globals for optional *.test.* files in the editor / tsc.
// No test runner is installed in the template; stubs avoid spurious TS errors.
interface Matchers<R = void> {
toBeDefined(): R;
toBe(expected: unknown): R;
toEqual(expected: unknown): R;
toBeTruthy(): R;
toBeFalsy(): R;
toBeNull(): R;
toContain(item: unknown): R;
toHaveLength(length: number): R;
toMatch(expected: string | RegExp): R;
toThrow(expected?: string | RegExp | Error): R;
not: Matchers<R>;
}
interface Expect {
<T = unknown>(actual: T): Matchers;
}
declare const expect: Expect;
type TestCaseFn = (
name: string,
fn?: () => void | Promise<void>,
timeout?: number,
) => void;
declare const test: TestCaseFn;
declare const it: TestCaseFn;
declare const describe: TestCaseFn;
declare function beforeEach(fn: () => void | Promise<void>): void;
declare function afterEach(fn: () => void | Promise<void>): void;
declare function beforeAll(fn: () => void | Promise<void>): void;
declare function afterAll(fn: () => void | Promise<void>): void;
declare module "@testing-library/react" {
export function render(
ui: unknown,
options?: object,
): {
baseElement: Element;
container: Element;
unmount(): void;
rerender(ui: unknown): void;
};
export const screen: Record<string, (...args: unknown[]) => Element>;
export function cleanup(): void;
}
+44 -64
View File
@@ -1,85 +1,65 @@
/* Ionic CSS Variables — customise to match your app's brand */ /* Ionic CSS Variables — customise to match your app's brand */
:root { :root {
--ion-color-primary: #2667ff; --ion-color-primary: #3880ff;
--ion-color-primary-rgb: 38, 103, 255; --ion-color-primary-rgb: 56, 128, 255;
--ion-color-primary-contrast: #ffffff; --ion-color-primary-contrast: #ffffff;
--ion-color-primary-contrast-rgb: 255, 255, 255; --ion-color-primary-contrast-rgb: 255, 255, 255;
--ion-color-primary-shade: #215be0; --ion-color-primary-shade: #3171e0;
--ion-color-primary-tint: #3c76ff; --ion-color-primary-tint: #4c8dff;
--ion-color-secondary: #7cc7ff; --ion-color-secondary: #3dc2ff;
--ion-color-secondary-rgb: 124, 199, 255; --ion-color-secondary-rgb: 61, 194, 255;
--ion-color-secondary-contrast: #0a1020; --ion-color-secondary-contrast: #ffffff;
--ion-color-secondary-contrast-rgb: 10, 16, 32; --ion-color-secondary-contrast-rgb: 255, 255, 255;
--ion-color-secondary-shade: #6dafdf; --ion-color-secondary-shade: #36abe0;
--ion-color-secondary-tint: #89cdff; --ion-color-secondary-tint: #50c8ff;
--ion-color-tertiary: #9fd6ff; --ion-color-tertiary: #5260ff;
--ion-color-tertiary-rgb: 159, 214, 255; --ion-color-tertiary-rgb: 82, 96, 255;
--ion-color-tertiary-contrast: #0a1020; --ion-color-tertiary-contrast: #ffffff;
--ion-color-tertiary-contrast-rgb: 10, 16, 32; --ion-color-tertiary-contrast-rgb: 255, 255, 255;
--ion-color-tertiary-shade: #8cbcb; --ion-color-tertiary-shade: #4854e0;
--ion-color-tertiary-tint: #a9daff; --ion-color-tertiary-tint: #6370ff;
--ion-color-success: #15803d; --ion-color-success: #2dd36f;
--ion-color-success-rgb: 21, 128, 61; --ion-color-success-rgb: 45, 211, 111;
--ion-color-success-contrast: #ffffff; --ion-color-success-contrast: #ffffff;
--ion-color-success-contrast-rgb: 255, 255, 255; --ion-color-success-contrast-rgb: 255, 255, 255;
--ion-color-success-shade: #127136; --ion-color-success-shade: #28ba62;
--ion-color-success-tint: #2c8d50; --ion-color-success-tint: #42d77d;
--ion-color-warning: #eab308; --ion-color-warning: #ffc409;
--ion-color-warning-rgb: 234, 179, 8; --ion-color-warning-rgb: 255, 196, 9;
--ion-color-warning-contrast: #0a1020; --ion-color-warning-contrast: #000000;
--ion-color-warning-contrast-rgb: 10, 16, 32; --ion-color-warning-contrast-rgb: 0, 0, 0;
--ion-color-warning-shade: #ce9d07; --ion-color-warning-shade: #e0ac08;
--ion-color-warning-tint: #ecbb21; --ion-color-warning-tint: #ffca22;
--ion-color-danger: #c2410c; --ion-color-danger: #eb445a;
--ion-color-danger-rgb: 194, 65, 12; --ion-color-danger-rgb: 235, 68, 90;
--ion-color-danger-contrast: #ffffff; --ion-color-danger-contrast: #ffffff;
--ion-color-danger-contrast-rgb: 255, 255, 255; --ion-color-danger-contrast-rgb: 255, 255, 255;
--ion-color-danger-shade: #ab390a; --ion-color-danger-shade: #cf3c4f;
--ion-color-danger-tint: #c85424; --ion-color-danger-tint: #ed576b;
--ion-color-dark: #0a1020; --ion-color-dark: #222428;
--ion-color-dark-rgb: 10, 16, 32; --ion-color-dark-rgb: 34, 36, 40;
--ion-color-dark-contrast: #ffffff; --ion-color-dark-contrast: #ffffff;
--ion-color-dark-contrast-rgb: 255, 255, 255; --ion-color-dark-contrast-rgb: 255, 255, 255;
--ion-color-dark-shade: #090e1c; --ion-color-dark-shade: #1e2023;
--ion-color-dark-tint: #222836; --ion-color-dark-tint: #383a3e;
--ion-color-medium: #6b7a99; --ion-color-medium: #92949c;
--ion-color-medium-rgb: 107, 122, 153; --ion-color-medium-rgb: 146, 148, 156;
--ion-color-medium-contrast: #ffffff; --ion-color-medium-contrast: #ffffff;
--ion-color-medium-contrast-rgb: 255, 255, 255; --ion-color-medium-contrast-rgb: 255, 255, 255;
--ion-color-medium-shade: #5e6b87; --ion-color-medium-shade: #808289;
--ion-color-medium-tint: #7a87a3; --ion-color-medium-tint: #9d9fa6;
--ion-color-light: #f8fbff; --ion-color-light: #f4f5f8;
--ion-color-light-rgb: 248, 251, 255; --ion-color-light-rgb: 244, 245, 248;
--ion-color-light-contrast: #0a1020; --ion-color-light-contrast: #000000;
--ion-color-light-contrast-rgb: 10, 16, 32; --ion-color-light-contrast-rgb: 0, 0, 0;
--ion-color-light-shade: #dadde0; --ion-color-light-shade: #d7d8da;
--ion-color-light-tint: #f9fbff; --ion-color-light-tint: #f5f6f9;
--app-background: #0a1020;
--app-surface: #121b36;
--app-surface-secondary: #f7faff;
--app-text-primary: #f8fbff;
--app-text-secondary: rgba(248, 251, 255, 0.7);
--app-text-tertiary: rgba(248, 251, 255, 0.5);
--app-accent-soft: rgba(38, 103, 255, 0.12);
--app-accent-softer: rgba(38, 103, 255, 0.08);
--app-success-soft: rgba(21, 128, 61, 0.12);
--app-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}
body {
background: var(--app-background);
color: var(--app-text-primary);
}
ion-content.home-content {
--background: var(--app-background);
} }
+18
View File
@@ -0,0 +1,18 @@
ext {
minSdkVersion = 24
compileSdkVersion = 36
targetSdkVersion = 36
androidxActivityVersion = '1.11.0'
androidxAppCompatVersion = '1.7.1'
androidxCoordinatorLayoutVersion = '1.3.0'
androidxCoreVersion = '1.17.0'
androidxFragmentVersion = '1.8.9'
coreSplashScreenVersion = '1.2.0'
androidxWebkitVersion = '1.14.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.3.0'
androidxEspressoCoreVersion = '3.7.0'
cordovaAndroidVersion = '14.0.1'
rgcfaIncludeGoogle = true
androidxCredentialsVersion = '1.3.0'
}
+1 -14
View File
@@ -1,6 +1,3 @@
// NOTE: @ionic/react and @ionic/react-router are pinned to 8.8.7 in package.json.
// 8.8.8 introduced a regression that breaks IonRouterOutlet page transition animations.
// Do not upgrade until the upstream fix is confirmed.
import { defineConfig, type Plugin } from 'vite'; import { defineConfig, type Plugin } from 'vite';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
@@ -17,18 +14,8 @@ const injectRouterBasename: Plugin = {
}, },
}; };
const hideScrollbars: Plugin = {
name: 'hide-scrollbars',
transformIndexHtml(html) {
return html.replace(
'</head>',
'<style>*{scrollbar-width:none!important;-ms-overflow-style:none!important}*::-webkit-scrollbar{display:none!important}</style></head>',
);
},
};
export default defineConfig({ export default defineConfig({
plugins: [injectRouterBasename, hideScrollbars, react()], plugins: [injectRouterBasename, react()],
server: { server: {
host: '0.0.0.0', host: '0.0.0.0',
port: 8100, port: 8100,
+101 -2931
View File
File diff suppressed because it is too large Load Diff