Skip to content

Commit f33e632

Browse files
CopilotkingRayhan
andauthored
fix: Add /pages/privacy and /pages/terms-and-conditions routes with markdown content
Agent-Logs-Url: https://github.com/techdiary-dev/techdiary.dev/sessions/dd77cddf-d228-481d-8764-7d446145460f Co-authored-by: kingRayhan <7611746+kingRayhan@users.noreply.github.com>
1 parent bb0df50 commit f33e632

4 files changed

Lines changed: 260 additions & 0 deletions

File tree

src/app/pages/privacy/page.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import BaseLayout from "@/components/layout/BaseLayout";
2+
import Markdown from "@/lib/markdown/Markdown";
3+
import { Metadata } from "next";
4+
import { readFileSync } from "fs";
5+
import { join } from "path";
6+
7+
export const metadata: Metadata = {
8+
title: "Privacy Policy",
9+
description: "TechDiary Privacy Policy",
10+
};
11+
12+
async function getPrivacyContent(): Promise<string> {
13+
"use cache";
14+
return readFileSync(
15+
join(process.cwd(), "src/content/privacy.md"),
16+
"utf-8"
17+
);
18+
}
19+
20+
const PrivacyPage = async () => {
21+
const content = await getPrivacyContent();
22+
23+
return (
24+
<BaseLayout>
25+
<div className="max-w-3xl mx-auto my-10 px-4">
26+
<div className="content-typography">
27+
<Markdown content={content} />
28+
</div>
29+
</div>
30+
</BaseLayout>
31+
);
32+
};
33+
34+
export default PrivacyPage;
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import BaseLayout from "@/components/layout/BaseLayout";
2+
import Markdown from "@/lib/markdown/Markdown";
3+
import { Metadata } from "next";
4+
import { readFileSync } from "fs";
5+
import { join } from "path";
6+
7+
export const metadata: Metadata = {
8+
title: "Terms and Conditions",
9+
description: "TechDiary Terms and Conditions",
10+
};
11+
12+
async function getTermsContent(): Promise<string> {
13+
"use cache";
14+
return readFileSync(
15+
join(process.cwd(), "src/content/terms-and-conditions.md"),
16+
"utf-8"
17+
);
18+
}
19+
20+
const TermsAndConditionsPage = async () => {
21+
const content = await getTermsContent();
22+
23+
return (
24+
<BaseLayout>
25+
<div className="max-w-3xl mx-auto my-10 px-4">
26+
<div className="content-typography">
27+
<Markdown content={content} />
28+
</div>
29+
</div>
30+
</BaseLayout>
31+
);
32+
};
33+
34+
export default TermsAndConditionsPage;

