My Honey Pot: The Tech Behind It

in HiveDevs4 months ago

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

image.png


Tech Stack

Here's what's running behind the scenes:

TechnologyRole
AstroAstro 5Main framework - server-side rendering
SolidJSSolidJS 1.9Interactive UI components
TailwindTailwind CSS 4Styling with CSS variables
TanStackTanStack QueryData fetching, caching, SSR hydration
Hive@hiveio/wax + workerbeeHive blockchain SDK
TypeScriptTypeScriptType 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

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:

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:

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:

No database = one container. Want to run your own? Here you go:

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

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 🚀

Sort:  

Congratulations @barddev! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 1000 upvotes.
Your next target is to reach 1250 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

yo @barddev this honey pot tech sounds wild, man🔥
Love how you're building something clever to catch bots/scammers —that's next-level for Hive security.
Quick peek at the code/setup? Or is it still under wraps?
Respect for sharing the behind-the-scenes, bro

All code is public and you can check it out on my github

yo @barddev thanks for the link bro, appreciate it!🔥
Just checked your GitHub — code looks clean and solid, nice work making it public.Gonna dive in deeper when I have a minute —respect for open-sourcing the honey pot tech. Keep building man, this stuff helps the whole chain.

Zostałeś Pan namierzony!

Trafiasz do bazy polskich użytkowników