From 9478ddf70bf0d54908f9075b32631323ae3e3181 Mon Sep 17 00:00:00 2001
From: "gpt-engineer-app[bot]"
<159125892+gpt-engineer-app[bot]@users.noreply.github.com>
Date: Mon, 18 May 2026 22:28:52 +0000
Subject: [PATCH] Changes
Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
---
public/robots.txt | 10 +++++++
src/routes/sitemap[.]xml.ts | 56 +++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+)
create mode 100644 public/robots.txt
create mode 100644 src/routes/sitemap[.]xml.ts
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..c53bbc2
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,10 @@
+User-agent: *
+Allow: /
+Disallow: /painel
+Disallow: /admin
+Disallow: /checkout
+Disallow: /bem-vindo
+Disallow: /redefinir-senha
+Disallow: /recuperar-senha
+
+Sitemap: https://mika.domco.ai/sitemap.xml
diff --git a/src/routes/sitemap[.]xml.ts b/src/routes/sitemap[.]xml.ts
new file mode 100644
index 0000000..e7ecdf1
--- /dev/null
+++ b/src/routes/sitemap[.]xml.ts
@@ -0,0 +1,56 @@
+import { createFileRoute } from "@tanstack/react-router";
+import type {} from "@tanstack/react-start";
+
+const BASE_URL = "https://mika.domco.ai";
+
+interface SitemapEntry {
+ path: string;
+ lastmod?: string;
+ changefreq?: "always" | "hourly" | "daily" | "weekly" | "monthly" | "yearly" | "never";
+ priority?: string;
+}
+
+export const Route = createFileRoute("/sitemap.xml")({
+ server: {
+ handlers: {
+ GET: async () => {
+ const today = new Date().toISOString().split("T")[0];
+ const entries: SitemapEntry[] = [
+ { path: "/", lastmod: today, changefreq: "weekly", priority: "1.0" },
+ { path: "/login", lastmod: today, changefreq: "monthly", priority: "0.5" },
+ { path: "/signup", lastmod: today, changefreq: "monthly", priority: "0.7" },
+ { path: "/termos", lastmod: today, changefreq: "yearly", priority: "0.3" },
+ { path: "/privacidade", lastmod: today, changefreq: "yearly", priority: "0.3" },
+ { path: "/reembolso", lastmod: today, changefreq: "yearly", priority: "0.3" },
+ ];
+
+ const urls = entries.map((e) =>
+ [
+ ` `,
+ ` ${BASE_URL}${e.path}`,
+ e.lastmod ? ` ${e.lastmod}` : null,
+ e.changefreq ? ` ${e.changefreq}` : null,
+ e.priority ? ` ${e.priority}` : null,
+ ` `,
+ ]
+ .filter(Boolean)
+ .join("\n"),
+ );
+
+ const xml = [
+ ``,
+ ``,
+ ...urls,
+ ``,
+ ].join("\n");
+
+ return new Response(xml, {
+ headers: {
+ "Content-Type": "application/xml",
+ "Cache-Control": "public, max-age=3600",
+ },
+ });
+ },
+ },
+ },
+});