diff --git a/.env.example b/.env.example
index 44bce90..213bd66 100644
--- a/.env.example
+++ b/.env.example
@@ -1,10 +1,18 @@
# Copy this file to secrets/.env and fill in your own values.
-# secrets/ is gitignored — real values never leave your machine.
+# secrets/ is gitignored, so real values never leave your machine.
VITE_NAME=Your Name
VITE_LOCATION=City, Country
VITE_EMAIL=you@example.com
VITE_GITHUB_USER=your-github-username
VITE_LINKEDIN=https://www.linkedin.com/in/your-profile
VITE_CV_URL=/CV/Bob-CV.pdf
-# Optional — powers the contribution graph (public + private). Use a token with no scopes; it ships in the deployed bundle.
-VITE_GITHUB_TOKEN=
+
+# Server-side only (server/index.js). Deliberately not prefixed with VITE_,
+# so Vite never inlines these into the browser bundle.
+# Powers the contribution graph. Use a fine-grained PAT scoped to your own
+# account only, read-only, no repository access selected. The server is the
+# only thing that ever sees it now, but keep it minimal-scope regardless.
+GITHUB_TOKEN=
+# Exact origin(s) allowed to call /api/* (your deployed domain).
+ALLOWED_ORIGIN=https://mudabbir.co.uk
+PORT=3001
diff --git a/index.html b/index.html
index cc3aa31..092657b 100644
--- a/index.html
+++ b/index.html
@@ -1,25 +1,25 @@
+ {profile.name} ({profile.email}) is the data controller for this
+ site. No cookies, analytics, or third-party trackers are used, and nothing you do here
+ is logged or stored on a server. Your light/dark theme choice is saved in your
+ browser's local storage only and is never transmitted anywhere. The Contributions
+ graph above is fetched by this site's own server, not your browser, so GitHub never
+ sees you as a visitor. If you email me, I'll only use your details to reply. Under UK
+ GDPR you can request access to or deletion of any data held about you by emailing{" "}
+ {profile.email}.
+
+
+ )}
+
+ );
+}
+
export default function Contact() {
const year = new Date().getFullYear();
return (
@@ -60,7 +92,10 @@ export default function Contact() {
{profile.name} · {profile.location}
- {year}
+
+
+ {year}
+
);
diff --git a/src/components/PushTracker.jsx b/src/components/PushTracker.jsx
index 91f75b4..be59fa1 100644
--- a/src/components/PushTracker.jsx
+++ b/src/components/PushTracker.jsx
@@ -2,7 +2,6 @@ import { useEffect, useState } from "react";
const WEEKS = 53; // trailing year, same span as GitHub's default graph
const MAX_LEVEL = 4;
-const TOKEN = import.meta.env.VITE_GITHUB_TOKEN || "";
function addDays(d, n) {
const x = new Date(d);
@@ -40,89 +39,18 @@ function levelMap(counts) {
return levels;
}
-async function fetchContributions(fromIso, toIso) {
- async function run(from) {
- const res = await fetch("https://api.github.com/graphql", {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${TOKEN}`,
- },
- body: JSON.stringify({
- query: `{
- viewer {
- contributionsCollection(from: "${from}T00:00:00Z") {
- totalCommitContributions
- totalPullRequestContributions
- totalIssueContributions
- totalPullRequestReviewContributions
- contributionCalendar {
- weeks {
- contributionDays {
- date
- contributionCount
- }
- }
- }
- }
- }
- }`,
- }),
- });
- const json = await res.json();
- if (!res.ok || json.errors) {
- throw new Error(json.errors?.[0]?.message || `GraphQL ${res.status}`);
- }
- return json.data.viewer.contributionsCollection;
+// Fetched from our own server (server/index.js), which holds the GitHub
+// token and calls the GitHub API itself, so the token never reaches the browser.
+async function fetchContributions() {
+ const res = await fetch("/api/contributions");
+ if (res.status === 501) {
+ const err = new Error("not_configured");
+ err.code = "not_configured";
+ throw err;
}
-
- // GitHub caps contributionCalendar at 366 days from `from`, but the 53-week
- // grid spans up to 371 days (Tue-Sat). Fetch the truncated tail separately.
- const counts = new Map();
- let maxDay = null;
- function absorb(cc) {
- for (const week of cc.contributionCalendar.weeks) {
- for (const day of week.contributionDays) {
- if (!maxDay || day.date > maxDay) maxDay = day.date;
- if (day.contributionCount > 0) counts.set(day.date, day.contributionCount);
- }
- }
- }
-
- let cc = await run(fromIso);
- absorb(cc);
- let commits = cc.totalCommitContributions;
- let prs = cc.totalPullRequestContributions;
- let issues = cc.totalIssueContributions;
- let reviews = cc.totalPullRequestReviewContributions;
-
- if (maxDay < toIso) {
- const [y, m, d] = maxDay.split("-").map(Number);
- const tailFrom = dayKey(addDays(new Date(y, m - 1, d), 1));
- const tail = await run(tailFrom);
- absorb(tail);
- commits += tail.totalCommitContributions;
- prs += tail.totalPullRequestContributions;
- issues += tail.totalIssueContributions;
- reviews += tail.totalPullRequestReviewContributions;
- }
-
- let last = null;
- for (const day of counts.keys()) if (!last || day > last) last = day;
-
- // Calendar sum matches GitHub's profile number (includes private contributions).
- let calendarSum = 0;
- for (const n of counts.values()) calendarSum += n;
-
- return {
- counts,
- total: calendarSum,
- commits,
- prs,
- issues,
- reviews,
- last,
- };
+ if (!res.ok) throw new Error(`proxy ${res.status}`);
+ const json = await res.json();
+ return { ...json, counts: new Map(Object.entries(json.counts)) };
}
export default function PushTracker() {
@@ -130,22 +58,16 @@ export default function PushTracker() {
const [data, setData] = useState(null);
useEffect(() => {
- if (!TOKEN) {
- setStatus("note");
- return;
- }
let cancelled = false;
(async () => {
try {
- const today = new Date();
- const thisSunday = addDays(today, -today.getDay());
- const gridStart = addDays(thisSunday, -(WEEKS - 1) * 7);
- const result = await fetchContributions(dayKey(gridStart), dayKey(today));
+ const result = await fetchContributions();
if (cancelled) return;
setData(result);
setStatus("ready");
- } catch {
- if (!cancelled) setStatus("error");
+ } catch (e) {
+ if (cancelled) return;
+ setStatus(e.code === "not_configured" ? "note" : "error");
}
})();
return () => {
diff --git a/src/content.js b/src/content.js
index a4d31df..b6f1e36 100644
--- a/src/content.js
+++ b/src/content.js
@@ -122,7 +122,7 @@ export const projects = [
"A cross-platform React Native app that aggregates media from device storage, Google Photos, and a home NAS into one timeline view, backed by a RESTful Express.js backend.",
image: "/images/projects/mass.svg",
detail:
- "Built as my final-year project, MASS pulls media from three sources — device storage, Google Photos, and a Synology NAS on the home network — and merges them into one chronological timeline. The Express backend sits between the app and each source, normalising metadata so sorting by date, type, or location stays consistent regardless of where the file lives. Most of my engineering time went into the caching layer: repeated timeline fetches hit the cache instead of re-querying all three sources, which is where the 30% latency reduction came from.",
+ "Built as my final-year project, MASS pulls media from three sources: device storage, Google Photos, and a Synology NAS on the home network, and merges them into one chronological timeline. The Express backend sits between the app and each source, normalising metadata so sorting by date, type, or location stays consistent regardless of where the file lives. Most of my engineering time went into the caching layer: repeated timeline fetches hit the cache instead of re-querying all three sources, which is where the 30% latency reduction came from.",
features: [
"Reduced data retrieval latency 30% through optimized API caching",
"Metadata-driven sorting across diverse media types",
@@ -140,7 +140,7 @@ export const projects = [
"A 240 GHz radio-frequency setup that uses the Doppler effect to track three moving targets, with an Arduino ESP32 board processing the sensor data and serving live results as a website.",
image: "/images/projects/radar.svg",
detail:
- "A hardware build around a 240 GHz Doppler radar module and an ESP32. The board samples the RF signal, extracts velocity from the Doppler shift, and keeps track of up to three targets at once. Results stream over Wi-Fi to a small web dashboard I wrote so I could watch the tracking live — half project, half excuse to get comfortable with raw sensor data.",
+ "A hardware build around a 240 GHz Doppler radar module and an ESP32. The board samples the RF signal, extracts velocity from the Doppler shift, and keeps track of up to three targets at once. Results stream over Wi-Fi to a small web dashboard I wrote so I could watch the tracking live. Half project, half excuse to get comfortable with raw sensor data.",
features: [
"240 GHz RF sensing exploiting the Doppler shift for motion tracking",
"Tracks three moving targets simultaneously",
@@ -174,7 +174,7 @@ export const projects = [
"A full CRUD(L) application built to learn React Native properly: create, read, update, delete, and list flows across screens.",
image: "/images/projects/crudl.svg",
detail:
- "A deliberately small React Native app that exists because I wanted to actually understand the framework before building anything big on it. It walks through the full create-read-update-delete-list cycle with separate screens for list, detail, and edit — and the navigation between them is where most of my learning happened.",
+ "A deliberately small React Native app that exists because I wanted to actually understand the framework before building anything big on it. It walks through the full create-read-update-delete-list cycle with separate screens for list, detail, and edit. The navigation between them is where most of my learning happened.",
features: [
"Complete CRUD(L) flows across multiple screens",
"Navigation between list, detail, and edit views",
@@ -191,7 +191,7 @@ export const projects = [
"A native Android habit tracker built in Kotlin with MVVM architecture and Room Database for offline-first persistence, plus notification-driven reminders and progress visualization.",
image: "/images/projects/routines.svg",
detail:
- "A habit tracker I built for myself in native Android. Kotlin with MVVM, Room for offline-first persistence, and system notifications that nudge at set times. The progress view plots completion trends so a broken streak is obvious at a glance — it's the project where I got serious about architecture rather than just making screens work.",
+ "A habit tracker I built for myself in native Android. Kotlin with MVVM, Room for offline-first persistence, and system notifications that nudge at set times. The progress view plots completion trends so a broken streak is obvious at a glance. It's the project where I got serious about architecture rather than just making screens work.",
features: [
"MVVM architecture with a dedicated ViewModel layer",
"Room database for offline-first local persistence",
@@ -208,7 +208,7 @@ export const projects = [
"A GPS and proximity-driven React Native game where players claim hidden caches based on physical location and device orientation, backed by a RESTful API.",
image: "/images/projects/geo-hunt.svg",
detail:
- "The mobile-development coursework project: a game where hidden caches are claimed by being physically near them, with the device's compass giving bearing and distance to guide you in. The UI re-renders as you move so the map feels live rather than polled. The backend was the graded piece — I pushed it to 90% unit-test coverage before submission.",
+ "The mobile-development coursework project: a game where hidden caches are claimed by being physically near them, with the device's compass giving bearing and distance to guide you in. The UI re-renders as you move so the map feels live rather than polled. The backend was the graded piece, and I pushed it to 90% unit-test coverage before submission.",
features: [
"Geolocation and compass APIs for real-time bearing and distance",
"Responsive UI that updates dynamically as the player moves",
@@ -242,7 +242,7 @@ export const projects = [
"A desktop CV builder written in Java with a Swing interface: form-driven editing that generates a clean, printable CV.",
image: "/images/projects/cv-builder.svg",
detail:
- "An early desktop project in Java and Swing — form-driven editing of CV sections with a live preview and printable output. Built long before I had any web experience, and still the reason I understand why most people prefer not building UIs in Swing.",
+ "An early desktop project in Java and Swing: form-driven editing of CV sections with a live preview and printable output. Built long before I had any web experience, and still the reason I understand why most people prefer not building UIs in Swing.",
features: [
"Form-driven editing of CV sections",
"Live preview before export",
@@ -381,7 +381,7 @@ export const localAI = {
// Self-assessed working proficiency, not a byte share: weighted by how many
// projects were built in each language and current fluency, not raw lines.
// Java leads; C++/Go mid-band; Python eased down (fewer recent projects);
-// JS/CSS raised on project count; TypeScript low — known via JavaScript only.
+// JS/CSS raised on project count; TypeScript low, known via JavaScript only.
export const languageStats = [
{ name: "Java", pct: 56 },
{ name: "JavaScript", pct: 48 },
diff --git a/src/index.css b/src/index.css
index fa813cf..9e1b812 100644
--- a/src/index.css
+++ b/src/index.css
@@ -20,7 +20,7 @@
}
:root {
- /* light theme (default) — Anthropic cream / orange */
+ /* light theme (default): Anthropic cream / orange */
--bg: #f5f2ea;
--bg-alt: #ece7da;
--surface: #fbfaf6;
@@ -40,8 +40,8 @@
--panel-muted: #a39b8a;
/* contribution cells (light) */
--pt-empty: #eae4d5;
- --pt-l1: #ecd9c4;
- --pt-l2: #dfb28f;
+ --pt-l1: #f0c69a;
+ --pt-l2: #e2a066;
--pt-l3: #d97757;
--pt-l4: #a84e31;
@@ -1213,6 +1213,52 @@ a {
color: var(--panel-muted);
}
+.footer-bar-right {
+ display: flex;
+ align-items: center;
+ gap: 16px;
+}
+
+.privacy-note {
+ position: relative;
+}
+
+.privacy-toggle {
+ background: none;
+ border: none;
+ padding: 0;
+ font: inherit;
+ font-size: 13px;
+ color: var(--panel-muted);
+ text-decoration: underline;
+ text-underline-offset: 3px;
+ cursor: pointer;
+}
+
+.privacy-toggle:hover {
+ color: var(--panel-ink);
+}
+
+.privacy-panel {
+ position: absolute;
+ bottom: calc(100% + 12px);
+ right: 0;
+ width: min(340px, 80vw);
+ padding: 16px 18px;
+ border-radius: var(--radius);
+ border: 1px solid color-mix(in srgb, var(--panel-ink) 14%, transparent);
+ background: var(--bg);
+ color: var(--ink-soft);
+ font-size: 12.5px;
+ line-height: 1.55;
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
+ z-index: 20;
+}
+
+.privacy-panel strong {
+ color: var(--ink);
+}
+
/* ---------- custom cursor ---------- */
.cursor-dot {
diff --git a/vite.config.js b/vite.config.js
index 58653c0..f9c773b 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -6,4 +6,11 @@ export default defineConfig({
plugins: [react(), tailwindcss()],
// Personal data lives in secrets/.env (gitignored, never uploaded).
envDir: "secrets",
+ server: {
+ // In dev, forward API calls to the local server/index.js proxy
+ // (run `npm start` inside server/) instead of duplicating its logic here.
+ proxy: {
+ "/api": "http://localhost:3001",
+ },
+ },
});