Personal bio/portfolio website.
Live at:
- Astro
- React
- TypeScript
- TailwindCSS
bun install
bun run devGET /api/moods
Query params:
before(string, optional): pagination cursor (oldest mood id currently loaded).
Response shape:
{
"posts": [
{
"id": "12345",
"datetime": "2025-01-01T12:34:56+00:00",
"tag": "life",
"previewText": "text preview",
"previewHtml": "<p>text preview</p>",
"image": "https://...",
"mediaHtml": "<div>...</div>",
"needsDetailPage": true,
"forwardedFrom": { "name": "source", "href": "https://t.me/..." },
"quote": { "text": "quoted text", "author": "someone", "href": "/mood/123" },
"reactions": [
{ "emoji": "👍", "emojiId": "123", "emojiImage": "https://...", "count": "2", "isPaid": false }
]
}
],
"channel": {
"slug": "my_channel",
"title": "My Channel"
}
}These endpoints return SVG images:
GET /api/status.svg(optionaltheme=light|dark)GET /api/tech-stack.svg(optionaltheme=light|dark)GET /api/site-badge.svg(optionaltheme=light|dark)GET /api/project.svg(requiredproject, optionaltheme=light|dark)
Full SVG API documentation:
Embed mood posts on other platforms via oEmbed protocol:
GET /api/oembed.json- oEmbed endpointGET /mood/embed- Embeddable widget
Full oEmbed documentation:
Mood photos can be served via a Cloudflare Worker for higher quality and edge caching.
Documentation:
/src/pages- Route entry pointssrc/pages/api- Dynamic SVG endpointssrc/components- Reusable UI componentssrc/layouts- Layout wrapperssrc/styles- Global styles and fontspublic- Static assets
src/pages/index.astro- Homepage contentsrc/styles/globals.css- Global styling overridespublic- Logos, icons, and other static media
GHOST_URL- Ghost CMS URLGHOST_CONTENT_APIKEY- Ghost CMS content API keyGITHUB_TOKEN- GitHub GraphQL token for project data and star countsPUBLIC_HD_IMAGE_URL- Cloudflare Worker base URL for Mood imagesTELEGRAM_WEBHOOK_SECRET- Secret token for/api/telegram-webhookCLOUDFLARE_ACCOUNT_ID- Cloudflare account id for KV writesCLOUDFLARE_API_TOKEN- Cloudflare API token for KV writesCLOUDFLARE_KV_NAMESPACE_ID- Cloudflare KV namespace id (MOOD_IMAGES)- See
.env
- miantiao-me/BroadcastChannel - Inspiration and code reference for
moodsideas. - ddiu8081/ddiu.io - Inspiration and code reference for
Ghost APIintegration. - zmh-program/zmh-program.github.io - Inspiration for layout and style ideas.
- The Astro, React, and Tailwind CSS communities for great tooling and docs.
- Open-source maintainers whose libraries power this site.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This repository includes and is derived from third-party open-source software:
- Portions of the codebase are derived from AGPL-licensed projects and therefore the entire project is distributed under the AGPL-3.0 in accordance with its terms.
- This project also incorporates code licensed under the MIT License. MIT-licensed components remain under their original license, and their copyright notices are preserved as required.
If you modify this program and run it as a network service, you are required to make the complete corresponding source code of your modified version available to users of that service, as mandated by the AGPL-3.0.
See the LICENSE file for the full license text.