Skip to content

Commit b8067ff

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 6efe3ab + 13ac19d commit b8067ff

86 files changed

Lines changed: 7569 additions & 3880 deletions

Some content is hidden

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

.github/copilot-instructions.md

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This document provides essential context for AI assistants working with the Spli
66

77
Splitwiser is an expense tracking and splitting application with:
88
- Backend: FastAPI + MongoDB
9-
- Frontend POC: Streamlit
10-
- Planned Frontend: Expo/React Native (in development)
9+
- Mobile: Expo/React Native mobile app
10+
- Web: React + Vite + TypeScript web app
1111

1212
The app allows users to create groups, add expenses with flexible splitting options, track balances, and handle settlements.
1313

@@ -23,35 +23,40 @@ The app allows users to create groups, add expenses with flexible splitting opti
2323
- `app/user/`: User profile management
2424
- `app/groups/`: Group creation & management
2525
- `app/expenses/`: Expense tracking & splitting
26-
27-
### Frontend POC (Streamlit)
28-
- Located in `/ui-poc/`
29-
- `Home.py`: Entry point with login/registration
30-
- `pages/`: Contains main application pages
31-
- `Groups.py`: Group management & expense creation
32-
- `Friends.py`: Friend balance tracking
26+
27+
### Mobile (Expo/React Native)
28+
- Located in `/mobile/`
29+
- `App.js`: Main application entry point
30+
- `screens/`: Contains all screen components
31+
- `navigation/`: App navigation structure
32+
- `api/`: API client and service modules
33+
- `context/`: React context providers (AuthContext)
34+
- `utils/`: Utility functions (currency, balance calculations)
35+
36+
### Web (React + Vite + TypeScript)
37+
- Located in `/web/`
38+
- `App.tsx`: Main application entry point
39+
- `pages/`: Contains page components
40+
- `components/`: Reusable UI components
41+
- `contexts/`: React context providers
42+
- `services/`: API client and service modules
3343

3444
## Key Development Patterns
3545

3646
### API Communication
37-
```python
38-
# Example API call with retry logic from Groups.py
39-
response = make_api_request(
40-
method="get",
41-
url=f"{API_URL}/groups/{group_id}",
42-
headers={"Authorization": f"Bearer {st.session_state.access_token}"},
43-
max_retries=3
44-
)
47+
```javascript
48+
// Example API call from mobile/api/client.js
49+
import axios from 'axios';
50+
51+
const client = axios.create({
52+
baseURL: API_URL,
53+
headers: { 'Content-Type': 'application/json' }
54+
});
4555
```
4656

4757
### State Management
4858
- Backend: MongoDB stores persistent data
49-
- Frontend: Streamlit session state manages user session
50-
```python
51-
# Session state initialization (see Home.py)
52-
if "access_token" not in st.session_state:
53-
st.session_state.access_token = None
54-
```
59+
- Mobile/Web: React Context for auth state, component state for UI
5560

5661
### Expense Handling
5762
- Support for different split types: equal, unequal, percentage-based
@@ -67,34 +72,37 @@ if "access_token" not in st.session_state:
6772
pip install -r requirements.txt
6873
uvicorn main:app --reload
6974
```
70-
2. Frontend POC:
75+
2. Mobile:
7176
```bash
72-
cd ui-poc
73-
pip install -r requirements.txt
74-
streamlit run Home.py
77+
cd mobile
78+
npm install
79+
npx expo start
7580
```
76-
3. Test Data Generation:
81+
3. Web:
7782
```bash
78-
cd ui-poc
79-
python setup_test_data.py
83+
cd web
84+
npm install
85+
npm run dev
8086
```
8187

8288
### Testing
8389
- Backend tests in `/backend/tests/`
8490
- Run tests with: `cd backend && pytest`
85-
- Test data setup script: `/ui-poc/setup_test_data.py`
8691

8792
## Critical Files & Dependencies
8893

