Skip to content
项目

关于

Personal website built with Next.js, TypeScript and Styled-components

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

sreetamdas.com

Thanks for checking out my personal website and blog! Here's the source code for it :)

Tech stack

Overview

For a while, I had trouble following up on my side-projects so I rebuilt my website: I could now play around with pretty much everything.

The website is pretty minimal, and should hopefully provide a seamless experience. If you notice anything that you'd like to improve, feel free to create an issue and/or send a pull request!

The mini-game

If you don't know what I am referring to, that's great! You haven't discovered the mini-game yet. If you'd like to check it out, please open up the browser console on sreetamdas.com. 😉

You can check out some more details below ⬇️


❗❗ HERE BE SPOILERS ❗❗

Well, the cat's out of the bag: there's a mini-game on sreetamdas.com! If you're forking this repository for yourself, be aware that you will be forking that as well. 😅 It isn't a "module" as such that you can just remove from the website — though the game lies in the /foobar subdirectory.

Pretty much wherever the mini-game is present in the repo, it's placed under a foobar subfolder (eg. in components) so you'll know when you're about to come across mini-game related code. 😄


Page views & likes

Every blog post has a view counter and a little heart you can tap — both live in Cloudflare D1. Likes do not need an account: the server issues a signed HttpOnly like_id cookie for anonymous identity, stores only HMAC-derived hashes, and uses a separate salted IP hash as a per-page abuse ceiling. The public count is recomputed from the real likes each time, so it cannot quietly drift out of sync. A bit more on how it is wired up (plus a recount script) lives in the Contributing guide.

Development/Contributing

Please check out the Contributing guide

Local development

pnpm install
pnpm dev

Notes:

  • pnpm dev runs the Vite dev server with Content Collections integration.
  • pnpm build runs pnpm build:content-collections automatically via prebuild.
  • pnpm deploy applies pending D1 migrations, runs pnpm build, and deploys production via Wrangler.
  • pnpm deploy:staging applies the same migration gate to the staging D1 (sreetamdas_com_staging) before building and deploying staging.

Environment variables

Commonly used values:

  • VITE_SITE_URL (e.g. https://sreetamdas.com)
  • Buttondown newsletter: BUTTONDOWN_API_KEY (optional; falls back to mocks)
  • Keebs page data (Notion + Imgur):
    • NOTION_TOKEN
    • NOTION_KEEBS_PAGE_ID
    • IMGUR_API_CLIENT_ID
    • IMGUR_KEEBS_ALBUM_HASH
  • RWC page gist: GITHUB_RWC_GIST_ID (VITE_GITHUB_RWC_GIST_ID is also supported if you intentionally want the gist id to be public build-time config)
  • RWC private GitHub API token: GITHUB_TOKEN (optional; server-only)

Only client-safe values should use the VITE_ prefix. API keys and tokens should stay server-only and be provided as Cloudflare secrets or server env vars.

Prerendering in Cloudflare CI/Workers Builds

TanStack Start prerendering runs at build time, so missing build-time env vars can fail data loading.

  • Set CLOUDFLARE_INCLUDE_PROCESS_ENV=true in CI/Workers Builds.
  • Provide the required env vars in your CI environment.
  • Optionally commit a reference-style .env file (not secrets) so build-time resolution works:
BUTTONDOWN_API_KEY=${BUTTONDOWN_API_KEY}
NOTION_TOKEN=${NOTION_TOKEN}
NOTION_KEEBS_PAGE_ID=${NOTION_KEEBS_PAGE_ID}
IMGUR_API_CLIENT_ID=${IMGUR_API_CLIENT_ID}
IMGUR_KEEBS_ALBUM_HASH=${IMGUR_KEEBS_ALBUM_HASH}
GITHUB_RWC_GIST_ID=${GITHUB_RWC_GIST_ID}
GITHUB_TOKEN=${GITHUB_TOKEN}

Newsletter

I also run a very awesome newsletter! It's got curated links keeping up with the JavaScript, React and webdev world. And mechanical keyboards! Check it out at sreetamdas.com/newsletter :)

You can also view previous issues, and subscribe via RSS!

License

Licensed under the MIT License. Feel free to use in your own projects, with attribution please. A 🌟star on the repository would be super cool too! 😄

探索相关项目

加载中…