# Under the Hood: How My Honey Pot Works Last time I showed you what My Honey Pot can do - templates, themes, layout editor, all that good stuff. Now let's peek **under the hood** and see how it all comes together. 🔧 The whole thing is open source: [github.com/KKocot/my-honey-pot](https://github.com/KKocot/my-honey-pot) ![image.png](https://images.hive.blog/DQmUxSETsuYZP59uUomb7BacoPGNALZuiAFxpS1HscAwhQ3/image.png) --- ## Tech Stack Here's what's running behind the scenes: | | Technology | Role | |--|------------|------| | ![Astro](https://avatars.githubusercontent.com/u/44914786?s=64) | **Astro 5** | Main framework - server-side rendering | | ![SolidJS](https://avatars.githubusercontent.com/u/79226042?s=64) | **SolidJS 1.9** | Interactive UI components | | ![Tailwind](https://avatars.githubusercontent.com/u/67109815?s=64) | **Tailwind CSS 4** | Styling with CSS variables | | ![TanStack](https://avatars.githubusercontent.com/u/72518640?s=64) | **TanStack Query** | Data fetching, caching, SSR hydration | | ![Hive](https://avatars.githubusercontent.com/u/62291009?s=64) | **@hiveio/wax + workerbee** | Hive blockchain SDK | | ![TypeScript](https://images.hive.blog/64x64/https://logo.svgcdn.com/logos/typescript-icon.png) | **TypeScript** | Type safety across the whole codebase | The big thing here: **there is no database**. Zero. Posts, profile, settings, comments - everything comes straight from the Hive blockchain. One container, no database to manage, no backups to worry about. 🍯 --- ## How It Works When someone visits your blog, this is what happens: 1. **Browser requests the page** - Astro handles it on the server 2. **Server fetches from Hive** - your posts, profile, and blog config 3. **Full HTML is generated** - fast, SEO-friendly, works without JavaScript 4. **Interactive parts hydrate** - SolidJS picks up tabs, infinite scroll, admin panel TanStack Query makes sure data fetched on the server is reused in the browser - no duplicate API calls. ### Config on the blockchain Your blog settings live as a **comment on Hive** under `@barddev/my-blog-configs`. Just JSON in a markdown code block - **transparent**, **decentralized**, and **versioned** with every save. ![image.png](https://images.hive.blog/DQmWtp2uddc8TUwGkaEf7YFYhB62pGkYRqYUL91Cr5VZ9AK/image.png) By default all configs go under my post - feel free to use it. But if you want full independence, create your own post and set two env variables: ```bash CONFIG_PARENT_AUTHOR=your-hive-username CONFIG_PARENT_PERMLINK=your-config-post-permlink ``` ### Rendering posts The app uses the same markdown renderer as **Condenser** and **Denser** - the official Hive frontends. Embedded media, image proxying, link sanitization, security checks - all handled out of the box. ### API failover The app connects to 3 Hive API nodes. If one is down, it automatically switches to the next: ```typescript export const HIVE_API_ENDPOINTS = [ "https://api.openhive.network", "https://api.hive.blog", "https://api.syncad.com", ]; ``` --- ## Deployment & Self-hosting The app runs in two places right now: - **VPS (Docker):** [myhoneypot.bard-dev.com](https://myhoneypot.bard-dev.com) - **Vercel:** [my-honey-pot.vercel.app](https://my-honey-pot.vercel.app) No database = one container. Want to run your own? Here you go: ```bash git clone https://github.com/KKocot/my-honey-pot cd my-honey-pot npm install # Set your Hive username echo "HIVE_USERNAME=your-hive-username" > .env # Option A: Docker docker build -t my-honey-pot . docker run -p 4321:4321 --env-file .env my-honey-pot # Option B: Run directly npm run build node ./dist/server/entry.mjs ``` Or just deploy to Vercel for free - connect the repo, set `HIVE_USERNAME`, done. --- ## Open source - and I take requests 💡 Full code on GitHub: [github.com/KKocot/my-honey-pot](https://github.com/KKocot/my-honey-pot) Want a new feature? Different layout, new widget, better mobile experience - whatever it is, just ask. Drop a comment, DM me, or open a GitHub issue. I'm actively building this and happy to make what the community needs. Let's build something great together 🚀