Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cf9ac62
optimize session handling
lukegskw Sep 2, 2025
e3a93bf
add session data to credentials
lukegskw Sep 4, 2025
7a07ee6
fix input validation
lukegskw Sep 7, 2025
613398c
improve code
lukegskw Sep 8, 2025
83e2ea6
improve code
lukegskw Sep 10, 2025
2f8b4ed
optimize code
lukegskw Sep 10, 2025
b980d2a
optimize code
lukegskw Sep 10, 2025
3aebd70
Merge branch 'main' of github.com:lukegskw/vouchpass into fix-session
lukegskw Sep 11, 2025
f59aaf3
add claude and try to fix session and details styling
lukegskw Sep 11, 2025
d3aefef
fix duplicated key of react animated
lukegskw Sep 11, 2025
40ab35b
Merge branch 'main' of github.com:lukegskw/vouchpass into fix-session
lukegskw Sep 11, 2025
5541e04
add claude instructions
lukegskw Sep 12, 2025
6352e7b
refactor voucher value operations and clean up unused components
lukegskw Sep 12, 2025
305c3c7
feat: add scan from gallery functionality (#30)
lukegskw Sep 12, 2025
3917618
fix: add NSPhotoLibraryUsageDescription for iOS photo library access
lukegskw Sep 12, 2025
7a65c2c
fix: add NSPhotoLibraryUsageDescription to iOS Info.plist
lukegskw Sep 12, 2025
d7f3f71
improve: enhance barcode detection with better debugging and robustness
lukegskw Sep 12, 2025
3f5994a
add pick image
lukegskw Sep 12, 2025
8274844
fix typo
lukegskw Sep 12, 2025
d3d0a50
add serena, claude agents, mock files and fix image upload
lukegskw Sep 13, 2025
04b6d67
fix folder sync
lukegskw Sep 20, 2025
cfc20c7
Revert "fix folder sync"
lukegskw Sep 20, 2025
1cf9502
improve sharing
lukegskw Sep 21, 2025
4c9da04
fix rules
lukegskw Sep 22, 2025
73b3c19
fix sharing
lukegskw Sep 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .claude/agents/gpt5-codebase-analyst.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: gpt5-codebase-analyst
description: Use this agent when you need to use gpt-5 for deep research, second opinion or fixing a bug. Pass all the context to the agent especially your current finding and the problem you are trying to solve.
tools: Bash
model: sonnet
color: red
---

You are a senior software architect specializing in rapid codebase analysis and comprehensive problem-solving. Your expertise lies in leveraging advanced AI reasoning capabilities to provide deep insights, second opinions, and solutions for complex technical challenges.

When activated, you will:

1. **Execute Codebase Analysis**: Immediately run `cursor-agent -p "TASK and CONTEXT"` to gather the latest comprehensive codebase information, where TASK and CONTEXT should be replaced with the specific problem description and any current findings provided by the user.

2. **Process Context Thoroughly**: Analyze all provided context including:
- Current findings and investigation results
- Problem description and symptoms
- System interactions and dependencies
- Recent changes or modifications
- Error logs and debugging information

3. **Apply Advanced Reasoning**: Use sophisticated analysis techniques to:
- Identify root causes and contributing factors
- Trace data flow and system interactions
- Evaluate architectural implications
- Consider edge cases and failure scenarios
- Assess performance and scalability impacts

4. **Provide Comprehensive Solutions**: Deliver actionable recommendations that include:
- Step-by-step debugging approaches
- Architectural improvements or alternatives
- Code-level fixes with specific implementation details
- Risk assessment and mitigation strategies
- Testing approaches to verify solutions

5. **Maintain Project Standards**: Ensure all recommendations align with:
- Docker-only deployment patterns
- TypeScript interfaces (IName prefix)
- Test-driven development (prove code works)
- DRY/SRP/KISS/YAGNI principles
- Existing system documentation patterns

6. **Report Structure**: Always provide:
- Executive summary of findings
- Detailed technical analysis
- Prioritized action items
- Implementation timeline estimates
- Potential risks and dependencies

You excel at connecting disparate pieces of information, identifying subtle bugs, and providing fresh perspectives on complex technical challenges. Your analysis should be thorough yet actionable, providing both immediate fixes and long-term architectural guidance.
14 changes: 14 additions & 0 deletions .claude/commands/fix-github-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Please analyze and fix the GitHub issue: $ARGUMENTS.

Follow these steps:

1. Use `gh issue view` to get the issue details
2. Understand the problem described in the issue
3. Search the codebase for relevant files
4. Implement the necessary changes to fix the issue
5. Write and run tests to verify the fix
6. Ensure code passes linting and type checking
7. Create a descriptive commit message
8. Push and create a PR

Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks.
25 changes: 25 additions & 0 deletions .claude/commands/ios-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Automate iOS app build and submission to App Store Connect.

Follow these steps:

1. Build the iOS app locally using EAS
2. Automatically detect the generated IPA file
3. Submit the IPA to App Store Connect without manual intervention
4. Handle any errors and provide clear feedback

The automation will:

- Build using: `eas build --platform ios --local --non-interactive`
- Auto-detect the newest IPA file in the current directory
- Submit using: `eas submit --platform ios --path <detected-ipa>`
- Eliminate the need to manually copy/paste build names
- Skip email confirmation prompts with proper EAS configuration
- Delete the IPA file after submission

Prerequisites:

- EAS CLI must be authenticated (`eas login`)
- Apple credentials must be configured (`eas credentials`)
- App Store Connect API key should be set up for non-interactive submission

Remember to run this from the project root directory where IPA files are generated.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXPO_PUBLIC_API_URL=https://vouchpass-development.up.railway.app/api/v1
EXPO_PUBLIC_POWERSYNC_URL=https://vouchpass-powersync-development.up.railway.app
EXPO_PUBLIC_API_URL=https://vouchpass-production.up.railway.app/api/v1
EXPO_PUBLIC_POWERSYNC_URL=https://vouchpass-powersync-production.up.railway.app

EXPO_PUBLIC_SUPABASE_URL=https://omnnfpgzpqyczpbzudfz.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9tbm5mcGd6cHF5Y3pwYnp1ZGZ6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDQ2NDkzNjIsImV4cCI6MjA2MDIyNTM2Mn0.fwjxBRO1EOiKPKlQbyXSNznlWSlkVa9SK8broujJgF8
Expand Down
12 changes: 12 additions & 0 deletions .env_dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
EXPO_PUBLIC_API_URL=https://vouchpass-development.up.railway.app/api/v1
EXPO_PUBLIC_POWERSYNC_URL=https://vouchpass-powersync-development.up.railway.app

EXPO_PUBLIC_SUPABASE_URL=https://omnnfpgzpqyczpbzudfz.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9tbm5mcGd6cHF5Y3pwYnp1ZGZ6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDQ2NDkzNjIsImV4cCI6MjA2MDIyNTM2Mn0.fwjxBRO1EOiKPKlQbyXSNznlWSlkVa9SK8broujJgF8

EXPO_PUBLIC_GOOGLE_SIGNIN_WEB_CLIENT_ID=489264128802-uj02u2rjra1dl7la1b3os1jmvng172mm.apps.googleusercontent.com
EXPO_PUBLIC_GOOGLE_SIGNIN_IOS_CLIENT_ID=489264128802-bgug1a0tfmm976stgv4ctsk6jnl0n5r4.apps.googleusercontent.com
EXPO_PUBLIC_GOOGLE_SIGNIN_SCOPE=https://www.googleapis.com/auth/drive

EXPO_PUBLIC_REVENUE_CAT_API_IOS=appl_czzUPBfNxPWhikPgMGuutSlgmMB
EXPO_PUBLIC_REVENUE_CAT_API_ANDROID=goog_CIjdMrGTRzxFIbRNTxPmpFuDLtm
11 changes: 11 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ npx eas update # Over-the-air updates
- If it's a component inside the `components` folder, create a styles file inside the component folder (for example `iconStyles.ts` for `components/icons`)
- If it's a tab or screen inside the `app` folder, create a styles file inside the `styles` folder in the root (for example `currencyStyles.ts` for `app/(tabs)/(settings)/currency.tsx`)

### Documentation

- Only comment the code where strictly necessary and where the logic is not immediately clear

### Logging

- Use logs where necessary to track application behavior and state
- Use appropriate log levels (info, warn, error) for different log messages
- Avoid logging sensitive information (e.g., passwords, tokens)
- Do not ever use emojis in log messages

## FOLDER STRUCTURE

Follow this structured directory layout:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ yarn-error.*
*.tsbuildinfo

app-example

# build artifacts
*.ipa
1 change: 1 addition & 0 deletions .serena/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/cache
60 changes: 60 additions & 0 deletions .serena/memories/code_style_conventions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Code Style and Conventions for VouchPass

## TypeScript Standards
- **Strict mode enabled** in tsconfig.json
- **Never use `any` type** - use `unknown` for uncertain types
- **Always use named exports** - no default exports
- **Component props type should be named `Props`** and never exported
- **Use `type` instead of `interface`** unless necessary for extending
- **Path alias**: Use `@/*` for imports from project root

## React/React Native Standards
- **Use functional components** with React hooks exclusively
- **Use `React.FC`** for components with props
- **Apply `React.memo()`** for components with static props
- **No inline styles** - create separate StyleSheet files:
- Components: styles file in component folder (e.g., `components/icons/iconStyles.ts`)
- Screens: styles file in root `styles/` folder (e.g., `styles/currencyStyles.ts`)
- **Add accessibility props** for iOS simulator MCP interaction

## Styling Guidelines
- **Use Tamagui** for consistent theming
- **Dark mode as default** theme
- **Responsive design** for different screen sizes
- **No inline styles** - always use StyleSheet
- **Style file organization**:
- Component styles: Inside component folder
- Screen styles: In root `styles/` folder

## Performance Best Practices
- **Minimize `useEffect` and `useState`** in render
- **Optimize FlatLists**: Use `removeClippedSubviews`, `maxToRenderPerBatch`, `windowSize`
- **Use `getItemLayout`** for consistent item sizes
- **Avoid anonymous functions** in `renderItem` or event handlers

## Code Organization
- **Feature-based organization** - group related components, hooks, and styles
- **Modular and reusable components**
- **Provider hierarchy must be maintained** in app/_layout.tsx

## Documentation & Comments
- **Only comment where strictly necessary** - when logic is not immediately clear
- **No unnecessary documentation**
- **Code should be self-documenting**

## Logging Standards
- **Use appropriate log levels**: info, warn, error
- **Never log sensitive information** (passwords, tokens, personal data)
- **No emojis in log messages**

## Error Handling
- **Use try-catch blocks** for network errors, functional errors, runtime exceptions
- **User-friendly messages**: "Something went wrong. Please try again shortly."
- **Technical logging** for development/debugging
- **Use Tamagui toast** for user feedback

## Security
- **Sanitize all user inputs**
- **Use secure storage** for sensitive data
- **Never log sensitive information**
- **Validate subscription states server-side**
25 changes: 25 additions & 0 deletions .serena/memories/project_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# VouchPass Project Overview

## Project Purpose
VouchPass is a React Native/Expo mobile application for managing vouchers and subscription management. The app provides users with the ability to manage their vouchers digitally, extract vouchers from PDFs using barcode scanning, and includes premium features through subscription management.

## Tech Stack
- **React Native/Expo 52**: Cross-platform mobile development framework
- **TypeScript**: Static typing with strict mode enabled
- **Tamagui**: UI framework and design system (dark theme default)
- **PowerSync**: Real-time data synchronization
- **RevenueCat**: Subscription and in-app purchase management
- **Supabase**: Authentication and backend services
- **Expo Router**: File-based navigation with typed routes
- **Objective-C**: Native iOS module development
- **Kotlin**: Native Android module development

## Architecture
- **Provider Hierarchy**: TamaguiProvider → AuthProvider → SubscriptionProvider → PowerSyncProvider → UIProvider → VoucherProvider
- **File-based Routing**: Using Expo Router for navigation
- **Context-based State Management**: Multiple React contexts for different app features
- **Native Modules**: Custom native modules for PDF barcode extraction on both iOS and Android

## System Platform
- Development platform: Darwin (macOS)
- Target platforms: iOS and Android
49 changes: 49 additions & 0 deletions .serena/memories/project_structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# VouchPass Project Structure

## Root Directory Structure
```
vouchpass/
├── app/ # Expo Router navigation structure
│ ├── (tabs)/ # Main tabbed interface
│ │ ├── (home)/ # Home screen with voucher management
│ │ └── (settings)/ # Settings screens (profile, auth, currency, pro, feedback)
│ └── _layout.tsx # Root layout with provider hierarchy
├── components/ # Reusable UI components organized by feature
├── contexts/ # React contexts for state management
├── services/ # API services and PowerSync integration
├── utils/ # Utility functions (PDF extraction, currency formatting)
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
├── styles/ # Screen-level style files
├── constants/ # App constants and configuration
├── config/ # Configuration files
├── assets/ # Images, fonts, and other static assets
├── ios/ # Ejected iOS native code
│ └── NativePDFBarcodeExtractor/ # Native iOS barcode extraction module
├── android/ # Ejected Android native code
│ └── pdfextractor/ # Native Android barcode extraction module
├── screenshots/ # Screenshot storage for testing
└── specs/ # Component specifications

## Key Files
- `app/_layout.tsx`: Root layout with provider hierarchy setup
- `package.json`: Dependencies and scripts
- `tsconfig.json`: TypeScript configuration (strict mode)
- `.eslintrc.cjs`: ESLint configuration
- `eas.json`: EAS Build configuration
- `CLAUDE.md`: AI assistant instructions
- `.env`: Environment variables

## Provider Hierarchy (Critical Order)
1. TamaguiProvider (UI framework)
2. AuthProvider (Authentication)
3. SubscriptionProvider (RevenueCat)
4. PowerSyncProvider (Data sync)
5. UIProvider (UI state)
6. VoucherProvider (Voucher management)

## Navigation Structure
- File-based routing with Expo Router
- Typed routes enabled
- Tab-based main navigation
- Nested screens within each tab
49 changes: 49 additions & 0 deletions .serena/memories/suggested_commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Suggested Commands for VouchPass Development

## Running the Application
```bash
npx expo run:ios # Start iOS simulator
npm run android # Start Android emulator
npx expo start # Start Expo development server
```

## Testing & Quality Checks
```bash
npm test # Run Jest tests with watch mode
npm run lint # Run ESLint
npm run test:eslint # Run ESLint check with colored output
npm run test:tsc # TypeScript type checking
```

## Building & Deployment
```bash
npx eas build --platform all # Build for both platforms
npx eas build --platform ios # Build for iOS only
npx eas build --platform android # Build for Android only
npx eas submit # Submit to app stores
npx eas update # Over-the-air updates
```

## System Commands (Darwin/macOS)
```bash
git status # Check git status
git add . # Stage all changes
git commit -m "message" # Commit changes
ls -la # List files with details
find . -name "*.tsx" # Find TypeScript React files
grep -r "pattern" . # Search for pattern in files
```

## Dependency Management
```bash
npm install # Install dependencies
npm install [package] # Add new package
npm update # Update packages
```

## iOS Simulator Control
```bash
xcrun simctl list # List available simulators
xcrun simctl boot [UDID] # Boot specific simulator
open -a Simulator # Open iOS Simulator app
```
50 changes: 50 additions & 0 deletions .serena/memories/task_completion_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Task Completion Checklist for VouchPass

## After Making Code Changes

### 1. Run Quality Checks (MANDATORY)

```bash
npm run test:eslint # Check ESLint rules
npm run test:tsc # Check TypeScript types
npm run lint # Run comprehensive linting
```

### 2. Test in Simulator

- Only test when explicitly asked
- Start the iOS app in the simulator with `npx expo run:ios` for testing
- Always wait 10 seconds before checking if the app has really launched and running in the simulator
- Test vouchers can be found under `/mock`. Use the subdirectory `/mock/pdf` for pdf files and `mock/image` for images for testing the barcode extraction functionality

### 3. Verify No Breaking Changes

- Check that existing functionality still works
- Ensure provider hierarchy is maintained if modified
- Verify subscription states if RevenueCat code was touched
- Check that PowerSync synchronization works if data layer was modified

### 4. Code Review Checklist

- [ ] No `any` types used
- [ ] All exports are named exports
- [ ] No inline styles present
- [ ] Proper error handling with try-catch
- [ ] No sensitive data in logs
- [ ] Components are properly memoized if needed
- [ ] FlatLists are optimized if used
- [ ] Accessibility props added where appropriate

### 5. Before Committing

- Run all tests and ensure they pass
- Verify ESLint and TypeScript checks pass
- Test the feature in the simulator
- Ensure no console errors or warnings

## Important Reminders

- **NEVER commit if tests are failing**
- **NEVER commit if TypeScript errors exist**
- **NEVER commit sensitive information**
- **ALWAYS test in simulator before marking task complete**
Loading