From 0c6a297198befcdb863b472f1139dd6ddafe433f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 10 Aug 2026 11:55:11 +0300 Subject: [PATCH] Add Privacy Policy and Terms of Service pages Registration collects health-adjacent data (age, weight, height, health notes, goals) with no privacy policy or ToS anywhere in the app. Adds both as real pages at /privacy and /terms, a site-wide footer linking to them (the app had no footer at all outside the homepage), and a consent line on the registration form. Both pages are marked as a starting draft with bracketed placeholders for operator/jurisdiction details rather than inventing legal claims the app can't back up. Also removed the homepage's own footer, which duplicated the new global one and whose Privacy/Terms/About/Contact links were all dead `#` placeholders, and fixed APP_NAME (was "Laravel", site is branded FitAtlas everywhere else including the browser tab title). Co-Authored-By: Claude Sonnet 5 --- .env.example | 2 +- app/Http/Controllers/LegalController.php | 18 ++++ lang/en/app.php | 13 +-- lang/ro/app.php | 14 ++-- resources/views/auth/register.blade.php | 9 +- resources/views/home/index.blade.php | 25 ------ resources/views/layouts/app.blade.php | 10 +++ resources/views/legal/privacy.blade.php | 98 ++++++++++++++++++++++ resources/views/legal/terms.blade.php | 102 +++++++++++++++++++++++ routes/web.php | 4 + tests/Feature/LegalTest.php | 36 ++++++++ 11 files changed, 292 insertions(+), 39 deletions(-) create mode 100644 app/Http/Controllers/LegalController.php create mode 100644 resources/views/legal/privacy.blade.php create mode 100644 resources/views/legal/terms.blade.php create mode 100644 tests/Feature/LegalTest.php diff --git a/.env.example b/.env.example index 1b0fe38..70c8222 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -APP_NAME=Laravel +APP_NAME=FitAtlas APP_ENV=local APP_KEY= APP_DEBUG=true diff --git a/app/Http/Controllers/LegalController.php b/app/Http/Controllers/LegalController.php new file mode 100644 index 0000000..34a6a57 --- /dev/null +++ b/app/Http/Controllers/LegalController.php @@ -0,0 +1,18 @@ + 'What languages are supported?', 'a6' => 'English and Romanian. Switch with the language control in the header.', ], - 'footer' => [ - 'about' => 'About', - 'privacy' => 'Privacy', - 'terms' => 'Terms', - 'contact' => 'Contact', - ], ], 'workouts' => [ @@ -252,7 +246,12 @@ return [ 'recent_workouts' => 'Recent workouts', 'none' => 'Nothing to show yet.', 'manage_workouts' => 'Manage workouts', + ], + 'footer' => [ + 'privacy' => 'Privacy Policy', + 'terms' => 'Terms of Service', + 'rights' => 'All rights reserved.', ], 'yoga' => [ @@ -316,6 +315,8 @@ return [ 'back' => 'Back', 'register' => 'Register', ], + 'consent_prefix' => 'By creating an account, you agree to our', + 'consent_and' => 'and', 'is_trainer' => 'I am a trainer', 'equipment_options' => [ 'dumbbells' => 'Dumbbells', diff --git a/lang/ro/app.php b/lang/ro/app.php index 8a31e49..0586de6 100644 --- a/lang/ro/app.php +++ b/lang/ro/app.php @@ -127,12 +127,6 @@ return [ 'q6' => 'Ce limbi sunt disponibile?', 'a6' => 'Engleză și Română. Schimbă limba din antet.', ], - 'footer' => [ - 'about' => 'Despre', - 'privacy' => 'Confidențialitate', - 'terms' => 'Termeni', - 'contact' => 'Contact', - ], ], 'workouts' => [ @@ -254,6 +248,12 @@ return [ 'manage_workouts' => 'Gestionează antrenamentele', ], + 'footer' => [ + 'privacy' => 'Politica de confidențialitate', + 'terms' => 'Termeni și condiții', + 'rights' => 'Toate drepturile rezervate.', + ], + 'yoga' => [ 'browse' => 'Răsfoiește pozițiile de yoga', 'browse_desc' => 'Explorează pozițiile de yoga după categorie sau beneficii.', @@ -315,6 +315,8 @@ return [ 'back' => 'Înapoi', 'register' => 'Înregistrare', ], + 'consent_prefix' => 'Prin crearea unui cont, ești de acord cu', + 'consent_and' => 'și cu', 'is_trainer' => 'Sunt antrenor', 'equipment_options' => [ 'dumbbells' => 'Gantere', diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 5074f0a..3af8cdf 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -153,7 +153,14 @@ -
+

+ {{ __('app.auth.register.consent_prefix') }} + {{ __('app.footer.terms') }} + {{ __('app.auth.register.consent_and') }} + {{ __('app.footer.privacy') }}. +

+ +
{{ __('app.auth.register.steps.register') }} diff --git a/resources/views/home/index.blade.php b/resources/views/home/index.blade.php index 0e71360..b392844 100644 --- a/resources/views/home/index.blade.php +++ b/resources/views/home/index.blade.php @@ -192,29 +192,4 @@
- - diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 8dc8350..8783b42 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -46,6 +46,16 @@
{{ $slot }}
+ +
@stack('scripts') diff --git a/resources/views/legal/privacy.blade.php b/resources/views/legal/privacy.blade.php new file mode 100644 index 0000000..f74852e --- /dev/null +++ b/resources/views/legal/privacy.blade.php @@ -0,0 +1,98 @@ + +
+
+

Privacy Policy

+

Last updated: August 10, 2026

+
+
+ +
+

+ This policy is a starting point, not a substitute for legal advice. Before launch, replace the bracketed + placeholders below with your actual operator details and have it reviewed for the jurisdictions you operate in. +

+ +
+

Who this policy covers

+

+ This Privacy Policy explains how {{ config('app.name') }} ("we", "us") collects, uses, and stores + information when you use this application. {{ config('app.name') }} is operated by + [Operator Name / Legal Entity]. If you have questions about this policy, contact us at + privacy@example.com. +

+
+ +
+

Information we collect

+

When you create an account, we collect:

+
    +
  • Account details: name, email address, and password (stored as a salted hash, never in plain text).
  • +
  • + Fitness profile (optional): age, weight, height, fitness level, goals, health + notes, available equipment, and training preferences. You choose whether to provide these when + you sign up or from your profile settings. +
  • +
  • Activity data: the workouts you build, the exercises and yoga poses you favorite, and your workout session history (what you completed and when).
  • +
+

+ Health-related fields such as health notes, weight, and fitness goals can be considered sensitive + personal data in some jurisdictions. We only collect them if you choose to enter them, and only to + power features like workout recommendations and progress tracking. +

+
+ +
+

Cookies

+

+ We use strictly necessary cookies to keep you signed in and to protect the site against + cross-site request forgery. We do not use advertising or third-party tracking cookies. +

+
+ +
+

How we use your information

+
    +
  • To provide the core features of the app: workout building, session tracking, and your dashboard.
  • +
  • To personalize the exercise and yoga library based on your stated goals and equipment.
  • +
  • To send account-related emails, such as email verification and password resets.
  • +
+

We do not sell your personal information, and we do not use your data for advertising.

+
+ +
+

Third parties

+

+ Our exercise and yoga pose libraries are sourced from third-party public data providers. Browsing + that content does not send your personal data to those providers. We do not share your account or + fitness data with any third party except as required to operate the service (for example, hosting + infrastructure) or as required by law. +

+
+ +
+

Data retention and deletion

+

+ You can permanently delete your account and all associated data (workouts, sessions, and favorites) + at any time from your profile settings. + Deletion is immediate and cannot be undone. +

+
+ +
+

Your rights

+

+ Depending on where you live, you may have the right to access, correct, export, or delete your + personal data. You can update most of your information directly from your profile, or contact us + at privacy@example.com for anything else. +

+
+ +
+

Changes to this policy

+

+ If we make material changes to this policy, we will update the "Last updated" date above and, where + appropriate, notify you directly. +

+
+
+
diff --git a/resources/views/legal/terms.blade.php b/resources/views/legal/terms.blade.php new file mode 100644 index 0000000..b176d00 --- /dev/null +++ b/resources/views/legal/terms.blade.php @@ -0,0 +1,102 @@ + +
+
+

Terms of Service

+

Last updated: August 10, 2026

+
+
+ +
+

+ This is a starting point, not a substitute for legal advice. Before launch, replace the bracketed + placeholders below with your actual operator details and have it reviewed for the jurisdictions you operate in. +

+ +
+

1. Agreement

+

+ These Terms of Service govern your use of {{ config('app.name') }}, operated by + [Operator Name / Legal Entity]. By creating an account or using the app, you agree to these terms. + If you do not agree, please do not use the app. +

+
+ +
+

2. Not medical advice

+

+ {{ config('app.name') }} provides general fitness and exercise content for informational purposes + only. It is not a substitute for professional medical advice, diagnosis, or treatment. Consult a + physician before starting any exercise program, especially if you have an existing health condition, + injury, or are pregnant. You are responsible for exercising within your own physical limits. +

+
+ +
+

3. Your account

+
    +
  • You must provide accurate information when creating an account.
  • +
  • You are responsible for keeping your password secure and for all activity under your account.
  • +
  • You must be legally permitted to enter into these terms in your jurisdiction to register.
  • +
+
+ +
+

4. Trainer accounts

+

+ If you register as a trainer, you remain solely responsible for the accuracy and safety of any + guidance you provide to others through or alongside the app. We do not verify trainer credentials. +

+
+ +
+

5. Acceptable use

+

You agree not to:

+
    +
  • Use the app for any unlawful purpose or in violation of these terms.
  • +
  • Attempt to gain unauthorized access to other accounts or to the admin panel.
  • +
  • Interfere with or disrupt the app's infrastructure or scrape it at abusive volume.
  • +
  • Upload content to the blog or your profile that is unlawful, infringing, or harmful.
  • +
+
+ +
+

6. Content

+

+ Exercise and yoga pose data is sourced from third-party providers and is provided "as is." Blog + content reflects the views of its authors and is provided for general informational purposes. + Workouts, notes, and other content you create remain yours; by using the app you allow us to store + and display it back to you as part of the service. +

+
+ +
+

7. Termination

+

+ You may delete your account at any time from your profile settings. We may suspend or terminate + accounts that violate these terms. +

+
+ +
+

8. Disclaimer and limitation of liability

+

+ The app is provided "as is" without warranties of any kind. To the fullest extent permitted by law, + {{ config('app.name') }} and its operator are not liable for any injury, loss, or damage arising + from your use of the app, including from following exercise or yoga content it provides. +

+
+ +
+

9. Governing law

+

These terms are governed by the laws of [Your Jurisdiction], without regard to conflict-of-law principles.

+
+ +
+

10. Contact

+

+ Questions about these terms can be sent to + legal@example.com. +

+
+
+
diff --git a/routes/web.php b/routes/web.php index 8c7bee5..c9c6736 100644 --- a/routes/web.php +++ b/routes/web.php @@ -71,4 +71,8 @@ Route::prefix('/yoga')->group(function () { Route::get('/{pose:slug}', [\App\Http\Controllers\YogaPoseController::class, 'show'])->name('yoga.show'); }); +// Legal +Route::get('/privacy', [\App\Http\Controllers\LegalController::class, 'privacy'])->name('legal.privacy'); +Route::get('/terms', [\App\Http\Controllers\LegalController::class, 'terms'])->name('legal.terms'); + require __DIR__.'/auth.php'; diff --git a/tests/Feature/LegalTest.php b/tests/Feature/LegalTest.php new file mode 100644 index 0000000..6966fd0 --- /dev/null +++ b/tests/Feature/LegalTest.php @@ -0,0 +1,36 @@ +get(route('legal.privacy')); + + $response->assertOk(); + $response->assertSee('Privacy Policy'); + } + + public function test_terms_page_loads(): void + { + $response = $this->get(route('legal.terms')); + + $response->assertOk(); + $response->assertSee('Terms of Service'); + } + + public function test_register_page_links_to_legal_pages(): void + { + $response = $this->get(route('register')); + + $response->assertOk(); + $response->assertSee(route('legal.privacy'), false); + $response->assertSee(route('legal.terms'), false); + } +}