From 3ac988a48daa3facb07a3622c4e2fa7fa99b9404 Mon Sep 17 00:00:00 2001 From: Pheonix Date: Mon, 8 Jun 2026 14:16:09 +0530 Subject: [PATCH] updated privacy page --- .../src/components/privacy/PrivacyChanges.jsx | 24 ++ .../components/privacy/PrivacyChildren.jsx | 20 ++ .../src/components/privacy/PrivacyContact.jsx | 17 ++ .../src/components/privacy/PrivacyCookies.jsx | 33 +++ .../components/privacy/PrivacyInfoCollect.jsx | 81 +++++ .../src/components/privacy/PrivacyInfoUse.jsx | 41 +++ .../src/components/privacy/PrivacyIntro.jsx | 32 ++ .../components/privacy/PrivacyRetention.jsx | 31 ++ .../src/components/privacy/PrivacyRights.jsx | 39 +++ .../src/components/privacy/PrivacySection.jsx | 42 +++ .../components/privacy/PrivacySecurity.jsx | 20 ++ .../components/privacy/PrivacyThirdParty.jsx | 44 +++ frontend/src/pages/PrivacyPage.jsx | 276 +++++------------- 13 files changed, 490 insertions(+), 210 deletions(-) create mode 100644 frontend/src/components/privacy/PrivacyChanges.jsx create mode 100644 frontend/src/components/privacy/PrivacyChildren.jsx create mode 100644 frontend/src/components/privacy/PrivacyContact.jsx create mode 100644 frontend/src/components/privacy/PrivacyCookies.jsx create mode 100644 frontend/src/components/privacy/PrivacyInfoCollect.jsx create mode 100644 frontend/src/components/privacy/PrivacyInfoUse.jsx create mode 100644 frontend/src/components/privacy/PrivacyIntro.jsx create mode 100644 frontend/src/components/privacy/PrivacyRetention.jsx create mode 100644 frontend/src/components/privacy/PrivacyRights.jsx create mode 100644 frontend/src/components/privacy/PrivacySection.jsx create mode 100644 frontend/src/components/privacy/PrivacySecurity.jsx create mode 100644 frontend/src/components/privacy/PrivacyThirdParty.jsx diff --git a/frontend/src/components/privacy/PrivacyChanges.jsx b/frontend/src/components/privacy/PrivacyChanges.jsx new file mode 100644 index 0000000..c4d57db --- /dev/null +++ b/frontend/src/components/privacy/PrivacyChanges.jsx @@ -0,0 +1,24 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyChanges() { + return ( + +

We may update our Privacy Policy from time to time.

+ +

+ We will notify you of any changes by posting the new Privacy Policy on + this page and updating the "Effective Date" at the top. +

+ +

+ You are advised to review this Privacy Policy periodically for any + changes. +

+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyChildren.jsx b/frontend/src/components/privacy/PrivacyChildren.jsx new file mode 100644 index 0000000..246ebd5 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyChildren.jsx @@ -0,0 +1,20 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyChildren() { + return ( + +

Our Service does not address anyone under the age of 13.

+ +

+ We do not knowingly collect personally identifiable information from + anyone under the age of 13. +

+ +

+ If you are a parent or guardian and you are aware that your child has + provided us with Personal Data, please contact us so we can take steps + to remove that information from our servers. +

+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyContact.jsx b/frontend/src/components/privacy/PrivacyContact.jsx new file mode 100644 index 0000000..b65fd58 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyContact.jsx @@ -0,0 +1,17 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyContact() { + return ( + +

+ If you have any questions, concerns, or requests regarding this Privacy + Policy, please contact the repository maintainer via GitHub issues or + email: +

+ +
+ [Insert Your Email Address Here] +
+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyCookies.jsx b/frontend/src/components/privacy/PrivacyCookies.jsx new file mode 100644 index 0000000..e1adaa3 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyCookies.jsx @@ -0,0 +1,33 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyCookies() { + return ( + + + + ); +} diff --git a/frontend/src/components/privacy/PrivacyInfoCollect.jsx b/frontend/src/components/privacy/PrivacyInfoCollect.jsx new file mode 100644 index 0000000..a028649 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyInfoCollect.jsx @@ -0,0 +1,81 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyInfoCollect() { + return ( + +

+ We collect several different types of information for various purposes + to provide and improve our Service to you. +

+ +
+

2.1 Personal Data

+ +
    +
  • Account Credentials: Email address and encrypted passwords.
  • + +
  • + Profile Information: Your chosen display name, avatar, and optional + biographical information. +
  • +
+
+ +
+

+ 2.2 Third-Party Integrations Data +

+ +
    +
  • + Codeforces Data: Your public competitive programming history, + including submission verdicts, algorithmic tags, contest history, + and rating changes. +
  • + +
  • + GitHub Data: When you authenticate via GitHub OAuth, we receive your + GitHub User ID, public profile information, and a read-only token. + We use this to fetch your public repositories, commit history, + contribution graph, and language usage. We do not request, access, + or store data from your private repositories. +
  • +
+
+ +
+

+ 2.3 User-Generated Content +

+ +
    +
  • + APEX AI Interactions: We collect and store the chat messages, + prompts, and context data you send to our APEX AI coach, as well as + the AI-generated responses, to maintain your conversation history. +
  • +
+
+ +
+

2.4 Usage and Log Data

+ +
    +
  • + When you access the Service, our hosting providers (Vercel and + Render) may automatically collect standard log data. This Usage Data + may include information such as your device's Internet Protocol (IP) + address, browser type, browser version, the pages of our Service + that you visit, the time and date of your visit, and other + diagnostic data. +
  • +
+
+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyInfoUse.jsx b/frontend/src/components/privacy/PrivacyInfoUse.jsx new file mode 100644 index 0000000..e67726c --- /dev/null +++ b/frontend/src/components/privacy/PrivacyInfoUse.jsx @@ -0,0 +1,41 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyInfoUse() { + return ( + + + + ); +} diff --git a/frontend/src/components/privacy/PrivacyIntro.jsx b/frontend/src/components/privacy/PrivacyIntro.jsx new file mode 100644 index 0000000..de45c6d --- /dev/null +++ b/frontend/src/components/privacy/PrivacyIntro.jsx @@ -0,0 +1,32 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyIntro() { + return ( + +

+ Welcome to CodeLens ("we", "our", or "us"). CodeLens is an independent, + open-source project maintained by an individual developer. We are + committed to protecting your personal information and your right to + privacy. This Privacy Policy governs the privacy policies and practices + of our official website, application, and all associated services + (collectively, the "Service"). +

+ +

+ By accessing or using CodeLens, you agree to the collection and use of + information in accordance with this Privacy Policy. If you do not agree + with the terms of this Privacy Policy, please do not access the Service. +

+ +

+ Self-Hosting Disclaimer: Please note that this Privacy Policy applies + exclusively to the official, primary hosted instance of CodeLens (e.g., + codelensx.vercel.app). If you choose to fork, deploy, or self-host your + own instance of the CodeLens open-source repository, you act as the data + controller for your instance and are solely responsible for managing + user data, maintaining your own privacy policy, and ensuring legal + compliance. +

+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyRetention.jsx b/frontend/src/components/privacy/PrivacyRetention.jsx new file mode 100644 index 0000000..477dd44 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyRetention.jsx @@ -0,0 +1,31 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyRetention() { + return ( + +

+ We will retain your Personal Data only for as long as is necessary for + the purposes set out in this Privacy Policy. +

+ + +
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyRights.jsx b/frontend/src/components/privacy/PrivacyRights.jsx new file mode 100644 index 0000000..2d6a363 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyRights.jsx @@ -0,0 +1,39 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyRights() { + return ( + +

+ Depending on your region, you may have certain data protection rights. + We aim to take reasonable steps to allow you to correct, amend, delete, + or limit the use of your Personal Data. +

+ + +
+ ); +} diff --git a/frontend/src/components/privacy/PrivacySection.jsx b/frontend/src/components/privacy/PrivacySection.jsx new file mode 100644 index 0000000..c360fd0 --- /dev/null +++ b/frontend/src/components/privacy/PrivacySection.jsx @@ -0,0 +1,42 @@ +export default function PrivacySection({ + number, + title, + children, + bg = "bg-white", + reverse = false, +}) { + return ( +
+
+
*:first-child]:order-2" : "" + }`} + > + {/* Left Heading Column */} +
+
+

+ Section {number} +

+ +

+ {title} +

+
+
+ + {/* Right Content Column */} +
+
+ {children} +
+
+
+
+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacySecurity.jsx b/frontend/src/components/privacy/PrivacySecurity.jsx new file mode 100644 index 0000000..f4befca --- /dev/null +++ b/frontend/src/components/privacy/PrivacySecurity.jsx @@ -0,0 +1,20 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacySecurity() { + return ( + +

+ The security of your data is important to us, but remember that no + method of transmission over the Internet or method of electronic storage + is 100% secure. +

+ +

+ While we strive to use commercially acceptable means to protect your + Personal Data (including bcrypt password hashing, hashed OTPs, and HTTPS + encryption in transit), we cannot guarantee its absolute security. You + use the Service at your own risk. +

+
+ ); +} diff --git a/frontend/src/components/privacy/PrivacyThirdParty.jsx b/frontend/src/components/privacy/PrivacyThirdParty.jsx new file mode 100644 index 0000000..0607ed4 --- /dev/null +++ b/frontend/src/components/privacy/PrivacyThirdParty.jsx @@ -0,0 +1,44 @@ +import PrivacySection from "./PrivacySection"; + +export default function PrivacyThirdParty() { + return ( + +

+ We do not sell, rent, or trade your personal information to third + parties. +

+ +

+ However, to operate the Service, we share necessary data with trusted + service providers under strict data processing agreements: +

+ + +
+ ); +} diff --git a/frontend/src/pages/PrivacyPage.jsx b/frontend/src/pages/PrivacyPage.jsx index 8919149..d5ff25c 100644 --- a/frontend/src/pages/PrivacyPage.jsx +++ b/frontend/src/pages/PrivacyPage.jsx @@ -1,223 +1,79 @@ -import { useState } from "react"; +import PrivacyIntro from "../components/privacy/PrivacyIntro"; +import PrivacyInfoCollect from "../components/privacy/PrivacyInfoCollect"; +import PrivacyInfoUse from "../components/privacy/PrivacyInfoUse"; +import PrivacyCookies from "../components/privacy/PrivacyCookies"; +import PrivacyThirdParty from "../components/privacy/PrivacyThirdParty"; +import PrivacySecurity from "../components/privacy/PrivacySecurity"; +import PrivacyRetention from "../components/privacy/PrivacyRetention"; +import PrivacyRights from "../components/privacy/PrivacyRights"; +import PrivacyChildren from "../components/privacy/PrivacyChildren"; +import PrivacyChanges from "../components/privacy/PrivacyChanges"; +import PrivacyContact from "../components/privacy/PrivacyContact"; export default function PrivacyPage() { - const [openSection, setOpenSection] = useState(null); - const POLICY_VERSION = "1.0"; const LAST_UPDATED = "June 2026"; - const toggleSection = (id) => { - setOpenSection(openSection === id ? null : id); - }; - - const sections = [ - { - id: 1, - title: "Introduction", - content: [ - 'Welcome to CodeLens ("we", "our", or "us"). CodeLens is an independent, open-source project maintained by an individual developer. We are committed to protecting your personal information and your right to privacy. This Privacy Policy governs the privacy policies and practices of our official website, application, and all associated services (collectively, the "Service").', - "By accessing or using CodeLens, you agree to the collection and use of information in accordance with this Privacy Policy. If you do not agree with the terms of this Privacy Policy, please do not access the Service.", - "Self-Hosting Disclaimer: Please note that this Privacy Policy applies exclusively to the official, primary hosted instance of CodeLens (e.g., codelensx.vercel.app). If you choose to fork, deploy, or self-host your own instance of the CodeLens open-source repository, you act as the data controller for your instance and are solely responsible for managing user data, maintaining your own privacy policy, and ensuring legal compliance.", - ], - }, - { - id: 2, - title: "Information We Collect", - intro: - "We collect several different types of information for various purposes to provide and improve our Service to you.", - subsections: [ - { - title: "2.1 Personal Data", - items: [ - "Account Credentials: Email address and encrypted passwords.", - "Profile Information: Your chosen display name, avatar, and optional biographical information.", - ], - }, - { - title: "2.2 Third-Party Integrations Data", - items: [ - "Codeforces Data: Your public competitive programming history, including submission verdicts, algorithmic tags, contest history, and rating changes.", - "GitHub Data: When you authenticate via GitHub OAuth, we receive your GitHub User ID, public profile information, and a read-only token. We use this to fetch your public repositories, commit history, contribution graph, and language usage. We do not request, access, or store data from your private repositories.", - ], - }, - { - title: "2.3 User-Generated Content", - items: [ - "APEX AI Interactions: We collect and store the chat messages, prompts, and context data you send to our APEX AI coach, as well as the AI-generated responses, to maintain your conversation history.", - ], - }, - { - title: "2.4 Usage and Log Data", - items: [ - "When you access the Service, our hosting providers (Vercel and Render) may automatically collect standard log data. This Usage Data may include information such as your device's Internet Protocol (IP) address, browser type, browser version, the pages of our Service that you visit, the time and date of your visit, and other diagnostic data.", - ], - }, - ], - }, - { - id: 3, - title: "How We Use Your Information", - content: [ - "To Provide and Maintain the Service: Ensuring your dashboard loads correctly with your latest statistics.", - "To Manage Your Account: Verifying your identity and securing your login session.", - "To Personalize the Experience: Compiling your Codeforces and GitHub data to calculate proprietary metrics like Skill Decay and Consistency Scores.", - "To Power APEX AI: Supplying your real-time performance metrics to the Google Gemini AI model so it can act as a highly contextualized coding coach.", - "To Communicate With You: Sending transactional emails, such as One-Time Passwords (OTPs) for registration and password resets. We do not use your email for marketing spam.", - ], - }, - { - id: 4, - title: "Cookies and Session Management", - content: [ - "We use strict, privacy-first cookie practices. We do not use tracking, advertising, or third-party marketing cookies.", - "Authentication Cookies: We use HttpOnly, Secure, and SameSite configured cookies exclusively for maintaining your login session. Because these are HttpOnly, they cannot be accessed by malicious client-side scripts, protecting you from Cross-Site Scripting (XSS) attacks.", - "Necessity: Because these cookies are strictly necessary for the authentication and security of the Service, they cannot be declined if you wish to use a registered account.", - ], - }, - { - id: 5, - title: "Disclosure of Data to Third Parties", - content: [ - "We do not sell, rent, or trade your personal information to third parties.", - "However, to operate the Service, we share necessary data with trusted service providers under strict data processing agreements:", - "Google Gemini API: To provide AI coaching, your chat inputs and a compiled summary of your coding metrics are processed by Google's Gemini models.", - "MongoDB Atlas: Your user data, integration data, and chat history are securely hosted on MongoDB's cloud database infrastructure.", - "Render & Vercel: Our backend application and frontend interfaces are hosted on these platforms, which process web traffic routing.", - "Nodemailer & Gmail SMTP: Used exclusively for routing transactional authentication emails to your inbox.", - ], - }, - { - id: 6, - title: "Data Security", - content: [ - "The security of your data is important to us, but remember that no method of transmission over the Internet or method of electronic storage is 100% secure.", - "While we strive to use commercially acceptable means to protect your Personal Data (including bcrypt password hashing, hashed OTPs, and HTTPS encryption in transit), we cannot guarantee its absolute security. You use the Service at your own risk.", - ], - }, - { - id: 7, - title: "Data Retention", - content: [ - "We will retain your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy.", - "Active Accounts: Your profile data, synced statistics, and chat logs are retained as long as your account remains active.", - "OTPs: Security codes are automatically purged from our database after 10 minutes.", - "Server Logs: Standard access and error logs collected by our hosting infrastructure (Vercel/Render) are strictly retained for a short period (typically 30 days) solely for debugging, monitoring, and security purposes before being automatically deleted.", - ], - }, - { - id: 8, - title: "Your Data Protection Rights", - content: [ - "Depending on your region, you may have certain data protection rights. We aim to take reasonable steps to allow you to correct, amend, delete, or limit the use of your Personal Data.", - "Access and Update: You can review and update your profile information directly within the Account Center.", - "Revoke Access: You can disconnect your GitHub or Codeforces integrations at any time from your dashboard, which will stop future data syncing.", - "Account Deletion: If you wish to be completely removed from our systems, please contact us. Upon request, we will permanently delete your account, including all synced metrics and chat history. All requested account and data deletions will be completed within 30 days of the request.", - ], - }, - { - id: 9, - title: "Children's Privacy", - content: [ - "Our Service does not address anyone under the age of 13.", - "We do not knowingly collect personally identifiable information from anyone under the age of 13.", - "If you are a parent or guardian and you are aware that your child has provided us with Personal Data, please contact us so we can take steps to remove that information from our servers.", - ], - }, - { - id: 10, - title: "Changes to This Privacy Policy", - content: [ - "We may update our Privacy Policy from time to time.", - 'We will notify you of any changes by posting the new Privacy Policy on this page and updating the "Effective Date" at the top.', - "You are advised to review this Privacy Policy periodically for any changes.", - ], - }, - { - id: 11, - title: "Contact Us", - content: [ - "If you have any questions, concerns, or requests regarding this Privacy Policy, please contact the repository maintainer via GitHub issues or email:", - "[Insert Your Email Address Here]", - ], - }, - ]; - return ( -
-
-

- Privacy Policy -

- -

- Version {POLICY_VERSION} • Last updated: {LAST_UPDATED} -

- -

Effective Date: June 2026

-
- -
- {sections.map((section) => { - const isOpen = openSection === section.id; +
+ {/* Hero */} +
+
+
+

+ Legal +

- return ( -
- - -
- {section.subsections ? ( -
-

{section.intro}

- - {section.subsections.map((sub, idx) => ( -
-

- {sub.title} -

- -
    - {sub.items.map((item, itemIdx) => ( -
  • {item}
  • - ))} -
-
- ))} -
- ) : ( -
    - {section.content.map((item, idx) => ( -
  • {item}
  • - ))} -
- )} -
+
+ Version {POLICY_VERSION} + + Last Updated: {LAST_UPDATED} + + Effective Date: June 2026
- ); - })} -
+
+
+
-
- By using CodeLens, you acknowledge that you have read and understood - this Privacy Policy. + {/* Optional Desktop Section Indicator */} +
+
+ {[...Array(11)].map((_, i) => ( + + ))} +
-
+ + {/* Privacy Sections */} + + + + + + + + + + + + + {/* Footer Notice */} +
+
+

+ By using CodeLens, you acknowledge that you have read and understood + this Privacy Policy. +

+
+
+ ); }