Skip to content

Commit 7ccca78

Browse files
DevasyAneeshAhuja31pre-commit-ci[bot]
authored
feat(groups): enhance expense splitting options with detailed methods and UI improvements (#49)
* Remove frontend codebase including package.json, HomeScreen, LoginScreen, and TypeScript configuration files * Add detailed documentation for Friends, Groups, Main Navigation, and Settlement screens - Introduced Friends Screens documentation including Friends List, Friend Detail, Add Friend, Friend Search Results. - Added Groups Screens documentation covering Groups List, Group Details, Group Management, Join Group. - Created Main Navigation documentation detailing Home Screen, Notifications Screen, Profile Menu, Activity Detail Screen. - Developed Settlement Screens documentation featuring Settlement Summary, Optimized Settlement, Record Payment, Payment Confirmation, Payment History. * Add Friends and Groups pages with API integration - Created Friends.py page with placeholder for future features. - Developed Groups.py page with functionalities to join, create, and manage groups. - Implemented API request handling with retry logic. - Added debug mode for troubleshooting API interactions. - Included session state management for user authentication and group selection. - Updated requirements.txt to include necessary packages for the project. * feat(groups): enhance expense splitting options with detailed methods and UI improvements * feat(friends): implement friends balance calculation and debug mode for better user experience * feat(groups): enhance group expense and settlement features with optimized calculations and debug information * fix(groups): update group creation logic to align with API schema and improve error handling * added cookie baased auth in streamlit using streamlit-cookie-manager. On reload, the auth persist. Will enhance expense handling flow later. (#83) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Aneesh Ahuja <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 56dd9dc commit 7ccca78

27 files changed

+5850
-17929
lines changed

docs/Group-Screen-Flow.png

93 KB
Loading

docs/design-system.md

Lines changed: 616 additions & 0 deletions
Large diffs are not rendered by default.

docs/folder-structure.md

Lines changed: 445 additions & 0 deletions
Large diffs are not rendered by default.

docs/frontend-ui-design.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SplitWiser: Mobile App Frontend UI Design
2+
3+
## Overview
4+
SplitWiser is a React Native + Expo mobile application built with Material 3 design principles. The app focuses on intuitive expense splitting and settlement optimization with minimal user interface complexity.
5+
6+
## Technology Stack
7+
- **Framework**: React Native + Expo
8+
- **UI Library**: React Native Paper (Material 3)
9+
- **State Management**: Redux Toolkit
10+
- **Navigation**: React Navigation v6
11+
- **Design System**: Material Design 3
12+
13+
## Documentation Structure
14+
This frontend design is organized across multiple documents for better maintainability:
15+
16+
- **[User Flow & Navigation](./frontend-user-flow.md)** - App navigation patterns and user journey
17+
- **[Authentication Screens](./screens/auth-screens.md)** - Login, signup, and onboarding flows
18+
- **[Main Navigation](./screens/main-navigation.md)** - Home screen and overall app navigation
19+
- **[Groups Management](./screens/groups-screens.md)** - Groups list, details, and management
20+
- **[Expense Creation](./screens/expense-creation.md)** - Step-by-step expense addition flow
21+
- **[Friends Management](./screens/friends-screens.md)** - Friends list and individual friend details
22+
- **[Settlement Flow](./screens/settlement-screens.md)** - Debt optimization and payment recording
23+
- **[Material 3 Design System](./design-system.md)** - Colors, typography, and component specifications
24+
- **[Folder Structure](./folder-structure.md)** - React Native + Expo project organization
25+
26+
## Quick Reference
27+
28+
### Key UX Principles
29+
1. **Progressive Disclosure**: Show only relevant information at each step
30+
2. **Smart Defaults**: Pre-fill common values and selections
31+
3. **Real-time Feedback**: Show calculations and validations immediately
32+
4. **Error Prevention**: Validate inputs before allowing progression
33+
5. **Consistent Interactions**: Use same patterns across similar features
34+
6. **Accessibility First**: Support screen readers and large text
35+
7. **Offline Support**: Cache data and sync when connection restored
36+
37+
### Navigation Structure
38+
- **Bottom Navigation**: Home, Groups, Friends (3 main tabs)
39+
- **Authentication Stack**: Login/Signup flow
40+
- **Modal Stacks**: Expense creation, Settlement flows
41+
- **Screen Transitions**: Material motion patterns with smooth animations
42+
43+
### Implementation Notes
44+
- Use `react-native-paper` v5+ for Material 3 components
45+
- Implement dynamic color theming based on system preferences
46+
- Follow Material 3 guidelines for spacing, elevation, and typography
47+
- Support both light and dark modes with automatic switching
48+
- Ensure accessibility compliance with screen readers and large text support

docs/frontend-user-flow.md

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
# SplitWiser: User Flow & Navigation
2+
3+
## App User Flow Diagram
4+
5+
```plantuml
6+
@startuml
7+
skinparam backgroundColor white
8+
skinparam DefaultFontName "Roboto"
9+
skinparam DefaultFontSize 12
10+
skinparam ArrowColor #6200EE
11+
skinparam ActivityBorderColor #6200EE
12+
skinparam ActivityBackgroundColor #E8DEF8
13+
skinparam ActivityDiamondBackgroundColor #E8DEF8
14+
skinparam ActivityDiamondBorderColor #6200EE
15+
16+
title SplitWiser App User Flow
17+
18+
(*) --> "Login Screen"
19+
"Login Screen" --> "Authenticate" : Login/Google Sign In
20+
"Authenticate" --> "Main Navigation"
21+
22+
"Main Navigation" -right-> "Home Tab"
23+
"Main Navigation" -down-> "Groups Tab"
24+
"Main Navigation" -left-> "Friends Tab"
25+
26+
"Home Tab" --> "Recent Activity Feed"
27+
"Home Tab" --> "Overall Balance"
28+
"Home Tab" --> "Analytics Charts"
29+
"Home Tab" -right-> "Notification Center" : Tap Notification Icon
30+
31+
"Groups Tab" --> "Group List"
32+
"Group List" --> "Create Group" : + Button
33+
"Group List" --> "Join Group" : Join Button
34+
"Group List" --> "Group Detail" : Tap Group
35+
36+
"Group Detail" --> "Group Header" : Group name & members
37+
"Group Detail" --> "Settlement Summary" : Balances owed/to receive
38+
"Group Detail" --> "Expense Feed" : Chronological list
39+
"Group Detail" --> "Add Expense" : FAB
40+
41+
"Add Expense" --> "Basic Info Screen" : Step 1
42+
"Basic Info Screen" --> "Payment Selection" : Step 2
43+
"Payment Selection" --> "Split Options Screen" : Step 3
44+
45+
"Split Options Screen" --> "Equal Split" : Toggle option
46+
"Split Options Screen" --> "Unequal Split" : Toggle option
47+
48+
"Equal Split" --> "Member Selection"
49+
"Unequal Split" --> "Split Method Selection"
50+
"Split Method Selection" --> "By Shares"
51+
"Split Method Selection" --> "By Percentages"
52+
"Split Method Selection" --> "By Exact Values"
53+
54+
"Member Selection" --> "Save Expense"
55+
"By Shares" --> "Save Expense"
56+
"By Percentages" --> "Save Expense"
57+
"By Exact Values" --> "Save Expense"
58+
"Save Expense" --> "Group Detail"
59+
60+
"Friends Tab" --> "Friend List"
61+
"Friend List" --> "Friend Detail" : Tap Friend
62+
"Friend Detail" --> "Settle Up" : Settlement flow
63+
"Settle Up" --> "Payment Method"
64+
"Payment Method" --> "Record Payment"
65+
"Record Payment" --> "Friend Detail"
66+
67+
"Group Detail" --> "Expense Detail" : Tap Expense
68+
"Expense Detail" --> "Edit Expense" : Edit (creator only)
69+
"Expense Detail" --> "Delete Expense" : Delete (creator only)
70+
71+
@enduml
72+
```
73+
74+
## Detailed User Journeys
75+
76+
### 1. Authentication Journey
77+
78+
#### New User Registration
79+
1. **Landing** → User opens app for the first time
80+
2. **Welcome Screen** → Brief app introduction with continue button
81+
3. **Sign Up** → Email, password, confirm password fields
82+
4. **Email Verification** → Verify email address (if required)
83+
5. **Onboarding** → 3-4 screens explaining key features
84+
6. **Profile Setup** → Name, profile picture, currency preference
85+
7. **Main App** → Redirect to home screen
86+
87+
#### Existing User Login
88+
1. **Login Screen** → Email/password or Google Sign-in
89+
2. **Authentication** → Validate credentials
90+
3. **Main App** → Direct to home screen with recent activity
91+
92+
#### Password Recovery
93+
1. **Login Screen** → "Forgot Password" link
94+
2. **Reset Request** → Enter email address
95+
3. **Email Sent** → Confirmation message
96+
4. **Reset Password** → New password form (from email link)
97+
5. **Login** → Return to login with new credentials
98+
99+
### 2. Group Management Journey
100+
101+
#### Creating a Group
102+
1. **Groups List** → Tap "Create new group"
103+
2. **Group Details** → Name, description, group image
104+
3. **Add Members** → Search and invite friends/contacts
105+
4. **Invitation Method** → Email, phone, QR code, or link
106+
5. **Group Created** → Navigate to new group detail screen
107+
6. **First Expense** → Optional prompt to add first expense
108+
109+
#### Joining a Group
110+
1. **Groups List** → Tap "Join Group" button
111+
2. **Join Method** → Choose from QR scan, invite code, or link
112+
3. **Group Preview** → Show group details before joining
113+
4. **Confirm Join** → Accept invitation
114+
5. **Group Detail** → Navigate to joined group
115+
116+
#### Group Settings
117+
1. **Group Detail** → Tap settings icon
118+
2. **Group Settings** → Edit name, description, image
119+
3. **Manage Members** → Add/remove members, change permissions
120+
4. **Leave Group** → Option to leave (with confirmation)
121+
5. **Archive Group** → Archive completed groups
122+
123+
### 3. Expense Creation Journey
124+
125+
#### Complete Expense Flow
126+
1. **Group Detail** → Tap FAB (+) button
127+
2. **Step 1: Basic Info**
128+
- Enter amount with currency formatting
129+
- Add description (required)
130+
- Select category from dropdown
131+
- Optional: Capture receipt photo
132+
- Tap "Next"
133+
134+
3. **Step 2: Payment Selection**
135+
- Choose who paid:
136+
- "I paid" (default selection)
137+
- "Someone else paid" → Select from group members
138+
- "Multiple people paid" → Enter amounts for each payer
139+
- Validate total matches expense amount
140+
- Tap "Next"
141+
142+
4. **Step 3: Split Options**
143+
- **Equal Split**:
144+
- Select members to include in split
145+
- Real-time calculation of per-person amount
146+
- **Unequal Split**:
147+
- Choose method: Shares, Percentages, or Exact Amounts
148+
- Enter values for each person
149+
- Real-time validation and calculation
150+
- Tap "Save"
151+
152+
5. **Confirmation** → Brief success message
153+
6. **Return to Group** → Updated expense feed with new entry
154+
155+
### 4. Settlement Journey
156+
157+
#### Viewing Settlement Summary
158+
1. **Group Detail** → View settlement summary card
159+
2. **Settlement Options**:
160+
- "No pending payments" (if balanced)
161+
- "Settle Up" button (if debts exist)
162+
- Balance amount with color coding
163+
164+
#### Optimized Settlement Flow
165+
1. **Group Detail** → Tap "Settle Up"
166+
2. **Optimized View** → Algorithm shows minimum transactions needed
167+
3. **Settlement List** → Each required payment with clear direction
168+
4. **Record Payments** → Bulk action to record all payments
169+
5. **Individual Recording** → Option to record payments separately
170+
171+
#### Individual Settlement
172+
1. **Friend Detail** → Tap "Settle Up"
173+
2. **Payment Amount** → Pre-filled with owed amount (editable)
174+
3. **Payment Method** → Select from Cash, Bank Transfer, Venmo, etc.
175+
4. **Payment Note** → Optional reference or memo
176+
5. **Confirmation** → Review payment details
177+
6. **Record Payment** → Update balances across all groups
178+
179+
### 5. Friends Management Journey
180+
181+
#### Adding Friends
182+
1. **Friends List** → Tap "Add friend"
183+
2. **Search Methods**:
184+
- Search by email/phone
185+
- Import from contacts
186+
- QR code scan
187+
- Share invite link
188+
3. **Send Invitation** → Friend receives notification
189+
4. **Acceptance** → Friend appears in friends list
190+
191+
#### Friend Interaction
192+
1. **Friends List** → View all friends with balance indicators
193+
2. **Friend Detail** → Tap on specific friend
194+
3. **Shared History** → View shared groups and transactions
195+
4. **Direct Settlement** → Settle balances across all groups
196+
5. **Transaction Filter** → Filter by group or date range
197+
198+
### 6. Home Dashboard Journey
199+
200+
#### Daily Usage
201+
1. **App Launch** → Home screen with recent activity
202+
2. **Quick Actions**:
203+
- View overall balance summary
204+
- Check recent transactions
205+
- Access notifications
206+
- Navigate to active groups
207+
208+
#### Analytics Review
209+
1. **Home Screen** → Scroll to analytics section
210+
2. **Monthly Summary** → Spending breakdown by category
211+
3. **Trend Analysis** → Compare spending across time periods
212+
4. **Group Insights** → Most active groups and frequent expenses
213+
214+
## Navigation Patterns
215+
216+
### Bottom Tab Navigation
217+
- **Home**: Dashboard, recent activity, analytics
218+
- **Groups**: Group list, group details, expense management
219+
- **Friends**: Friends list, individual balances, settlements
220+
221+
### Modal Presentations
222+
- **Expense Creation**: 3-step modal flow
223+
- **Settlement Flow**: Modal for payment recording
224+
- **Group Creation**: Modal for new group setup
225+
- **Profile Actions**: Modal for profile-related actions
226+
227+
### Stack Navigation
228+
- Each tab maintains its own navigation stack
229+
- Deep linking support for shared expenses and group invites
230+
- Proper back navigation with state preservation
231+
232+
## Error Handling & Edge Cases
233+
234+
### Network Issues
235+
- Offline mode with local storage
236+
- Sync when connection restored
237+
- Clear indication of sync status
238+
239+
### Form Validation
240+
- Real-time validation feedback
241+
- Clear error messages
242+
- Prevention of invalid submissions
243+
244+
### Permission Handling
245+
- Camera access for receipt capture
246+
- Contacts access for friend invitations
247+
- Notification permissions for updates
248+
249+
### Conflict Resolution
250+
- Handle concurrent edits to expenses
251+
- Clear indication of outdated data
252+
- Automatic refresh when conflicts detected
253+
254+
## Accessibility Considerations
255+
256+
### Screen Reader Support
257+
- Semantic labels for all interactive elements
258+
- Proper heading hierarchy
259+
- Descriptive button and link text
260+
261+
### Visual Accessibility
262+
- High contrast mode support
263+
- Large text size compatibility
264+
- Color-blind friendly design
265+
266+
### Motor Accessibility
267+
- Minimum touch target sizes (44px)
268+
- Alternative input methods
269+
- Voice control compatibility
270+
271+
This user flow ensures a smooth, intuitive experience while maintaining the app's core functionality and Material 3 design principles.

0 commit comments

Comments
 (0)