This app enables users to create and participate in community-driven fitness challenges. Users can engage in challenges, chat with others, earn badges, and track progress all within a cross-platform mobile app.
This project is the result of the collaborative efforts of the following contributors:
- @samuelberven: Samuel Berven
- @paolacernada: Paola Cernada
Note: While GitHub may display an additional user as a contributor, no one else has made contributions to this project or holds permission to do so.
- 🔐 User Accounts: Secure login and registration for users.
- 🏋️♂️ Challenge Creation: Create fitness challenges with goals, descriptions, tags, and badges.
- 🔎 Challenge Participation: Search challenges by tags, view favorites, and complete goals.
- 🏅 Badges and Wall of Fame: Earn badges and be featured on the Wall of Fame for completing challenges.
- Frontend: React Native with Expo, TypeScript, Redux
- Backend: Google Cloud Functions
- Database: Supabase PostgreSQL for handling structured relational data storage with real-time features.
- Authentication: Supabase Authentication
- Real-time Chat: Firebase Firestore
- Testing: Jest
- Project Management: Trello, GitHub
- Communication: Discord
-
Clone the repository:
git clone https://github.com/paolacernada/Crowd-sourced-Fitness-Challenge-App.git cd Crowd-sourced-Fitness-Challenge-App
-
Create a
.env.server
file at the root of thetest_backend
folder and add theSUPABASE_URL
andSUPABASE_ANON_KEY
. -
In a new terminal window, navigate to the
test_backend
folder:cd test_backend
-
Install dependencies and run the backend:
npm install npm start
- This installs the dependencies and runs the backend.
- Keep this terminal open to continue running the backend.
-
Install Expo CLI globally:
npm install -g expo-cli
-
Create a
.env.frontend
file at the root of thereact_native_frontend
folder and add theSUPABASE_URL
andSUPABASE_ANON_KEY
. -
In a new terminal window, navigate to the
react_native_frontend
folder:cd react_native_frontend
-
Install dependencies and run the frontend:
npx expo install npx expo start
If your device is having network issues, try adding the
--tunnel
flag. -
Install Expo Go on your mobile device:
- Android: Expo Go on Google Play
- iOS: Expo Go on the App Store
-
Scan the QR code generated by Expo with your device to preview the app.
-
Create a new branch:
git checkout -b <branch-name>
-
Fix linting issues:
npm run lint:fix
-
Push the branch:
git push origin <branch-name>
-
Open a pull request on GitHub. GitHub Actions will automatically check for linting errors before merging.
-
Upon review, the pull request will be approved and merged to the
main
branch, or revisions will be requested.
-
Install Supabase CLI, following instructions to add it to your PATH:
brew install supabase/tap/supabase
-
Upgrade Supabase CLI (if needed):
brew upgrade supabase
-
Log into Supabase. If you see an error (WSL may cause one), try adding the
--no-browser
flag:supabase login
-
Initialize the Supabase project in the root folder:
supabase init
-
Start the Supabase service:
supabase start
-
Run the function locally for testing:
supabase functions serve exampleFunction
-
Deploy the function to Supabase:
supabase functions deploy functionName
- Deployment URL can be found in the terminal output after deployment.
-
Update the frontend to use the deployed Edge Function URL instead of local routes.
-
In the frontend root folder, run
npx expo export
-
If there is trouble running the linter after exporting a build, run:
npx eslint --debug --no-cache .
- Expo documentation: Learn fundamentals or explore advanced topics with guides.
- Learn Expo tutorial: Create a project that runs on Android, iOS, and the web.
- Supabase documentation: Tutorials, APIs, and platform resources.