Skip to content

Workouts and pb #1657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
9824de3
test
ezouu May 8, 2025
2b67a39
converted code from react to native
ezouu May 8, 2025
dd44326
get started button for welcome screen
Andurdur May 13, 2025
8e6c496
signup.tsx
acashmoney777 May 19, 2025
d0699ba
Merge branch 'master' of github.com:KushK04/KonditionFastAPI
acashmoney777 May 19, 2025
767a29e
modified so that it takes u to signup page when appropriate
acashmoney777 May 19, 2025
7ce10e8
Moved signup.tsx out of (tabs), added signup2.tsx
acashmoney777 May 19, 2025
11f3a79
routing
acashmoney777 May 20, 2025
43f704b
home page made
Andurdur May 20, 2025
2e85c30
routing to home
acashmoney777 May 20, 2025
ca9cf6b
added image
Andurdur May 20, 2025
eff2910
bottom nav
acashmoney777 May 20, 2025
05f8b1e
Merge branch 'master' of github.com:KushK04/KonditionFastAPI
acashmoney777 May 20, 2025
e4fe973
package update
acashmoney777 May 20, 2025
5c81140
added home images
Andurdur May 20, 2025
7125625
fixed folder location for home pics
Andurdur May 20, 2025
f9fe71d
Merge branch 'master' of github.com:KushK04/KonditionFastAPI
acashmoney777 May 20, 2025
9de15cc
fixed location pngs
Andurdur May 20, 2025
24ca54f
name chagne
Andurdur May 20, 2025
56583cb
fix packages
Andurdur May 20, 2025
1612345
fixed package issues should work
Andurdur May 20, 2025
14830d7
added routing to home screen
Andurdur May 20, 2025
826c667
added header for navigation
Andurdur May 20, 2025
bebbad4
notification
shaynadas May 22, 2025
dadf376
Merge backend changes from other branch
jgmuende May 22, 2025
9520862
home page names
acashmoney777 May 23, 2025
8bbe3ea
packages and contexts
acashmoney777 May 23, 2025
4802060
register page fix
acashmoney777 May 23, 2025
99abbbb
signup 2 fixes, no bugs now
acashmoney777 May 23, 2025
6fcf2e8
profile page + signup validations
acashmoney777 May 23, 2025
2ec74e3
keeps track of age, weight, height of users
acashmoney777 May 23, 2025
72dd735
used router for code consistency
Andurdur May 23, 2025
4326390
Update KonditionExpo with unified navigation, blue/purple color schem…
ezouu May 25, 2025
d7addee
added pb backend logic, working on displaying errors
KushK04 May 27, 2025
2c403b5
Displayed Personal Bests Section, Working on Dynamically Updating it …
KushK04 May 28, 2025
1014f8a
fixed img missing issue
Andurdur Jun 1, 2025
e4a1a67
Signout button not working
jgmuende Jun 2, 2025
8a4380d
Replaced Alert.alert() with Dialog component from @/components/ui/Dialog
jgmuende Jun 2, 2025
2b8354d
fix: resolve nested button hydration error in Input component
jgmuende Jun 2, 2025
6694a45
fixed routing error where brought to home without tabs
jgmuende Jun 2, 2025
e8d7430
signup fields now working and display in profile tab
jgmuende Jun 2, 2025
cfacc29
backend of notifications works
Andurdur Jun 3, 2025
503146d
added quote presets to display on notifications tab
Andurdur Jun 3, 2025
9b6646b
app.json fix for push notis, added a service worker for notis
acashmoney777 Jun 3, 2025
6bd7a53
readmeupdated
jgmuende Jun 3, 2025
2c98bd0
Merge pull request #1 from KushK04/readmeupdate
KushK04 Jun 3, 2025
6c122eb
changed notification screeen sizing + button backing
Andurdur Jun 4, 2025
9ff783c
Merge pull request #2 from KushK04/notification_sizing
jgmuende Jun 4, 2025
0133fe9
added history tab
jgmuende Jun 4, 2025
2442a40
New screen to edit profile information
jgmuende Jun 4, 2025
38c0494
Merge pull request #3 from KushK04/historytabandprofilefieldchanges
Andurdur Jun 4, 2025
d38725f
Implemented following and followers, tried to implement social feed (…
jgmuende Jun 5, 2025
8faf736
adding .env
jgmuende Jun 5, 2025
4493370
Merge pull request #5 from KushK04/socialfeeed
Andurdur Jun 5, 2025
03d72b0
Social feed working, still need to add delete posts and find a way to…
jgmuende Jun 5, 2025
2c5182f
deletion of posts working
jgmuende Jun 5, 2025
01da743
Added backend logic to workouts, workin on testing it and PB
KushK04 Jun 6, 2025
0d04da7
Minor errors fixed
KushK04 Jun 6, 2025
e61b522
Merge pull request #6 from KushK04/socialfeedv2
Andurdur Jun 6, 2025
ecbd0cd
added bmi logic and removed unused ui displays
Andurdur Jun 6, 2025
1acfc9c
Merge pull request #7 from KushK04/bmilogic
Andurdur Jun 6, 2025
d79040b
Checkpoint for Workouts
KushK04 Jun 7, 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
Binary file added .DS_Store
Binary file not shown.
19 changes: 15 additions & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ DOMAIN=localhost
# To test the local Traefik config
# DOMAIN=localhost.tiangolo.com


# Used by the backend to generate links in emails to the frontend
FRONTEND_HOST=http://localhost:5173
# In staging and production, set this env var to the frontend host, e.g.
# FRONTEND_HOST=https://dashboard.example.com


# Environment: local, staging, production
ENVIRONMENT=local


PROJECT_NAME="Full Stack FastAPI Project"
STACK_NAME=full-stack-fastapi-project


# Backend
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,http://localhost.tiangolo.com"
SECRET_KEY=changethis
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,http://localhost:8081,https://localhost,https://localhost:5173,https://localhost:8081,http://localhost.tiangolo.com"
SECRET_KEY=VfIGsNDeZkTOiSHIgoG9DjhpTyaLGBb-lZvYa8-wbTM
[email protected]
FIRST_SUPERUSER_PASSWORD=changethis
FIRST_SUPERUSER_PASSWORD=ierjXObp0qpZq82J


# Emails
SMTP_HOST=
Expand All @@ -31,15 +36,21 @@ SMTP_TLS=True
SMTP_SSL=False
SMTP_PORT=587


# Postgres
POSTGRES_SERVER=localhost
POSTGRES_PORT=5432
POSTGRES_DB=app
POSTGRES_USER=postgres
POSTGRES_PASSWORD=changethis
POSTGRES_PASSWORD=SP52qKZTPKFTpi0w7adJJS80G4BpGDC4X2uxH5H7FYY


SENTRY_DSN=


# Configure these with your own Docker registry images
DOCKER_IMAGE_BACKEND=backend
DOCKER_IMAGE_FRONTEND=frontend



15 changes: 15 additions & 0 deletions .expo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
> Why do I have a folder named ".expo" in my project?

The ".expo" folder is created when an Expo project is started using "expo start" command.

> What do the files contain?

- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
- "settings.json": contains the server configuration that is used to serve the application manifest.

> Should I commit the ".expo" folder?

No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.

Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
8 changes: 8 additions & 0 deletions .expo/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hostType": "lan",
"lanType": "ip",
"dev": true,
"minify": false,
"urlRandomness": null,
"https": false
}
39 changes: 39 additions & 0 deletions KonditionExpo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/
expo-env.d.ts

# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo

app-example
50 changes: 50 additions & 0 deletions KonditionExpo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Welcome to your Expo app 👋

This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).

## Get started

1. Install dependencies

```bash
npm install
```

2. Start the app

```bash
npx expo start
```

In the output, you'll find options to open the app in a

- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo

You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).

## Get a fresh project

When you're ready, run:

```bash
npm run reset-project
```

This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.

## Learn more

To learn more about developing your project with Expo, look at the following resources:

- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.

## Join the community

Join our community of developers creating universal apps.

- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
177 changes: 177 additions & 0 deletions KonditionExpo/TESTING_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Authentication Testing Guide

## Quick Start

### 1. Start the Backend

**Option A: Using Docker Compose (Recommended)**
```bash
cd KonditionFastAPI
docker compose watch
```

**Option B: Direct Python**
```bash
cd KonditionFastAPI
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
```

### 2. Test on Different Platforms

#### Web (Should work immediately)
```bash
cd KonditionExpo
npm run web
```

#### iOS Simulator (Should work immediately)
```bash
npm run ios
```

#### Android Emulator (Should work immediately)
```bash
npm run android
```

#### Physical Device / Expo Go
1. Find your computer's IP address:
- **macOS**: `ifconfig | grep "inet " | grep -v 127.0.0.1`
- **Windows**: `ipconfig`
- **Linux**: `ip addr show`

