From 852397bb564cb843c524405175add6a67c5339cb Mon Sep 17 00:00:00 2001
From: Anurag Verma <78868769+anurag629@users.noreply.github.com>
Date: Fri, 27 Feb 2026 10:29:56 +0530
Subject: [PATCH 1/3] =?UTF-8?q?ci:=20enforce=20dev=20=E2=86=92=20main=20PR?=
=?UTF-8?q?=20flow=20(#2)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* docs: improve README hero image, add contributors section (#1)
Switch hero from blog-minimal-dark to github-readme-hero template with
brand accent color. Add contrib.rocks contributors grid. Condense
contributing section to avoid redundancy with CONTRIBUTING.md.
* ci: add workflow to restrict PRs targeting main to dev branch only
PRs targeting main from any branch other than dev will fail the
PR Target Check. This enforces the flow: feature branches → dev → main.
* ci: retrigger checks after base branch change
* ci: run CI on PRs targeting dev branch too
---
.github/workflows/ci.yml | 4 ++--
.github/workflows/pr-target-check.yml | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
create mode 100644 .github/workflows/pr-target-check.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fbf7594..17c905d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,9 +2,9 @@ name: CI
on:
push:
- branches: [main]
+ branches: [main, dev]
pull_request:
- branches: [main]
+ branches: [main, dev]
jobs:
build:
diff --git a/.github/workflows/pr-target-check.yml b/.github/workflows/pr-target-check.yml
new file mode 100644
index 0000000..3ef2504
--- /dev/null
+++ b/.github/workflows/pr-target-check.yml
@@ -0,0 +1,22 @@
+name: PR Target Check
+
+on:
+ pull_request:
+ branches: [main]
+
+jobs:
+ check-source-branch:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Only allow PRs from dev to main
+ if: github.head_ref != 'dev'
+ run: |
+ echo "::error::PRs targeting 'main' are only allowed from the 'dev' branch."
+ echo "Please target 'dev' instead, or merge your branch into 'dev' first."
+ echo ""
+ echo " Source: ${{ github.head_ref }}"
+ echo " Target: ${{ github.base_ref }}"
+ exit 1
+ - name: PR source branch is valid
+ if: github.head_ref == 'dev'
+ run: echo "PR from 'dev' to 'main' — allowed."
From 6b0373e3b50bebd742555b83037c435554b3f0f6 Mon Sep 17 00:00:00 2001
From: Anurag Verma <78868769+anurag629@users.noreply.github.com>
Date: Fri, 27 Feb 2026 15:16:42 +0530
Subject: [PATCH 2/3] feat: Raycast-inspired UI/UX redesign (#3)
* feat: Raycast-inspired UI/UX redesign across all pages
Redesign the entire site with a polished, premium feel inspired by Raycast:
- Design system: enhanced shadows, gradients, glassmorphism, animations
- Header: frosted glass, gradient border, nav hover pills
- Homepage: hero glow, equal-width bento category grid, feature cards,
vertical timeline, terminal chrome API teaser, OSS banner
- Templates gallery: search bar, filter pills, card hover glow
- Editor: dot-grid canvas, refined panels, gradient export button
- API docs: sidebar icons, terminal chrome code blocks, copy buttons
- 404 page: SVG illustration, floating shapes, gradient text
- Footer: 3-column grid layout with gradient top border
- Layout: Astro View Transitions for smooth page navigation
- Fix thumbnail API rendering templates at 600x315 viewport (cropping)
instead of 1200x630 with resvg scale-down (showing full template)
* feat: add GitHub stars and visitor counter utilities
Add supporting libs for GitHub star count, Upstash Redis visitor
counter, and the /api/visitors endpoint. Include .env.example for
required environment variables.
---
.env.example | 4 +
src/components/BackToTop.astro | 82 +++
src/components/Footer.astro | 171 +++++--
src/components/Header.astro | 123 ++++-
src/components/StarBanner.astro | 205 ++++++++
src/components/Toast.astro | 83 ++++
src/components/editor/ExportBar.tsx | 91 +++-
src/components/editor/TemplateThumbnail.tsx | 4 +-
src/layouts/Layout.astro | 17 +-
src/lib/github-stars.ts | 31 ++
src/lib/og-engine.ts | 7 +-
src/lib/upstash.ts | 60 +++
src/pages/404.astro | 102 +++-
src/pages/api-docs.astro | 108 +++-
src/pages/api/templates/[id]/thumbnail.png.ts | 3 +-
src/pages/api/visitors.ts | 26 +
src/pages/index.astro | 466 ++++++++++++++----
src/pages/templates.astro | 225 +++++++--
src/styles/api-docs.css | 154 +++++-
src/styles/editor.css | 65 ++-
src/styles/global.css | 253 ++++++++--
21 files changed, 1970 insertions(+), 310 deletions(-)
create mode 100644 .env.example
create mode 100644 src/components/BackToTop.astro
create mode 100644 src/components/StarBanner.astro
create mode 100644 src/components/Toast.astro
create mode 100644 src/lib/github-stars.ts
create mode 100644 src/lib/upstash.ts
create mode 100644 src/pages/api/visitors.ts
diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..259f995
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,4 @@
+# Upstash Redis (visitor counter)
+# Get these from https://console.upstash.com → Redis → your database → REST API
+UPSTASH_REDIS_REST_URL=https://your-endpoint.upstash.io
+UPSTASH_REDIS_REST_TOKEN=your-token-here
diff --git a/src/components/BackToTop.astro b/src/components/BackToTop.astro
new file mode 100644
index 0000000..c49130b
--- /dev/null
+++ b/src/components/BackToTop.astro
@@ -0,0 +1,82 @@
+
+
+
+
+
+
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index 79f7740..8459d93 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -4,45 +4,78 @@ const year = new Date().getFullYear();