Contact
project-pusher
Back to Archive
design / ID_006

project-pusher

project-pusher URL: /project/project-pusher The Story I've always been fascinated by automating my desktop, so I decided to build a system where my project updates would automatically be pushed to my own personal OS site

Read raw project notes

project-pusher

URL: /project/project-pusher

The Story

I've always been fascinated by automating my desktop, so I decided to build a system where my project updates would automatically be pushed to my own personal OS site. Before `project-pusher`, I had to manually insert everything into the database, which was incredibly painful and time-consuming, especially when the actual work was focused on the projects themselves. I wanted something that would feel like an editorial page for a blogger, but for my development work — a place where my creations could document themselves.

The hardest part, by far, was definitely the AI model. Finding the right model fitted for this tool was a real challenge. Since I'm on a free plan, I needed to find a model that was smart enough for the job but also completely free to use. It took a lot of experimentation and tweaking to get that right. This tool is one of my automated private tools, designed only for my specific situation, sites, and hosting provider.

Now, with `project-pusher`, I've gained so much time back. I'm skipping all that manual insertion, which is a huge relief. While I could have just built an open editorial, blogger-like page, this solution is tailored precisely to my workflow and saves me from that repetitive grind. That open editorial idea? Maybe for another project down the line.

Features

`project-pusher` is an automated system designed to streamline the documentation, cross-posting, and notification pipeline for my PERSONAL_OS website. When you run `node index.js `, it initiates a comprehensive process:

  • It leverages `scanProjectFiles` and `walk` to thoroughly examine every `.js`, `.json`, and `.md` file within the specified project folder.
  • The system then uses `extractFunctionsAndEndpoints`, `extractExternalUrls`, and `extractServiceNames` to analyze the code structure, identifying what the project does, its external dependencies, and services it uses.
  • Based on this analysis, it prompts for four key questions about why the project was built.
  • It generates a full HTML documentation page using `geminiGenerate`, with `openCodeGenerate` (using OpenCode Zen DeepSeek) or `ollamaGenerate` serving as fallbacks, based on the `generateMessage` context.
  • The generated page is pushed to the PERSONAL_OS MySQL database using `getDb`, `ensureChangelogTable`, `getLatestVersion`, and `getAllChangelogs`, making it live at `/project/X`.
  • A build log and project update are posted to X via `https://x.com/i/web` using `oauth-1.0a` and via Zernio API (`https://api.zernio.com/v1/posts`).
  • Finally, it sends a WhatsApp notification via an unlisted endpoint (`https://.../`) and a Telegram message using `https://api.telegram.org/bot$%7BTELEGRAM_BOT_TOKEN%7D/sendMessage`.
  • It interacts with my hosting cPanel for various filesystem operations like `cpanelGet`, `cpanelPost`, `cpanelMkdir`, `cpanelDirExists`, `cpanelWriteFile`, and `cpanelReadFile` for deployment and maintenance tasks, and handles fatal errors using `fatal`.

Technical Specs

`project-pusher` is built primarily with Node.js, utilizing a `dotenv` configuration for environment variables, `mysql2` for database interactions with PERSONAL_OS's MySQL, and `oauth-1.0a` for secure API authentications. Architecturally, it functions as an HTTP server, an MCP protocol server, and a CLI interface. It orchestrates a series of REST API calls and database queries, alongside crucial filesystem operations managed by specific cPanel integration functions. The tool connects to several external services: Google's Gemini API (`https://generativelanguage.googleapis.com/v1beta/models`), a local Ollama instance (`http://localhost:11434/api/generate`), OpenCode AI Zen DeepSeek (`https://opencode.ai/zen/v1`) for AI generation, X.com (`https://x.com/i/web` and `https://x.com/@mihamizan_mh`) for posting updates, Zernio API (`https://api.zernio.com/v1/accounts`, `https://api.zernio.com/v1/posts`) for account and post management, and Telegram's Bot API (`https://api.telegram.org/bot$%7BTELEGRAM_BOT_TOKEN%7D/sendMessage`) for notifications, as well as accessing fonts from `https://fonts.googleapis.com/css2` and connecting to an unlisted WhatsApp API.

Most Interesting Code

One of the most critical pieces of logic, reflecting the primary challenge I faced, is encapsulated in functions like `geminiGenerate`. This function is at the heart of the automated documentation process, responsible for leveraging external AI models to turn raw code analysis into coherent, human-readable project descriptions.

function geminiGenerate(prompt, config) { // Attempt to get content from Google's Gemini Pro model const response = await fetch('https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: prompt }] }], generationConfig: config }) }); return response.json(); }

This snippet exemplifies the direct interaction with a powerful AI service, which was the hardest part to get right due to the need for a smart, free model. It represents the core intelligence that transforms code into documentation, a process that relies heavily on carefully selected and configured AI endpoints.

Changelog

  • v1.0 — 2026-06-12 — Initial documentation generated.

Mi/OS 7.0

A personal portfolio in two operating systems.