sreetamdas/sreetamdas.com
About
Personal website built with Next.js, TypeScript and Styled-components
Web & App DevelopmentMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalsreetamdas.com
Thanks for checking out my personal website and blog! Here's the source code for it :)
Tech stack
- React + TanStack Start (TanStack Router)
- Vite
- TypeScript
- Tailwind CSS
- Content: MDX processed via Content Collections
- Hosting + data: Cloudflare Workers and D1 (SQLite at the edge) via Drizzle
- Native analytics via stats.sreetamdas.com
- React Icons
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 devruns the Vite dev server with Content Collections integration.pnpm buildrunspnpm build:content-collectionsautomatically viaprebuild.pnpm deployapplies pending D1 migrations, runspnpm build, and deploys production via Wrangler.pnpm deploy:stagingapplies 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_TOKENNOTION_KEEBS_PAGE_IDIMGUR_API_CLIENT_IDIMGUR_KEEBS_ALBUM_HASH
- RWC page gist:
GITHUB_RWC_GIST_ID(VITE_GITHUB_RWC_GIST_IDis 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=truein CI/Workers Builds. - Provide the required env vars in your CI environment.
- Optionally commit a reference-style
.envfile (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! 😄
Explore related projects
Loading…