@morphika/andami 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  A reusable Visual Page Builder framework for Next.js. Build custom websites with a drag-and-drop visual editor, Sanity CMS backend, and zero-config deployment.
4
4
 
5
+ **Designed for Vercel Hobby tier** — the framework is engineered to run comfortably within Vercel's free/Hobby plan limits (4h Fluid Active CPU, 10 GB Fast Origin Transfer per month). Aggressive ISR caching, Sanity CDN routing, bot mitigation, and Edge-first middleware keep serverless CPU usage minimal even under crawler traffic.
6
+
5
7
  ## Features
6
8
 
7
9
  - **Visual Page Builder** — Infinite canvas editor with device previews (desktop, tablet, phone)
@@ -13,6 +15,7 @@ A reusable Visual Page Builder framework for Next.js. Build custom websites with
13
15
  - **Asset Management** — Cloudflare R2 storage with browser, thumbnails, and CDN serving
14
16
  - **Setup Wizard** — Guided onboarding for new sites
15
17
  - **Sanity v3 CMS** — Structured content with custom schemas, GROQ queries, and ISR
18
+ - **Vercel-Optimized** — Sanity CDN for public queries, 24h ISR, R2 direct CDN shortcut, bot guard middleware, aggressive robots.txt with crawl-delay — all tuned to minimize serverless CPU on Hobby tier
16
19
 
17
20
  ## Quick Start
18
21
 
@@ -10,8 +10,9 @@ import { assetUrl } from "../../../lib/assets";
10
10
 
11
11
  const cfg = getSiteConfig();
12
12
 
13
- // ISR: cache for 1 hour, revalidate in background on next request.
14
- export const revalidate = 3600;
13
+ // ISR: cache for 24 hours. Content changes are rare; admin can trigger
14
+ // on-demand revalidation via /api/admin/revalidate after edits.
15
+ export const revalidate = 86400;
15
16
 
16
17
  interface PageProps {
17
18
  params: Promise<{ slug: string }>;
@@ -4,8 +4,9 @@ import type { Page } from "../../lib/sanity/types";
4
4
  import { PageRenderer } from "../../components/blocks";
5
5
  import { getSiteConfig } from "../../lib/config";
6
6
 
7
- // ISR: cache for 1 hour, revalidate in background on next request.
8
- export const revalidate = 3600;
7
+ // ISR: cache for 24 hours. Content changes are rare; admin can trigger
8
+ // on-demand revalidation via /api/admin/revalidate after edits.
9
+ export const revalidate = 86400;
9
10
 
10
11
  async function getHomePage(): Promise<Page | null> {
11
12
  try {
@@ -10,9 +10,9 @@ import { assetUrl } from "../../../../lib/assets";
10
10
 
11
11
  const cfg = getSiteConfig();
12
12
 
13
- // ISR: cache for 1 hour, revalidate in background on next request.
14
- // Replaces force-dynamic reduces SSR invocations by ~95%.
15
- export const revalidate = 3600;
13
+ // ISR: cache for 24 hours. Content changes are rare; admin can trigger
14
+ // on-demand revalidation via /api/admin/revalidate after edits.
15
+ export const revalidate = 86400;
16
16
 
17
17
  interface ProjectPageProps {
18
18
  params: Promise<{ slug: string }>;
package/app/robots.ts CHANGED
@@ -3,13 +3,50 @@ import { getSiteConfig } from "../lib/config";
3
3
 
4
4
  const cfg = getSiteConfig();
5
5
 
6
+ /**
7
+ * robots.txt — Controls crawler access and rate.
8
+ *
9
+ * Crawl-delay (seconds between requests) is honoured by Bing, Yandex, Baidu
10
+ * and most well-behaved bots. Googlebot ignores it but respects the rate
11
+ * configured in Search Console. The 10-second delay drastically reduces
12
+ * serverless CPU usage from bot traffic on Hobby-tier hosting.
13
+ *
14
+ * Aggressive AI scrapers (GPTBot, CCBot, etc.) are blocked entirely.
15
+ */
6
16
  export default function robots(): MetadataRoute.Robots {
7
17
  return {
8
18
  rules: [
19
+ // Block known AI scrapers / aggressive bots
20
+ {
21
+ userAgent: "GPTBot",
22
+ disallow: ["/"],
23
+ },
24
+ {
25
+ userAgent: "CCBot",
26
+ disallow: ["/"],
27
+ },
28
+ {
29
+ userAgent: "anthropic-ai",
30
+ disallow: ["/"],
31
+ },
32
+ {
33
+ userAgent: "ClaudeBot",
34
+ disallow: ["/"],
35
+ },
36
+ {
37
+ userAgent: "Bytespider",
38
+ disallow: ["/"],
39
+ },
40
+ {
41
+ userAgent: "PetalBot",
42
+ disallow: ["/"],
43
+ },
44
+ // Default: allow with crawl delay
9
45
  {
10
46
  userAgent: "*",
11
47
  allow: "/",
12
- disallow: ["/admin/", "/studio/", "/api/admin/"],
48
+ disallow: ["/admin/", "/studio/", "/api/admin/", "/api/"],
49
+ crawlDelay: 10,
13
50
  },
14
51
  ],
15
52
  sitemap: `${cfg.domain}/sitemap.xml`,