-
Notifications
You must be signed in to change notification settings - Fork 0
PR with the new data & account deletion feature, privacy policy, and terms & conditions. #39
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY= | ||
| EXPO_PUBLIC_SUPABASE_URL= | ||
| EXPO_PUBLIC_SUPABASE_ANON_KEY= | ||
| EXPO_PUBLIC_ACCOUNT_DELETION_URL= | ||
|
|
||
| # Server-side only. Set these in Supabase Edge Function secrets, never in Expo public env. | ||
| SUPABASE_SERVICE_ROLE_KEY= | ||
| CLERK_SECRET_KEY= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,46 @@ | ||
| # Welcome to your Expo app 👋 | ||
| # DearDiary | ||
|
|
||
| This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). | ||
| DearDiary is an Expo, React Native, TypeScript, Expo Router, NativeWind, Zustand, Clerk, and Supabase journaling app. | ||
|
|
||
| ## Get started | ||
| ## Setup | ||
|
|
||
| 1. Install dependencies | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| 2. Start the app | ||
|
|
||
| ```bash | ||
| npx expo start | ||
| ``` | ||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| In the output, you'll find options to open the app in a | ||
| Copy `.env.example` to your local environment file and fill the public Expo values. Keep server secrets out of the mobile app. | ||
|
|
||
| - [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 | ||
| ## Account Deletion | ||
|
|
||
| You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). | ||
| The app includes a production-readiness deletion flow: | ||
|
|
||
| ## Get a fresh project | ||
| - Profile action: **Delete My Data and Account** | ||
| - Supabase Edge Function: `delete-account` | ||
| - Database RPC: `delete_deardiary_user_data(target_user_id)` | ||
| - Local cleanup: `lib/account/clearLocalUserData.ts` | ||
|
|
||
| When you're ready, run: | ||
| Required Edge Function secrets: | ||
|
|
||
| ```bash | ||
| npm run reset-project | ||
| ```txt | ||
| SUPABASE_URL | ||
| SUPABASE_SERVICE_ROLE_KEY | ||
| CLERK_SECRET_KEY | ||
| ``` | ||
|
|
||
| This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. | ||
| Deploy the function and migration with your normal Supabase workflow. Do not put service-role or Clerk secret keys in `EXPO_PUBLIC_*` variables. | ||
|
|
||
| ## Learn more | ||
| Related docs: | ||
|
|
||
| To learn more about developing your project with Expo, look at the following resources: | ||
| - `docs/user-data-inventory.md` | ||
| - `docs/database.md` | ||
| - `docs/privacy.md` | ||
| - `docs/play-store-account-deletion.md` | ||
|
|
||
| - [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. | ||
| ## Legal Drafts | ||
|
|
||
| ## Join the community | ||
| Privacy Policy and Terms screens exist at: | ||
|
|
||
| Join our community of developers creating universal apps. | ||
| - `/legal/privacy-policy` | ||
| - `/legal/terms` | ||
|
|
||
| - [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. | ||
| They contain visible placeholders and require legal review before public release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { LegalDocumentScreen } from "@/components/legal/legal-document-screen"; | ||
| import { privacyPolicy } from "@/content/legal/privacyPolicy"; | ||
|
|
||
| const accountDeletionUrl = | ||
| process.env.EXPO_PUBLIC_ACCOUNT_DELETION_URL?.trim() || null; | ||
|
|
||
| export default function PrivacyPolicyScreen() { | ||
| return ( | ||
| <LegalDocumentScreen | ||
| accountDeletionUrl={accountDeletionUrl} | ||
| effectiveDate={privacyPolicy.effectiveDate} | ||
| sections={privacyPolicy.sections} | ||
| title={privacyPolicy.title} | ||
| version={privacyPolicy.version} | ||
| /> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { LegalDocumentScreen } from "@/components/legal/legal-document-screen"; | ||
| import { termsAndConditions } from "@/content/legal/termsAndConditions"; | ||
|
|
||
| export default function TermsScreen() { | ||
| return ( | ||
| <LegalDocumentScreen | ||
| effectiveDate={termsAndConditions.effectiveDate} | ||
| sections={termsAndConditions.sections} | ||
| title={termsAndConditions.title} | ||
| version={termsAndConditions.version} | ||
| /> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.