xpeditis2.0/apps/frontend/src/pages/terms.tsx
David-Henri ARNAUD 07b51987f2 feat: GDPR Compliance - Data privacy, consent & user rights (Phase 4)
🛡️ GDPR Compliance Implementation
Comprehensive data protection features compliant with GDPR Articles 7, 15-21

📋 Legal & Consent Pages (Frontend)
- Terms & Conditions: 15 comprehensive sections covering service usage, liabilities, IP rights, dispute resolution
- Privacy Policy: 14 sections with explicit GDPR rights (Articles 15-21), data retention, international transfers
- Cookie Consent Banner: Granular consent management (Essential, Functional, Analytics, Marketing)
  - localStorage persistence
  - Google Analytics integration with consent API
  - User-friendly toggle controls

🔒 GDPR Backend API
6 REST endpoints for data protection compliance:
- GET /gdpr/export: Export user data as JSON (Article 20 - Right to Data Portability)
- GET /gdpr/export/csv: Export data in CSV format
- DELETE /gdpr/delete-account: Account deletion with email confirmation (Article 17 - Right to Erasure)
- POST /gdpr/consent: Record consent with audit trail (Article 7)
- POST /gdpr/consent/withdraw: Withdraw consent (Article 7.3)
- GET /gdpr/consent: Get current consent status

🏗️ Architecture
Backend (4 files):
  - gdpr.service.ts: Data export, deletion logic, consent management
  - gdpr.controller.ts: 6 authenticated REST endpoints with Swagger docs
  - gdpr.module.ts: NestJS module configuration
  - app.module.ts: Integration with main application

Frontend (3 files):
  - pages/terms.tsx: Complete Terms & Conditions (liability, IP, indemnification, governing law)
  - pages/privacy.tsx: GDPR-compliant Privacy Policy (data controller, legal basis, user rights)
  - components/CookieConsent.tsx: Interactive consent banner with preference management

⚠️ Implementation Notes
- Current version: Simplified data export (user data only)
- Full anonymization: Pending proper ORM entity schema definition
- Production TODO: Implement complete anonymization for bookings, audit logs, notifications
- Security: Email confirmation required for account deletion
- All endpoints protected by JWT authentication

📊 Compliance Coverage
 Article 7: Consent conditions & withdrawal
 Article 15: Right of access
 Article 16: Right to rectification (via user profile)
 Article 17: Right to erasure ("right to be forgotten")
 Article 20: Right to data portability
 Cookie consent with granular controls
 Privacy policy with data retention periods
 Terms & Conditions with liability disclaimers

🎯 Phase 4 High Priority Status
-  Compliance & Privacy (GDPR): COMPLETE
-  Security Audit: Pending OWASP ZAP scan
-  Execute Tests: Pending K6, Playwright, Postman runs
-  Production Deployment: Pending infrastructure setup

Total: 7 new files, ~1,200 LoC
Build Status:  Backend compiles successfully (0 errors)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 19:13:19 +02:00

221 lines
11 KiB
TypeScript