8994
- `backend/main.py`: Main FastAPI application entry point
9095
- `backend/app/config.py`: Configuration settings
9196
- `backend/app/database.py`: MongoDB connection
92-
- `ui-poc/Home.py`: Streamlit application entry point
93-
- `ui-poc/openapi.json`: API specification for frontend reference
97+
- `mobile/App.js`: Main React Native entry point
98+
- `mobile/context/AuthContext.js`: Authentication state management
99+
- `web/App.tsx`: Main web app entry point
100+
- `web/contexts/AuthContext.tsx`: Web authentication state management
94101

95102
## Common Tasks
96103

97-
- Adding new API endpoint: Add route to appropriate service router file
98-
- Adding new UI component: Modify files in `/ui-poc/pages/`
99-
- Testing data flow: Use the `setup_test_data.py` to create test scenarios
100-
- Troubleshooting auth: Check JWT token handling in `app/auth/security.py`
104+
- Adding new API endpoint: Add route to appropriate service router file in `backend/app/`
105+
- Adding new mobile screen: Create component in `mobile/screens/` and add to navigation
106+
- Adding new web page: Create component in `web/pages/` and add to routing
107+
- API integration: Add service functions in `mobile/api/` or `web/services/`
108+
- Troubleshooting auth: Check JWT token handling in `backend/app/auth/security.py`

.github/workflows/bundle-analysis.yml.disabled

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

.github/workflows/preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929

3030
- name: Install dependencies
3131
run: npm install
32-
working-directory: ./frontend
32+
working-directory: mobile/
3333

3434
- name: Create preview
3535
uses: expo/expo-github-action/preview@v8
3636
with:
3737
command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}
38-
working-directory: ./frontend
38+
working-directory: mobile/

.github/workflows/rn-bundle-analysis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: React Native Bundle Analysis
33
on:
44
pull_request:
55
paths:
6-
- 'frontend/**'
6+
- 'mobile/**'
77
branches: [ main, master ]
88
push:
99
paths:
10-
- 'frontend/**'
10+
- 'mobile/**'
1111
branches: [ main, master ]
1212

1313
jobs:
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
node-version: '18'
2626
cache: 'npm'
27-
cache-dependency-path: frontend/package-lock.json
27+
cache-dependency-path: mobile/package-lock.json
2828

2929
- name: Setup EAS
3030
uses: expo/expo-github-action@v8
@@ -34,10 +34,10 @@ jobs:
3434

3535
- name: Install Dependencies
3636
run: npm install
37-
working-directory: ./frontend
37+
working-directory: mobile/
3838

3939
- name: Analyze React Native Bundle Size
40-
working-directory: ./frontend
40+
working-directory: mobile/
4141
run: |
4242
echo "📊 Analyzing React Native bundle size..."
4343
@@ -105,11 +105,11 @@ jobs:
105105
fi
106106
107107
- name: Upload RN Bundle Analysis Report
108-
if: always() && hashFiles('frontend/bundle-analysis.md') != ''
108+
if: always() && hashFiles('mobile/bundle-analysis.md') != ''
109109
uses: actions/upload-artifact@v4
110110
with:
111111
name: rn-bundle-analysis-report
112-
path: frontend/bundle-analysis.md
112+
path: mobile/bundle-analysis.md
113113
retention-days: 30
114114

115115
- name: RN Bundle Analysis Skipped

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ firebase-service-account*.json
7070
firebase-adminsdk*.json
7171
service-account*.json
7272

73+
# Google OAuth Secrets
74+
client_*.plist
75+
client_secret_*.json
76+
7377
# IDE
7478
.vscode/settings.json
7579
.idea/
@@ -78,3 +82,15 @@ service-account*.json
7882
# Logs
7983
*.log
8084
logs/
85+
86+
# Backend local files
87+
backend/backups/
88+
backend/logs/
89+
backend/migrations/*.log
90+
migration_*.log
91+
92+
# PDFs and docs that shouldn't be tracked
93+
*.pdf
94+
95+
# Root level requirements (use backend/requirements.txt)
96+
/requirements.txt

0 commit comments

Comments
 (0)