SaaS Diary個人開発SaaSを作って育てる開発日記

ホーム › 技術ログ

技術ログ

実装で詰まった話・解決策・コード公開。個人開発者が実際に作って動かす中で詰まった所と、その直し方を書いています。

新しい順

ENTech logHow to show variants as separate products on Shopify collection pagesShopify themes show one card per product, so a tee sold in five colors appears once. You can show a card per color without duplicating products or editing theme code. Here are the three ways and what goes wrong with each. ENTech logShopify multiple images per variant: show only the selected color's photosShopify gives each variant one variant image, so back, close-up and on-model photos show for every color. Here are the three ways to show only the selected color's photos, and what goes wrong with each. ENTech logHow to show an estimated delivery date on a Shopify product pageA line like "ships in 3 to 5 days" leaves the shopper counting. Here are three ways to show a real delivery date on your Shopify product page, and how each handles weekends, holidays and your cut-off time. ENTech logShopify color swatches for separate products, without Shopify PlusIf each color of an item is its own Shopify product, you can show all colors as swatches on each of those products without Shopify Plus and without merging them. Here are the three options and what each one does to your URLs, photos, prices and reviews. 技術ログphp2shell(CVE-2026-109618/109619)は php -v では判定できない — FPM・Docker・ディストリで版の数字がずれる所php2shell の影響は Web を処理している PHP の版で決まる。php -v は CLI の版しか出さず、Docker は pull と作り直しまで古いまま、Ubuntu と RHEL は 8.3.6 や 8.0.30 のような古い数字のまま修正される。2026-10-22 時点の修正済みパッケージの表と、自分のサーバーで確かめるコマンドを載せた。 ENTech logSeparate inventory adjustment gains and losses in Odoo 19 and 20 (Stock Valuation Account Incoming and Outgoing are gone)Odoo 19 and 20 have one Loss Account on the Inventory adjustment location, so counts that find stock and counts that lose stock both post there and the profit and loss shows only the net. What changed from Odoo 18, the debit and credit of each case, the manual workaround, and a Gain Account next to the Loss Account. ENTech logHow to add a search bar that shows products as you type on WixThe no-code way to show products as visitors type on Wix: install Live Product Search Bar and drag it into your header. Suggestions with photo, name and price appear from the first letter, small typos are forgiven, and new or deleted products are reflected for the next visitor. ENTech logHow to let members delete their own account on Wix (and their contact, for GDPR)The no-code way to let Wix site members delete their own account: install Delete Member Account and place its Delete Account Button on your members' account page. Members see what will be deleted, confirm twice, and are logged out; you can have their contact deleted too. Also below: what Wix does on its own, and the code route. ENTech logHow to approve Wix members automatically (and bulk approve pending members)The no-code way to approve Wix site members automatically: keep signups on "Only people I approve", install Member Approval Rules and add the addresses or, with Pro, the domain you expect. Listed people are approved once they confirm their email; everyone else waits in one list you can approve or block in bulk. Also below: what Wix does on its own, and the code route. ENTech logHow to only allow business emails on a Wix form (block Gmail, Yahoo and disposable addresses)The no-code way to accept work addresses only on the Wix Forms form you already have: Business Email Only refuses Gmail, Yahoo, Outlook and other free email from many countries plus 9,226 disposable domains, with your message under the email field, partner exceptions and a test box. One form is free. Also below: what Wix Forms' own validations can do. ENTech logKPI dashboard for Odoo Community 20: shared dashboards from any list or pivot, where each user sees only their own numbersOn Odoo 20 Community you can view ready-made dashboards but not build your own or share one with your team. An add-on turns any list, pivot or graph into a number card or chart from the gear menu, and counts every card with the viewer's own access rights, so salespeople see only their own totals. ENTech logHow to limit a Wix form to one submission per email (Wix Forms)The no-code way to allow one submission per email on the Wix Forms form you already have: install One Submission Per Email, tick the form and save. A repeat is not saved and your message appears under the email field, and one form is free. Also below: what Wix Forms limits on its own, and the ways that need code. ENTech logAI assistant for Odoo Community: ask your Odoo data in plain English with your own OpenAI, Claude or Gemini key (Odoo 20)Odoo 20 Community has no AI assistant that answers questions about your records. To ask "What were confirmed sales per month this year?" inside Odoo, you need an add-on that uses your own OpenAI, Claude, Gemini or Ollama key. What to check first: read-only, the asking user's rights, no SQL, and answers you can open in Odoo. ENTech logStop salespeople changing the unit price and hide cost in Odoo 17 to 20Odoo Community (17 to 20) has no setting to make Unit Price read-only for salespeople or to hide the product cost from them: cost and margin are open to every internal user, and a field made read-only in the form view can still be changed by import or API. What standard Odoo offers, the free workarounds, and how to enforce the rule on the server. ENTech logMake AI agent changes in Odoo wait for approval (ChatGPT, Claude, MCP, n8n, Odoo 20)Odoo 20 has no approval step for API calls outside purchases: JSON-2, XML-RPC and JSON-RPC run the method as soon as the key is checked, and confirming an order or posting an invoice needs no more than ordinary Sales or Billing rights. What standard Odoo offers, free ways to limit an AI agent, and how to make its changes wait for a person. ENTech logWhen was an Odoo API key last used? Find unused keys and limit API calls (Odoo 20)An Odoo 20 API key stores its description, user, scope, creation date and expiration date, and nothing about its use. Latest Login on the user changes only for some clients, the server log does not name the key, and Odoo has no limit on calls per key. What each source shows, free ways to keep keys under control, and how to see the last call, IP address and daily calls of every key. ENTech logHow to see what ChatGPT, Claude or an MCP server changed in Odoo (Odoo 20)Standard Odoo 20 keeps three traces of an API change: the Last Updated by field, chatter tracking on tracked fields, and one line per call in the server log. None of them names the API key, and deleting a record also deletes its chatter. What each trace shows, a free setup that makes them more useful, and how to keep the previous values of the changes an AI agent makes. ENTech logRead-only Odoo API key for ChatGPT, Claude or an MCP server (Odoo 20)In Odoo 20 Community the only scope a new API key can get is RPC, and a key acts with every right of its user: on 2026-10-09 the same key that read orders also confirmed them through /json/2/sale.order/action_confirm. The free way to limit an AI agent is a dedicated user; where that stops, and why an ordinary update from an agent can remove order lines. 技術ログNetlifyの無料枠はどこまで無料か — 300クレジットの中身と、サイトが止まる条件Netlifyの無料プランは月300クレジット。本番デプロイは1回15クレジットなので月20回で上限に達し、1日1回デプロイする運用は月の半ばで止まります。使い切ると自動課金ではなくチームの全サイトが停止し、新規デプロイもできません。公式ドキュメントの単価と、実際に枯渇させた夜の経験をまとめます。 技術ログERR_INVALID_PACKAGE_CONFIG の正体は、3バイトのBOMだったプロジェクトを置いていないホームディレクトリで、nodeが Invalid package config を出し続けました。犯人はBOMだけが入った3バイトのpackage.json。Nodeが親をたどって設定を探す仕組みと合わさって、配下のスクリプトが全部巻き込まれていた話です。 技術ログ毎週「準備OK」と報告していた監視が、一度も出していない申請を緑にしていた準備状況の監視が毎週「良好」を返していました。準備は本当に整っていたので嘘ではありません。ただ、肝心の「出したのか」が項目に無く、申請は一度も出ていませんでした。外から測れる証拠で判定を作り直すまでの記録です。 技術ログサービスを止めたのに、特商法だけ「月額480円」のままだった課金もログインも止めて、トップに告知も出した。それでも特定商取引法に基づく表記には月額480円が残り、案内していた解約導線は404でした。止めるときに直す場所のリストと、消えたこと・残ったことを両方確認する手順の記録です。 技術ログ記事20本が、ずっと計測されていなかった — 「入れた」ではなく「返ってくるか」で確認する集客用に書いた記事20本に、アクセス解析のタグが1つも入っていませんでした。エラーは出ません。トップのセッションは毎日増えるからです。全ページを数えて直し、公開URLで検算するまでの記録。 技術ログ削除したはずの一文が、まだ公開されていた — バックアップを配信ディレクトリに置くな法務文書から一文を削除した翌朝、配信ディレクトリの走査で .bak が3本 HTTP 200 で見つかりました。中身は削除前の版。原因・被害・直し方と、週1の見張りでは最悪7日気づけなかった監視設計の話です。 技術ログexit 0 は「動いた」の証明ではない — 無音で失敗する自動化を夜の点呼で捕まえるタスク一覧が全部「結果0」で埋まっていても、その日の投稿が1本も出ていないことはあります。孤児プロセスで上限が効かない、通知の宛先が未設定で静かに消える、在庫監視では欠測に気づけない。3つの穴を塞いで、成果物を一次情報で数える夜の点呼を実装した記録です。 技術ログバックアップは毎日成功していた。一度も復元したことがなかったバックアップの完了通知は毎日届いていました。でも「実際に復元したことは何回?」と自問したら答えはゼロ回。実際に緑のまま壊れていた事故が2件あります。毎月バンドルを復号して中身を数える復元訓練を実装し、検査自体もわざと壊して赤くなることを確認した記録です。 技術ログ必ず解けるパズルを自動生成する — 麻雀ソリティアの逆生成アルゴリズム実装記パズルを自作すると最初にぶつかるのが「生成した問題が必ず解ける保証」。牌をランダムに置くと一定確率で詰み盤が生まれ、プレイヤーは理不尽に負けます。満杯の盤からフリーペアを取り切って解の手順を先に作る「逆生成」で解保証を実装し、独立ソルバで二重検証した記録です。 技術ログ個人開発でCapacitorアプリをGoogle Playに出すまでに踏み抜いた5つの落とし穴Web資産を持っているならCapacitorで同じコードをGoogle Playに出せます。私は数週間で自作Webツール数本をPlayに提出しましたが、コードより「Web開発の常識が通じないネイティブ層」で時間を溶かしました。実際に本番で踏んだ5つの落とし穴と修正を実コード込みで共有します。 技術ログPowerShell の Set-Content で日本語 UTF-8 ファイルが壊れる話PowerShell で「ファイルの一部を置換しよう」と Get-Content | Set-Content を回したら、日本語が全部文字化けして元に戻せなくなった。原因は Windows PowerShell 5.1 の既定エンコーディングが cp932(Shift-JIS)で、UTF-8 ファイルを読み書きするだけで多バイト文字が壊れるからです。私はこれで作業中の index.html を一度ダメにしました。 技術ログStripe Webhook 冪等性 — 本番で重複処理を防ぐ実装3パターン (TypeScript)Stripe Webhook は仕様として at-least-once delivery、同じ event.id が複数回届く前提で受信側を設計する必要がある。本記事では Stripe 公式仕様に基づく 3 つの冪等化パターン (DB UNIQUE 制約 / Redis SETNX / In-memory LRU) を TypeScript の動くコード付きで比較し、月イベント数とインスタンス数で選び方を示す。さらに公式が明記している『event.id 単独では識別できない稀ケース』(同じ subscription への別経路操作で別 event オブジェクト生成) と、その対応としての (event_type, object_id) 組合せ判定パターンも解説。saas-diary tech-log カテゴリの実装リファレンス系記事。 技術ログ個人開発者のバックアップ戦略 (3年分のコードを守る)個人開発者にとって、コードと環境設定は最も価値のある資産です。PCが壊れた日に「あれ、何ヶ月か前にバックアップを取った気がする」では遅すぎます。私が運用しているGoogle Drive一本化の自動バックアップ実装を共有します。 技術ログFastify を1年運用してわかった Express との違いNode.jsでWebサーバーを書くとき、ExpressとFastifyのどちらを選ぶべきか?私はGramShift Web側を当初Expressで作り、後にFastifyに移行しました。1年運用してわかった具体的な違いと、移行で得たメリットを共有します。 技術ログSQLite と PostgreSQL の違いと選び方 — 個人SaaSを1年運用して比較した個人開発SaaSのDB選択でPostgreSQL/MySQLを選ぶのは過剰スペックなことが多いです。GramShiftは現在もSQLiteで運用しており、運用コストはほぼゼロ。スケール限界の判断基準と、SQLite運用の注意点を共有します。 技術ログGitHub ReleasesでElectronアプリを配布する実例Electronアプリを個人で配布する場合、配布基盤のコストと管理工数が悩みどころです。私はGitHub Releasesを使った無料配布で17リリースを重ねてきました。具体的なワークフロー、CDN効果、ダウンロード統計の取り方まで実例で共有します。 技術ログWindowsタスクスケジューラで自動化する人がハマる3つの罠Windowsタスクスケジューラで自動化を組むと、最初は必ずどこかで詰まります。exit 9009 が出る、bat が動かない、なぜか実行されない、そんな状況の原因はだいたい3つに集約されます。20以上のタスクを運用してきた経験から共有します。 技術ログClaude vs Gemini を実プロジェクトで使い比べたコストAI APIをプロジェクトに組み込む際、ClaudeとGeminiのどちらを選ぶか悩みますよね。私は両方を実プロジェクトで並行運用して、コスト・品質・速度を実測しました。月60本の記事生成、議事録要約、コード補完、それぞれで見えた差を共有します。 技術ログVPSのメモリリークを発見した夜のデバッグ記録本番運用しているNode.jsサーバーが、3日連続で深夜にメモリを使い切って落ちる。pm2が自動再起動してくれるとはいえ、根本原因を放置するわけにはいきません。実際にheap snapshotで犯人を特定するまでの全手順を共有します。 技術ログDiscord webhookで個人開発の異常検知基盤を作る個人開発でSaaS本体+複数のWorkerを並走させていると、どこかが必ず異常を出します。その時に「気づかない」のが最大のリスクです。Discord webhookで月コストゼロのアラート基盤を作る設計と、私がGramShift運用で踏み抜いた落とし穴を共有します。 技術ログElectronアプリの自動アップデート機構を作る (実装記)Electronアプリをエンドユーザーに配布すると、必ず「古いバージョンのままバグ報告してくる人」が出ます。自動アップデート機構を最初から組み込んでおくと、ユーザー対応の時間が大きく減ります。GramShift Desktopで17回リリースを重ねて整えた実装を共有します。 技術ログStripeで月額課金を実装したときに詰まった3つの落とし穴Stripe Subscriptionは「とりあえず動かす」までは簡単ですが、本番運用するとwebhook冪等性、3Dセキュア対応、解約処理のUX判断など、ドキュメントだけでは見えない落とし穴がいくつもあります。GramShift開発で実際に3週間かけて踏み抜いた3つの罠を、コード込みで共有します。 技術ログGramShiftのAIは何を判断しているのか - Gemini 2.5 Flash統合の実装中身GramShiftは「AIハッシュタグ提案」を謳う自動化ツールですが、AIが実際に判断している箇所は限定的です。透明性のため、Gemini 2.5 Flash を使っている箇所、ハードコードの箇所、そして「行動学習」を意図的にしていない理由を実装レベルで開示します。