Skip to content

Commit f8137f8

Browse files
authored
Merge branch 'main' into ref/homepage-code-refactor-issue-60
2 parents 9c4e763 + 41bf1ac commit f8137f8

50 files changed

Lines changed: 13799 additions & 471 deletions

Some content is hidden

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

.eslintrc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
2-
"extends": [
3-
"expo",
4-
"plugin:@typescript-eslint/recommended"
5-
],
2+
"extends": ["expo", "plugin:@typescript-eslint/recommended"],
63
"plugins": ["@typescript-eslint", "prettier"],
74
"parser": "@typescript-eslint/parser",
85
"parserOptions": {

.github/BRANCH_PROTECTION.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
To enforce the CI/CD pipeline quality gates, configure branch protection rules in your GitHub repository:
44

55
## Settings Location
6+
67
Go to: Repository Settings → Branches → Add rule
78

89
## Required Settings for `main` branch:
910

1011
### Branch name pattern
12+
1113
```
1214
main
1315
```
1416

1517
### ✅ Required checks (enable ALL):
18+
1619
- [ ] **typescript-lint** - ESLint and Prettier checks
1720
- [ ] **typescript-typecheck** - TypeScript type validation
1821
- [ ] **typescript-tests** - Jest test suite
@@ -23,6 +26,7 @@ main
2326
- [ ] **rust-build** - Rust contract compilation
2427

2528
### Additional protections:
29+
2630
- [x] Require pull request before merging
2731
- [x] Require at least 1 approval (recommended)
2832
- [x] Dismiss stale reviews
@@ -31,13 +35,15 @@ main
3135
- [x] Do not allow bypassing the above settings
3236

3337
## Settings Location for `dev` branch (optional):
38+
3439
Similar settings, but you may allow force pushes for rapid development.
3540

3641
---
3742

3843
## Verification
3944

4045
After setting up, verify by:
46+
4147
1. Creating a test PR
4248
2. Intentionally break a lint rule
4349
3. Verify the PR cannot be merged until fixed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Pull Request Checklist
22

33
### Quality Gates (All must pass before merge)
4+
45
- [ ] **Lint**: Code passes ESLint and Prettier checks
56
- [ ] **Type Check**: TypeScript compilation succeeds
67
- [ ] **Tests**: All tests pass
@@ -11,12 +12,14 @@
1112
- [ ] **Rust Build**: Smart contracts compile successfully
1213

1314
### Additional Requirements
15+
1416
- [ ] New code has appropriate TypeScript types
1517
- [ ] No hardcoded secrets or credentials
1618
- [ ] New features have corresponding tests
1719
- [ ] Documentation updated if needed
1820

1921
### Reviewers
22+
2023
- At least 1 approval required for merge
2124
- All CI checks must be green
2225

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

BUILD_FIX_GUIDE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ Your build is failing due to **React Native dependency version mismatches** with
77
## 🔍 **Root Cause Analysis**
88

99
### **Error Details**
10+
1011
```
1112
> Task :react-native-gesture-handler:compileDebugKotlin FAILED
1213
> Task :react-native-screens:compileDebugKotlin FAILED
1314
```
1415

1516
### **Why This Happens**
17+
1618
- **Expo SDK 53** uses **React Native 0.79.5**
1719
- **React Native Gesture Handler** and **Screens** have version compatibility issues
1820
- **Kotlin compilation** fails due to missing abstract method implementations
1921

2022
## 🛠️ **SOLUTION OPTIONS**
2123

2224
### **Option 1: Use the Fix Script (Recommended)**
25+
2326
```bash
2427
# Make script executable
2528
chmod +x fix-build.sh
@@ -29,6 +32,7 @@ chmod +x fix-build.sh
2932
```
3033

3134
### **Option 2: Manual Fix**
35+
3236
```bash
3337
# Step 1: Clean everything
3438
rm -rf node_modules/
@@ -56,6 +60,7 @@ cd ..
5660
```
5761

5862
### **Option 3: Downgrade React Native (Alternative)**
63+
5964
If the above doesn't work, you can try using React Native 0.78.x:
6065

6166
```bash
@@ -71,6 +76,7 @@ npx expo prebuild --platform android --clean
7176
## 🔧 **WHAT THE FIX SCRIPT DOES**
7277

7378
### **Step-by-Step Process**
79+
7480
1. **🧹 Complete Cleanup**: Removes all build artifacts and dependencies
7581
2. **📦 Dependency Reset**: Reinstalls all packages with compatible versions
7682
3. **🔄 Cache Clear**: Clears Expo cache and fixes dependency conflicts
@@ -79,13 +85,15 @@ npx expo prebuild --platform android --clean
7985
6. **📱 APK Output**: Creates `builds/subtrackr.apk`
8086

8187
### **Files Modified**
88+
8289
- `package.json` - Updated with compatible versions
8390
- `package.json.backup` - Backup of original configuration
8491
- `builds/` - New output directory for APK
8592

8693
## 🚀 **AFTER THE FIX**
8794

8895
### **Successful Build Output**
96+
8997
```
9098
📱 APK Details:
9199
Name: subtrackr.apk
@@ -95,6 +103,7 @@ npx expo prebuild --platform android --clean
95103
```
96104

97105
### **Next Steps**
106+
98107
1. **Test APK**: Install on device to verify functionality
99108
2. **Future Builds**: Use `./build.sh` for regular builds
100109
3. **Hackathon**: Share `builds/subtrackr.apk` with judges
@@ -104,24 +113,28 @@ npx expo prebuild --platform android --clean
104113
### **If Fix Script Fails**
105114

106115
#### **1. Check Java Version**
116+
107117
```bash
108118
java -version
109119
# Should be Java 11 or 17
110120
```
111121

112122
#### **2. Verify Android SDK**
123+
113124
```bash
114125
echo $ANDROID_HOME
115126
# Should point to Android SDK location
116127
```
117128

118129
#### **3. Check Node.js Version**
130+
119131
```bash
120132
node --version
121133
# Should be Node 16+ for Expo SDK 53
122134
```
123135

124136
#### **4. Clear Gradle Cache**
137+
125138
```bash
126139
cd android
127140
./gradlew clean
@@ -132,17 +145,20 @@ cd ..
132145
### **Common Error Messages**
133146

134147
#### **"Permission Denied"**
148+
135149
```bash
136150
chmod +x fix-build.sh
137151
./fix-build.sh
138152
```
139153

140154
#### **"Command Not Found: expo"**
155+
141156
```bash
142157
npm install -g @expo/cli
143158
```
144159

145160
#### **"Android SDK Not Found"**
161+
146162
```bash
147163
export ANDROID_HOME=$HOME/Library/Android/sdk # macOS
148164
export PATH=$PATH:$ANDROID_HOME/platform-tools
@@ -151,26 +167,30 @@ export PATH=$PATH:$ANDROID_HOME/platform-tools
151167
## 📱 **BUILD VERIFICATION**
152168

153169
### **APK Testing Checklist**
170+
154171
- [ ] **Installation**: APK installs without errors
155172
- [ ] **Launch**: App opens without crashes
156173
- [ ] **Navigation**: All screens work properly
157174
- [ ] **Features**: Core functionality operates correctly
158175
- [ ] **Performance**: App responds smoothly
159176

160177
### **Device Compatibility**
178+
161179
- **Android Version**: 5.0+ (API 21+)
162180
- **Architecture**: ARM64, x86_64
163181
- **Screen Sizes**: All standard Android sizes
164182

165183
## 🎯 **HACKATHON READY**
166184

167185
### **What You'll Have**
186+
168187
-**Working APK**: `builds/subtrackr.apk`
169188
-**Professional Build**: Industry-standard process
170189
-**Easy Distribution**: Ready to share with judges
171190
-**Technical Excellence**: Demonstrates build expertise
172191

173192
### **Judging Impact**
193+
174194
- **Problem Solving**: Shows ability to resolve technical issues
175195
- **Technical Depth**: Understanding of React Native build systems
176196
- **Professional Quality**: Production-ready build process
@@ -179,6 +199,7 @@ export PATH=$PATH:$ANDROID_HOME/platform-tools
179199
## 🎉 **SUCCESS!**
180200

181201
After running the fix script, you'll have:
202+
182203
- **🔧 Resolved build issues** with Kotlin compilation
183204
- **📱 Working Android APK** ready for submission
184205
- **🚀 Professional build system** for future development
@@ -187,14 +208,17 @@ After running the fix script, you'll have:
187208
## 🆘 **NEED HELP?**
188209

189210
### **Run the Fix Script**
211+
190212
```bash
191213
./fix-build.sh
192214
```
193215

194216
### **Check the Logs**
217+
195218
The script provides detailed output for each step.
196219

197220
### **Manual Steps**
221+
198222
Follow the manual fix guide if you prefer step-by-step control.
199223

200224
---

0 commit comments

Comments
 (0)