Skip to content

Commit

Permalink
feat: add term and condition and privacy page
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Jun 23, 2024
1 parent 73b5f7d commit 73f78f8
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 44 deletions.
48 changes: 4 additions & 44 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import TopbarProfile from "@/components/topbar-profile";
import { Button, buttonVariants } from "@/components/ui/button";
import { getSessionFromCookie } from "@/lib/auth";
import { buttonVariants } from "@/components/ui/button";
import WebsiteLayout from "@/components/website-layout";
import { cn } from "@/lib/utils";
import type { Metadata } from "next";
import Link from "next/link";
Expand All @@ -12,32 +11,6 @@ export const metadata: Metadata = {
description: "LibSQL Studio - LibSQL and rqlite client on your browser",
};

async function Topbar() {
const { user } = await getSessionFromCookie();

// console.log(foo);

return (
<header className="border-b">
<div className="mx-auto container flex">
<h1 className="text-lg p-2">
LibSQL <strong>Studio</strong>
</h1>
<div className="grow" />
{user ? (
<TopbarProfile user={user} />
) : (
<div className="flex items-center">
<Link href="/login">
<Button>Sign In</Button>
</Link>
</div>
)}
</div>
</header>
);
}

function LinkButton({ title, url }: Readonly<{ title: string; url: string }>) {
return (
<Link
Expand All @@ -52,16 +25,6 @@ function LinkButton({ title, url }: Readonly<{ title: string; url: string }>) {
);
}

function Footer() {
return (
<div className="border-t py-4 text-sm">
<div className="mx-auto container">
© 2024 Visal .In. | LibSQL Studio
</div>
</div>
);
}

function Screenshot() {
return (
<div className="my-2 mx-4">
Expand Down Expand Up @@ -144,8 +107,7 @@ function FeatureItem({

export default async function MainPage() {
return (
<main>
<Topbar />
<WebsiteLayout>
<HeroSection />
<Screenshot />
<div className="bg-zinc-800 py-12 mt-12">
Expand Down Expand Up @@ -224,8 +186,6 @@ export default async function MainPage() {
</FeatureItem>
</div>
</div>

<Footer />
</main>
</WebsiteLayout>
);
}
110 changes: 110 additions & 0 deletions src/app/privacy/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import WebsiteLayout from "@/components/website-layout";

export default function PrivacyPage() {
return (
<WebsiteLayout>
<div className="container mx-auto my-12 flex flex-col gap-4">
<h1 className="font-bold text-3xl">PRIVACT NOTICE</h1>
<p>Effective Date: 2024-06-23</p>
<p>
{`
Welcome to LibSQL Studio ("we," "our," or "us"). We are committed to protecting your privacy and ensuring
that your personal information is handled in a safe and responsible manner. This Privacy Policy explains how we
collect, use, and protect your information when you use our tool.
`}
</p>
<h2 className="font-bold text-lg">1. Information We Collect</h2>
<p>
You can authenticate through social media platforms to access
additional features. We collect the following information from your
social media profile:
</p>
<ul className="list-disc ml-6">
<li>Name</li>
<li>Email address</li>
<li>Profile picture</li>
<li>Social media ID</li>
</ul>
<p>
We collect data on how you interact with the Tool to understand user
behavior and improve our services
</p>
<ul className="list-disc ml-6">
<li>Features you use</li>
<li>Actions you take within the Tool</li>
<li>Time spent on the Tool</li>
<li>Error and crash reports</li>
</ul>
<h2 className="font-bold text-lg">2. How We Use Your Information</h2>
<p>We use the information we collect for the following purposes:</p>
<ul className="list-disc ml-6">
<li>To authenticate your access to the Tool</li>
<li>To personalize your experience</li>
<li>
To analyze usage patterns and improve the functionality and
performance of the Tool
</li>
</ul>
<h2 className="font-bold text-lg">3. Data Sharing and Disclosure</h2>
<p>
We do not sell, trade, or otherwise transfer your personal information
to outside parties except as described below:
</p>
<h3 className="font-bold text-md">3.1 Service Providers</h3>
<p>
We may share your information with third-party service providers who
assist us in operating the Tool and analyzing usage data. These
service providers are bound by contractual obligations to keep your
information confidential and use it only for the purposes for which we
disclose it to them.
</p>
<h3 className="font-bold text-md">3.2 Legal Requirements</h3>
<p>
We may disclose your information if required to do so by law or in
response to valid requests by public authorities.
</p>
<h2 className="font-bold text-lg">4. Data Security</h2>
<p>
We implement a variety of security measures to maintain the safety of
your personal information. These measures include encryption, access
controls, and regular security assessments.
</p>
<h2 className="font-bold text-lg">5. Data Retention</h2>
<p>
We retain your personal information for as long as necessary to
fulfill the purposes outlined in this Privacy Policy unless a longer
retention period is required or permitted by law.
</p>
<h2 className="font-bold text-lg">6. Your Rights</h2>
<p>
You have the following rights regarding your personal information:
</p>

<ul className="list-disc ml-6">
<li>Access: You can request access to your personal information.</li>
<li>Access: You can request access to your personal information</li>
<li>
Deletion: You can request the deletion of your personal information.
</li>
<li>
Objection: You can object to the processing of your personal
information,
</li>
</ul>

<h2 className="font-bold text-lg">7. Changes to This Privacy Policy</h2>
<p>
We may update this Privacy Policy from time to time. We will notify
you of any changes by posting the new Privacy Policy on our website.
You are advised to review this Privacy Policy periodically for any
changes.
</p>

<p>
By using the Tool, you acknowledge that you have read and understood
this Privacy Policy and agree to its terms.
</p>
</div>
</WebsiteLayout>
);
}
65 changes: 65 additions & 0 deletions src/app/terms/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import WebsiteLayout from "@/components/website-layout";

export default function TermPage() {
return (
<WebsiteLayout>
<div className="container mx-auto my-12 flex flex-col gap-4">
<h1 className="font-bold text-3xl">Terms and Conditions</h1>

<p>Effective Date: 2024-06-23</p>

<p>{`
Welcome to LibSQL Studio ("we," "our," or "us").
By accessing or using our tool, you agree to be bound by these Terms and Conditions ("Terms").
If you do not agree to these Terms, please do not use the Tool.
`}</p>

<h2 className="font-bold text-lg">1. Use of the Tool</h2>

<p>
We grant you a non-exclusive, non-transferable, and revocable license
to use the Tool. There are no age limits or restrictions on the use of
the Tool.
</p>

<h2 className="font-bold text-lg">
2. User Accounts and Authentication
</h2>

<p>
To use the Tool, you must create an account and authenticate via
supported social media platforms, including Google. You agree to
provide accurate and current information during the registration
process.
</p>

<h2 className="font-bold text-lg">3. Data Collection</h2>
<p>
We collect and analyze data on how you use the Tool to improve our
services. By using the Tool, you consent to this data collection.
</p>

<h2 className="font-bold text-lg">4. Modifications to the Tool</h2>
<p>
We reserve the right to modify or discontinue the Tool at any time
without notice. We are not liable for any modifications, suspensions,
or discontinuations of the Tool.
</p>

<h2 className="font-bold text-lg">5. Termination</h2>
<p>
We may terminate or suspend your access to the Tool at our sole
discretion, without prior notice or liability, for any reason.
</p>

<h2 className="font-bold text-lg">6. Limitation of Liability</h2>
<p>{`LibSQL Studio is provided "as is" without warranties of any kind. We are not liable for any damages arising from your use of the Tool.`}</p>

<p>
By using the Tool, you acknowledge that you have read, understood, and
agree to these Terms and Conditions.
</p>
</div>
</WebsiteLayout>
);
}
49 changes: 49 additions & 0 deletions src/components/website-layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { getSessionFromCookie } from "@/lib/auth";
import { PropsWithChildren } from "react";
import TopbarProfile from "./topbar-profile";
import Link from "next/link";
import { Button } from "./ui/button";

async function Topbar() {
const { user } = await getSessionFromCookie();

return (
<header className="border-b">
<div className="mx-auto container flex">
<h1 className="text-lg p-2">
LibSQL <strong>Studio</strong>
</h1>
<div className="grow" />
{user ? (
<TopbarProfile user={user} />
) : (
<div className="flex items-center">
<Link href="/login">
<Button>Sign In</Button>
</Link>
</div>
)}
</div>
</header>
);
}

function Footer() {
return (
<div className="border-t py-4 text-sm">
<div className="mx-auto container">
© 2024 Visal .In. | LibSQL Studio
</div>
</div>
);
}

export default function WebsiteLayout({ children }: PropsWithChildren) {
return (
<main>
<Topbar />
{children}
<Footer />
</main>
);
}

0 comments on commit 73f78f8

Please sign in to comment.