2. Start Expo:
```bash
npm start
```

3. Open the app and go to **Profile > Developer Tools**

4. Set custom URL: `http://[YOUR_IP]:8000/api/v1`

5. Test the connection using the "Test API Connection" button

## Testing Checklist

### Signout Functionality
- [ ] Click signout button in profile screen
- [ ] Confirmation dialog appears
- [ ] Loading state shows "Signing Out..."
- [ ] Successfully redirects to login screen
- [ ] No errors in console

### Network Connectivity
- [ ] Web platform connects to localhost:8000
- [ ] iOS Simulator connects to localhost:8000
- [ ] Android Emulator connects to 10.0.2.2:8000
- [ ] Physical device connects with custom IP
- [ ] Error messages are user-friendly

### DevTools
- [ ] Developer Tools accessible from profile
- [ ] Shows current API URL
- [ ] Connection test works
- [ ] Custom URL can be set
- [ ] Quick URL buttons work

## Common Issues & Solutions

### "Network request failed"
1. Check if backend is running: `curl http://localhost:8000/docs`
2. Verify backend is accessible externally: `curl http://[YOUR_IP]:8000/docs`
3. Check firewall settings
4. Ensure devices are on same network

### Signout not working
1. Check console for error messages
2. Clear app data/cache
3. Restart the app
4. Check AsyncStorage permissions

### DevTools not showing
1. Make sure you're on the Profile tab
2. Scroll down to "Other" section
3. Look for blue "Developer Tools" text

## Debug Information

The app now logs detailed information to help with debugging:

```
Platform detected: ios (ios_simulator)
Using API URL: http://localhost:8000/api/v1
Making request to: http://localhost:8000/api/v1/login/access-token
Starting logout process...
Logout successful
```

Check the console/logs for these messages to understand what's happening.

## Network Setup for Mobile Testing

### Step 1: Find Your IP
```bash
# macOS/Linux
ifconfig | grep "inet " | grep -v 127.0.0.1

# Windows
ipconfig
```

### Step 2: Start Backend with External Access
```bash
uvicorn app.main:app --host 0.0.0.0 --port 8000
```

### Step 3: Configure Mobile App
1. Open app on mobile device
2. Go to Profile > Developer Tools
3. Enter: `http://[YOUR_IP]:8000/api/v1`
4. Test connection

### Step 4: Verify Setup
- Backend accessible: `http://[YOUR_IP]:8000/docs`
- API working: Test connection in DevTools
- Authentication: Try login/logout

## Platform-Specific Notes

### Web
- Uses localhost:8000 automatically
- No additional setup required
- Best for initial development

### iOS Simulator
- Uses localhost:8000 automatically
- Behaves like web platform
- Good for iOS-specific testing

### Android Emulator
- Uses 10.0.2.2:8000 automatically
- Special IP for Android emulator networking
- No manual configuration needed

### Physical Device
- Requires manual IP configuration
- Use DevTools for easy setup
- Must be on same network as computer

## Success Indicators

✅ **Authentication Working**:
- Login redirects to main app
- Logout shows confirmation and redirects to login
- User data loads correctly
- No network errors

✅ **Platform Compatibility**:
- Web works with localhost
- Mobile works with appropriate URLs
- Error messages are helpful
- DevTools provide easy testing

✅ **User Experience**:
- Loading states show during auth actions
- Clear error messages for failures
- Smooth navigation between screens
- No crashes or freezes
Loading
Loading