src/content/privacy.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Privacy Policy
2+
3+
*Last updated: April 2025*
4+
5+
Welcome to **TechDiary** (techdiary.dev). We are committed to protecting your personal information and your right to privacy. This Privacy Policy explains how we collect, use, and safeguard your information when you visit our website.
6+
7+
---
8+
9+
## 1. Information We Collect
10+
11+
We may collect the following types of information:
12+
13+
- **Account information** — When you register via GitHub or WorkOS (Google, etc.), we receive your name, email address, and profile picture from the OAuth provider.
14+
- **Content you create** — Articles, gists, comments, and reactions that you publish on the platform.
15+
- **Usage data** — Pages you visit, features you use, and other interactions with the site, collected via analytics tools (Google Analytics, Hotjar).
16+
- **Cookies** — Small data files placed on your device to remember your preferences and session. See our Cookie section below.
17+
18+
---
19+
20+
## 2. How We Use Your Information
21+
22+
We use the information we collect to:
23+
24+
- Provide, operate, and improve the TechDiary platform.
25+
- Authenticate you and maintain your session.
26+
- Display your public profile, articles, and gists.
27+
- Send transactional notifications (if enabled).
28+
- Analyse usage patterns to improve user experience.
29+
- Comply with legal obligations.
30+
31+
We **do not sell** your personal information to third parties.
32+
33+
---
34+
35+
## 3. Cookies
36+
37+
We use the following types of cookies:
38+
39+
- **Strictly necessary cookies** — Required for authentication and session management. Cannot be disabled.
40+
- **Analytics cookies** — Used by Google Analytics and Hotjar to understand how visitors interact with the site. You can opt out via your browser settings or the cookie consent banner.
41+
42+
You can control cookie preferences through your browser settings. Note that disabling certain cookies may affect site functionality.
43+
44+
---
45+
46+
## 4. Third-Party Services
47+
48+
TechDiary integrates with third-party services that have their own privacy policies:
49+
50+
- **WorkOS** — Authentication (workos.com/privacy)
51+
- **GitHub** — OAuth login (docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement)
52+
- **Google Analytics** — Usage analytics (policies.google.com/privacy)
53+
- **Cloudflare** — Content delivery and storage (cloudflare.com/privacypolicy)
54+
- **MeilSearch** — Search functionality
55+
56+
---
57+
58+
## 5. Data Retention
59+
60+
We retain your account data for as long as your account is active. You may request deletion of your account and associated data by contacting us. Certain data may be retained as required by law.
61+
62+
---
63+
64+
## 6. Security
65+
66+
We implement reasonable technical and organisational measures to protect your information. However, no method of transmission over the internet is 100% secure, and we cannot guarantee absolute security.
67+
68+
---
69+
70+
## 7. Children's Privacy
71+
72+
TechDiary is not directed at children under the age of 13. We do not knowingly collect personal information from children.
73+
74+
---
75+
76+
## 8. Changes to This Policy
77+
78+
We may update this Privacy Policy from time to time. The updated version will be indicated by a revised "Last updated" date at the top of this page. We encourage you to review this policy periodically.
79+
80+
---
81+
82+
## 9. Contact Us
83+
84+
If you have any questions or concerns about this Privacy Policy, please reach out to us at:
85+
86+
**Email:** support@techdiary.dev
87+
**Website:** [techdiary.dev](https://www.techdiary.dev)
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Terms and Conditions
2+
3+
*Last updated: April 2025*
4+
5+
Welcome to **TechDiary** (techdiary.dev). By accessing or using our website and services, you agree to be bound by these Terms and Conditions. Please read them carefully before using the platform.
6+
7+
---
8+
9+
## 1. Acceptance of Terms
10+
11+
By creating an account or otherwise using TechDiary, you acknowledge that you have read, understood, and agree to these Terms and Conditions and our [Privacy Policy](/pages/privacy). If you do not agree, please do not use the platform.
12+
13+
---
14+
15+
## 2. Who Can Use TechDiary
16+
17+
TechDiary is intended for users who are at least 13 years of age. By using the platform, you represent that you meet this age requirement.
18+
19+
---
20+
21+
## 3. User Accounts
22+
23+
- You are responsible for maintaining the confidentiality of your account credentials.
24+
- You are responsible for all activity that occurs under your account.
25+
- You must notify us immediately of any unauthorised use of your account.
26+
- We reserve the right to suspend or terminate accounts that violate these Terms.
27+
28+
---
29+
30+
## 4. Content You Publish
31+
32+
When you post articles, gists, comments, or other content on TechDiary:
33+
34+
- You retain ownership of the content you create.
35+
- You grant TechDiary a non-exclusive, royalty-free, worldwide licence to display, distribute, and promote your content on the platform.
36+
- You are solely responsible for ensuring your content does not infringe any third-party rights or violate any laws.
37+
38+
### Prohibited Content
39+
40+
You agree **not** to post content that:
41+
42+
- Is unlawful, defamatory, harassing, abusive, or fraudulent.
43+
- Infringes intellectual property rights of others.
44+
- Contains malware, viruses, or harmful code.
45+
- Is spam or unsolicited promotional material.
46+
- Violates the privacy of others.
47+
48+
TechDiary reserves the right to remove any content that violates these Terms without prior notice.
49+
50+
---
51+
52+
## 5. Intellectual Property
53+
54+
All trademarks, logos, and content owned by TechDiary are protected by intellectual property law. You may not copy, reproduce, distribute, or create derivative works without our explicit written permission.
55+
56+
---
57+
58+
## 6. Open Source
59+
60+
Portions of the TechDiary platform are open source. Please refer to the relevant repository for licence information.
61+
62+
---
63+
64+
## 7. Privacy
65+
66+
Your use of TechDiary is also governed by our [Privacy Policy](/pages/privacy), which is incorporated into these Terms by reference.
67+
68+
---
69+
70+
## 8. Third-Party Links
71+
72+
TechDiary may contain links to third-party websites. We are not responsible for the content or privacy practices of those sites. Accessing third-party links is at your own risk.
73+
74+
---
75+
76+
## 9. Disclaimer of Warranties
77+
78+
TechDiary is provided on an **"as is"** and **"as available"** basis without warranties of any kind, either express or implied. We do not warrant that the service will be uninterrupted, error-free, or free of harmful components.
79+
80+
---
81+
82+
## 10. Limitation of Liability
83+
84+
To the maximum extent permitted by law, TechDiary and its team shall not be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or related to your use of the platform.
85+
86+
---
87+
88+
## 11. Changes to These Terms
89+
90+
We reserve the right to modify these Terms at any time. Changes will take effect immediately upon posting to this page with a revised "Last updated" date. Continued use of the platform after changes constitutes your acceptance of the new Terms.
91+
92+
---
93+
94+
## 12. Governing Law
95+
96+
These Terms shall be governed by and construed in accordance with the laws of Bangladesh, without regard to its conflict-of-law provisions.
97+
98+
---
99+
100+
## 13. Contact Us
101+
102+
If you have any questions about these Terms and Conditions, please contact us at:
103+
104+
**Email:** support@techdiary.dev
105+
**Website:** [techdiary.dev](https://www.techdiary.dev)

0 commit comments

Comments
 (0)