/**
* Terms & Conditions Page
*/
import React from 'react';
import Head from 'next/head';
export default function TermsPage() {
return (
<>
<Head>
<title>Terms & Conditions | Xpeditis</title>
<meta
name="description"
content="Terms and Conditions for Xpeditis maritime freight booking platform"
/>
</Head>
<div className="min-h-screen bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-4xl mx-auto bg-white shadow-lg rounded-lg p-8">
<h1 className="text-4xl font-bold text-gray-900 mb-6">
Terms & Conditions
</h1>
<p className="text-sm text-gray-500 mb-8">
Last Updated: October 14, 2025
</p>
<div className="prose prose-lg max-w-none">
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
1. Acceptance of Terms
</h2>
<p className="text-gray-700 mb-4">
By accessing and using Xpeditis ("the Platform"), you accept and agree to be bound by the terms and provision of this agreement. If you do not agree to abide by the above, please do not use this service.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
2. Description of Service
</h2>
<p className="text-gray-700 mb-4">
Xpeditis is a B2B SaaS platform that provides maritime freight booking and management services, including:
</p>
<ul className="list-disc pl-6 text-gray-700 mb-4">
<li>Real-time shipping rate search and comparison</li>
<li>Online container booking</li>
<li>Shipment tracking and management</li>
<li>Document management</li>
<li>Integration with carrier APIs</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
3. User Accounts
</h2>
<h3 className="text-xl font-semibold text-gray-800 mb-2">3.1 Registration</h3>
<p className="text-gray-700 mb-4">
To use the Platform, you must register for an account and provide accurate, current, and complete information. You are responsible for maintaining the confidentiality of your account credentials.
</p>
<h3 className="text-xl font-semibold text-gray-800 mb-2">3.2 Account Security</h3>
<p className="text-gray-700 mb-4">
You are responsible for all activities that occur under your account. You must immediately notify us of any unauthorized use of your account.
</p>
<h3 className="text-xl font-semibold text-gray-800 mb-2">3.3 Account Termination</h3>
<p className="text-gray-700 mb-4">
We reserve the right to suspend or terminate your account if you violate these Terms or engage in fraudulent, abusive, or illegal activity.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
4. Booking and Payments
</h2>
<h3 className="text-xl font-semibold text-gray-800 mb-2">4.1 Booking Process</h3>
<p className="text-gray-700 mb-4">
All bookings made through the Platform are subject to availability and confirmation by the carrier. Xpeditis acts as an intermediary and does not guarantee booking acceptance.
</p>
<h3 className="text-xl font-semibold text-gray-800 mb-2">4.2 Pricing</h3>
<p className="text-gray-700 mb-4">
Rates displayed on the Platform are provided by carriers and may change. Final pricing is confirmed upon booking acceptance. All prices are subject to applicable surcharges, taxes, and fees.
</p>
<h3 className="text-xl font-semibold text-gray-800 mb-2">4.3 Payment Terms</h3>
<p className="text-gray-700 mb-4">
Payment terms are established between you and the carrier. Xpeditis may facilitate payment processing but is not responsible for payment disputes.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
5. User Obligations
</h2>
<p className="text-gray-700 mb-4">You agree to:</p>
<ul className="list-disc pl-6 text-gray-700 mb-4">
<li>Provide accurate and complete booking information</li>
<li>Comply with all applicable laws and regulations</li>
<li>Not use the Platform for illegal or unauthorized purposes</li>
<li>Not interfere with or disrupt the Platform's operation</li>
<li>Not attempt to gain unauthorized access to any part of the Platform</li>
<li>Not transmit viruses, malware, or malicious code</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
6. Intellectual Property
</h2>
<p className="text-gray-700 mb-4">
All content, features, and functionality of the Platform, including but not limited to text, graphics, logos, icons, images, audio clips, and software, are the exclusive property of Xpeditis and protected by copyright, trademark, and other intellectual property laws.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
7. Limitation of Liability
</h2>
<p className="text-gray-700 mb-4">
TO THE MAXIMUM EXTENT PERMITTED BY LAW, XPEDITIS SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, DATA, USE, OR GOODWILL, ARISING OUT OF OR IN CONNECTION WITH YOUR USE OF THE PLATFORM.
</p>
<p className="text-gray-700 mb-4">
Xpeditis acts as an intermediary between freight forwarders and carriers. We are not responsible for:
</p>
<ul className="list-disc pl-6 text-gray-700 mb-4">
<li>Carrier performance, delays, or cancellations</li>
<li>Cargo damage, loss, or theft</li>
<li>Customs issues or regulatory compliance</li>
<li>Force majeure events</li>
</ul>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
8. Indemnification
</h2>
<p className="text-gray-700 mb-4">
You agree to indemnify, defend, and hold harmless Xpeditis and its officers, directors, employees, and agents from any claims, losses, damages, liabilities, and expenses arising out of your use of the Platform or violation of these Terms.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
9. Data Protection and Privacy
</h2>
<p className="text-gray-700 mb-4">
Your use of the Platform is also governed by our Privacy Policy. By using the Platform, you consent to the collection, use, and disclosure of your information as described in the Privacy Policy.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
10. Third-Party Services
</h2>
<p className="text-gray-700 mb-4">
The Platform may contain links to third-party websites or services. Xpeditis is not responsible for the content, privacy policies, or practices of third-party sites.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
11. Service Availability
</h2>
<p className="text-gray-700 mb-4">
We strive to provide continuous service availability but do not guarantee that the Platform will be uninterrupted, secure, or error-free. We reserve the right to suspend or discontinue any part of the Platform at any time.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
12. Modifications to Terms
</h2>
<p className="text-gray-700 mb-4">
We reserve the right to modify these Terms at any time. Changes will be effective immediately upon posting. Your continued use of the Platform after changes constitutes acceptance of the modified Terms.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
13. Governing Law
</h2>
<p className="text-gray-700 mb-4">
These Terms shall be governed by and construed in accordance with the laws of [Jurisdiction], without regard to its conflict of law provisions.
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
14. Dispute Resolution
</h2>
<p className="text-gray-700 mb-4">
Any disputes arising out of or relating to these Terms or the Platform shall be resolved through binding arbitration in accordance with the rules of [Arbitration Body].
</p>
</section>
<section className="mb-8">
<h2 className="text-2xl font-semibold text-gray-900 mb-4">
15. Contact Information
</h2>
<p className="text-gray-700 mb-4">
If you have any questions about these Terms, please contact us at:
</p>
<div className="bg-gray-50 p-4 rounded-lg">
<p className="text-gray-700">
<strong>Email:</strong> legal@xpeditis.com<br />
<strong>Address:</strong> [Company Address]<br />
<strong>Phone:</strong> [Company Phone]
</p>
</div>
</section>
</div>
</div>
</div>
</>
);
}