<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Urban on Medium]]></title>
        <description><![CDATA[Stories by Urban on Medium]]></description>
        <link>https://medium.com/@jinjinov?source=rss-22c063c31742------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VK66p9xqGo8pyE-H</url>
            <title>Stories by Urban on Medium</title>
            <link>https://medium.com/@jinjinov?source=rss-22c063c31742------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 15:38:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jinjinov/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I release a Blazor app to 8 distribution channels]]></title>
            <link>https://medium.com/@jinjinov/how-i-release-a-blazor-app-to-8-distribution-channels-970f015e4d16?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/970f015e4d16</guid>
            <category><![CDATA[blazor]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[net-maui]]></category>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 09:07:54 GMT</pubDate>
            <atom:updated>2026-04-04T09:07:54.119Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://openhabittracker.net/">OpenHabitTracker</a> is a free, open source app for taking Markdown notes, planning tasks, and tracking habits. One codebase, 8 distribution channels. This is everything I had to figure out to ship it.</p><p>The previous articles covered <a href="https://dev.to/jinjinov/how-i-use-the-same-blazor-code-for-wasm-windows-linux-macos-ios-android-without-a-single-if-2bjk">why there are so many entry points</a> and how the shared Blazor component library stays platform-agnostic. This article is about what happens after you write the code — the files you need, the gotchas that aren’t documented anywhere, and what you have to do on every release.</p><h3>Why 8 channels?</h3><p>Each distribution channel has different requirements that forced a separate entry point:</p><ul><li><strong>Microsoft Store</strong> — MAUI (net9.0-windows)</li><li><strong>Google Play</strong> — MAUI (net9.0-android)</li><li><strong>Apple App Store</strong> — MAUI (net9.0-ios)</li><li><strong>Mac App Store</strong> — MAUI (net9.0-maccatalyst)</li><li><strong>Flatpak (Flathub)</strong> — Photino — MAUI has no Linux target</li><li><strong>Snap Store</strong> — Photino</li><li><strong>Docker Hub + GitHub Container Registry</strong> — Blazor Server</li><li><strong>ClickOnce (Windows direct download)</strong> — WPF — for users who don’t want the Store</li><li><strong>PWA</strong> — Blazor WASM</li></ul><h3>Before your first release (all platforms)</h3><p>The boring but mandatory stuff — brief because it’s all googleable:</p><ul><li>Register as a developer on each platform (<a href="https://partner.microsoft.com/en-us/dashboard">Microsoft Partner Center</a> $19 one-time, <a href="https://play.google.com/console/">Google Play Console</a> $25 one-time, <a href="https://developer.apple.com/programs/">Apple Developer Program</a> $99/year, <a href="https://snapcraft.io/account">Snap Store</a> free, <a href="https://flathub.org/">Flathub</a> free, <a href="https://hub.docker.com/">Docker Hub</a> free)</li><li>Create your app listing on each store with descriptions, screenshots, privacy policy URL</li><li>For Apple: create App IDs, provisioning profiles, and distribution certificates in Apple Developer portal</li><li>For Google: create a keystore and keep it safe — you can never change it after the first upload</li><li>For Microsoft Store: associate your app in Visual Studio to get the publisher identity values</li></ul><h3>Version numbers — the cross-cutting problem</h3><p>Before going platform by platform, the version number problem deserves its own section because it’s spread across more files than you’d expect, and one of them has a non-obvious constraint.</p><p>Files that contain the version number:</p><ul><li>OpenHabitTracker.Blazor.Maui/OpenHabitTracker.Blazor.Maui.csproj - two separate fields</li><li>Platforms/Windows/Package.appxmanifest</li><li>net.openhabittracker.OpenHabitTracker.yaml</li><li>net.openhabittracker.OpenHabitTracker.metainfo.xml</li><li>snapcraft.yaml</li><li>ClickOnceProfile.pubxml</li><li>FolderProfile.pubxml (WASM)</li><li>VersionHistory.md</li></ul><p>The MAUI .csproj has two separate version fields and they serve different purposes:</p><pre>&lt;ApplicationDisplayVersion&gt;1.2.1&lt;/ApplicationDisplayVersion&gt;<br>&lt;ApplicationVersion&gt;21&lt;/ApplicationVersion&gt;</pre><p>ApplicationDisplayVersion is the human-readable string shown to users. ApplicationVersion is an integer - Android requires it, it must strictly increment on every release, and it cannot be the version string. If you try to use &quot;1.2.1&quot; as the version code, the Android build fails with:</p><pre>error XA0003: VersionCode 1.2.1 is invalid. It must be an integer value.</pre><p>So you maintain a separate integer counter alongside your version string. Every release you bump both.</p><h3>Microsoft Store (MAUI Windows)</h3><p><strong>First time:</strong> Register at Partner Center, pay the one-time fee, create the app reservation, associate the app in Visual Studio (this fills in the publisher identity values), create an MSIX package. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/overview">MAUI Windows deployment docs</a>)</p><p><strong>Special file: </strong><strong>Platforms/Windows/Package.appxmanifest</strong> (<a href="https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/schema-root">schema reference</a>)</p><pre>&lt;Identity<br>  Name=&quot;31456Jinjinov.578313437ADBB&quot;<br>  Publisher=&quot;CN=63F779A2-C88E-4913-81F0-5E6786C4CD1A&quot;<br>  Version=&quot;1.2.1.0&quot; /&gt;</pre><pre>&lt;Capabilities&gt;<br>  &lt;rescap:Capability Name=&quot;runFullTrust&quot; /&gt;<br>  &lt;Capability Name=&quot;internetClient&quot;/&gt;<br>&lt;/Capabilities&gt;</pre><p>The Name and Publisher values come from Partner Center when you associate your app. You can&#39;t make them up - they must match exactly what the Store has on record or the upload will be rejected.</p><p>runFullTrust is required for MAUI apps because they run as regular Win32 processes, not sandboxed UWP apps.</p><p><strong>Every release:</strong> Bump Version in Package.appxmanifest, publish:</p><pre>dotnet publish OpenHabitTracker.Blazor.Maui.csproj -c:Release -f:net9.0-windows10.0.19041.0 -p:SelfContained=true -p:PublishAppxPackage=true</pre><p>Upload the .msixupload to Partner Center.</p><h3>Google Play (MAUI Android)</h3><p><strong>First time:</strong> Register at Play Console, pay the one-time fee, create the app, set up the keystore, configure release signing. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/android/deployment/publish-google-play">MAUI Android Google Play docs</a>)</p><p>You can test on an Android emulator before building a release:</p><pre>dotnet build -t:Run -f:net9.0-android</pre><p><strong>Special file: </strong><strong>Platforms/Android/AndroidManifest.xml</strong></p><pre>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;<br>    &lt;application android:allowBackup=&quot;true&quot; android:icon=&quot;@mipmap/appicon&quot; android:roundIcon=&quot;@mipmap/appicon_round&quot; android:supportsRtl=&quot;true&quot;&gt;&lt;/application&gt;<br>    &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;<br>    &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;<br>&lt;/manifest&gt;</pre><p>This file looks minimal, but every permission your app needs must be declared here. Missing a permission and the feature silently fails at runtime. Adding a permission you don’t need can cause Play Store review rejections. (<a href="https://developer.android.com/reference/android/Manifest.permission">Android permission reference</a>)</p><p><strong>Every release:</strong> Bump ApplicationDisplayVersion and ApplicationVersion (the integer) in .csproj, publish:</p><pre>dotnet publish -c Release -f:net9.0-android ...</pre><p>Upload the .aab to Play Console. The integer ApplicationVersion must be higher than the previous release or the upload is rejected.</p><h3>Apple App Store (MAUI iOS)</h3><p><strong>First time:</strong> Apple Developer Program ($99/year, covers all Apple platforms), create an App ID, create a distribution certificate, create a provisioning profile, install both on your Mac. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-app-store">MAUI iOS App Store docs</a>, <a href="https://learn.microsoft.com/en-us/dotnet/maui/ios/device-provisioning/manual-provisioning">manual provisioning guide</a>)</p><p>Apple requires screenshots at exact pixel dimensions or the submission is rejected. Required sizes:</p><ul><li>iPhone 6.7&quot;: 1290x2796 or 2796x1290</li><li>iPhone 6.5&quot;: 1242x2688 or 1284x2778</li><li>iPhone 5.5&quot;: 1242x2208 or 2208x1242</li><li>iPad 12.9&quot; (2nd gen): 2048x2732 or 2732x2048</li><li>iPad 13&quot;: 2064x2752 or 2048x2732</li></ul><p>You can test on the simulator before building a release:</p><pre>dotnet build OpenHabitTracker.Blazor.Maui.csproj -t:Run -c:Release -f:net9.0-ios</pre><p><strong>Special file: </strong><strong>Platforms/iOS/Info.plist</strong></p><pre>&lt;key&gt;CFBundleIdentifier&lt;/key&gt;<br>&lt;string&gt;net.openhabittracker&lt;/string&gt;<br>&lt;key&gt;CFBundleDisplayName&lt;/key&gt;<br>&lt;string&gt;OpenHT&lt;/string&gt;<br>&lt;key&gt;ITSAppUsesNonExemptEncryption&lt;/key&gt;<br>&lt;false/&gt;<br>&lt;key&gt;UIDeviceFamily&lt;/key&gt;<br>&lt;array&gt;<br>    &lt;integer&gt;1&lt;/integer&gt;  &lt;!-- iPhone --&gt;<br>    &lt;integer&gt;2&lt;/integer&gt;  &lt;!-- iPad --&gt;<br>&lt;/array&gt;</pre><p><a href="https://developer.apple.com/documentation/bundleresources/information-property-list/itsappusesnonexemptencryption">ITSAppUsesNonExemptEncryption</a> is the one that catches everyone. If you omit it, Apple holds your submission and asks you to answer export compliance questions every single time you submit. Set it to false if your app doesn&#39;t use encryption beyond standard HTTPS (which is exempt). (<a href="https://learn.microsoft.com/en-us/dotnet/maui/macios/info-plist">MAUI Info.plist docs</a>)</p><p>The signing config lives in the .csproj in a conditional PropertyGroup, not just in the publish command. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/ios/deployment/publish-cli">MAUI iOS publish CLI docs</a>)</p><pre>&lt;PropertyGroup Condition=&quot;$(TargetFramework.Contains(&#39;-ios&#39;)) and &#39;$(Configuration)&#39; == &#39;Release&#39;&quot;&gt;<br>    &lt;RuntimeIdentifier&gt;ios-arm64&lt;/RuntimeIdentifier&gt;<br>    &lt;CodesignKey&gt;Apple Distribution: Your Name (53V66WG4KU)&lt;/CodesignKey&gt;<br>    &lt;CodesignProvision&gt;openhabittracker.ios&lt;/CodesignProvision&gt;<br>&lt;/PropertyGroup&gt;</pre><p><strong>Every release:</strong> Publish, upload .ipa via Transporter or Xcode.</p><pre>dotnet publish OpenHabitTracker.Blazor.Maui.csproj -c:Release -f:net9.0-ios -p:ArchiveOnBuild=true -p:RuntimeIdentifier=ios-arm64 -p:CodesignKey=&quot;Apple Distribution: Your Name (53V66WG4KU)&quot; -p:CodesignProvision=&quot;openhabittracker.ios&quot;</pre><h3>Mac App Store (MAUI macOS)</h3><p><strong>First time:</strong> Same Apple Developer account, but separate Mac-specific provisioning profile and a second certificate type for the installer package. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/mac-catalyst/deployment/publish-app-store">MAUI macOS App Store docs</a>, <a href="https://learn.microsoft.com/en-us/dotnet/maui/ios/device-provisioning/manual-provisioning">manual provisioning guide</a>)</p><p>Required screenshot sizes for Mac App Store: 1280x800, 1440x900, 2560x1600, 2880x1800.</p><p>You can test locally before building a release:</p><pre>dotnet build OpenHabitTracker.Blazor.Maui.csproj -t:Run -c:Release -f:net9.0-maccatalyst</pre><p><strong>Special file: </strong><strong>Platforms/MacCatalyst/Info.plist</strong></p><pre>&lt;key&gt;CFBundleIdentifier&lt;/key&gt;<br>&lt;string&gt;net.openhabittracker&lt;/string&gt;<br>&lt;key&gt;LSApplicationCategoryType&lt;/key&gt;<br>&lt;string&gt;public.app-category.productivity&lt;/string&gt;<br>&lt;key&gt;NSHumanReadableCopyright&lt;/key&gt;<br>&lt;string&gt;© 2026 Jinjinov&lt;/string&gt;<br>&lt;key&gt;ITSAppUsesNonExemptEncryption&lt;/key&gt;<br>&lt;false/&gt;</pre><p>Same ITSAppUsesNonExemptEncryption caveat as iOS. Also <a href="https://developer.apple.com/documentation/bundleresources/information-property-list/lsapplicationcategorytype">LSApplicationCategoryType</a> - the Mac App Store requires a category, the App Store will reject submission without it. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/macios/info-plist">MAUI Info.plist docs</a>)</p><p><strong>Special file: </strong><strong>Platforms/MacCatalyst/Entitlements.plist</strong></p><pre>&lt;dict&gt;<br>    &lt;key&gt;com.apple.security.app-sandbox&lt;/key&gt;<br>    &lt;true/&gt;<br>    &lt;key&gt;com.apple.security.network.client&lt;/key&gt;<br>    &lt;true/&gt;<br>&lt;/dict&gt;</pre><p><a href="https://developer.apple.com/documentation/xcode/configuring-the-macos-app-sandbox">App Sandbox</a> is mandatory for Mac App Store distribution. Without it, Apple rejects the submission outright. With it, you must explicitly declare every capability your app needs — in this case network.client for outgoing connections. Miss one and the feature fails silently inside the sandbox. (<a href="https://learn.microsoft.com/en-us/dotnet/maui/mac-catalyst/entitlements">MAUI macOS entitlements docs</a>)</p><p>The macOS signing config in .csproj requires three separate keys (<a href="https://learn.microsoft.com/en-us/dotnet/maui/mac-catalyst/deployment/publish-app-store">MAUI macOS publish CLI docs</a>):</p><pre>&lt;PropertyGroup Condition=&quot;$(TargetFramework.Contains(&#39;-maccatalyst&#39;)) and &#39;$(Configuration)&#39; == &#39;Release&#39;&quot;&gt;<br>    &lt;CodesignKey&gt;Apple Distribution: Your Name (53V66WG4KU)&lt;/CodesignKey&gt;<br>    &lt;CodesignProvision&gt;openhabittracker.macos&lt;/CodesignProvision&gt;<br>    &lt;CodesignEntitlements&gt;Platforms\MacCatalyst\Entitlements.plist&lt;/CodesignEntitlements&gt;<br>    &lt;PackageSigningKey&gt;3rd Party Mac Developer Installer: Your Name (53V66WG4KU)&lt;/PackageSigningKey&gt;<br>    &lt;EnableCodeSigning&gt;True&lt;/EnableCodeSigning&gt;<br>    &lt;EnablePackageSigning&gt;true&lt;/EnablePackageSigning&gt;<br>    &lt;CreatePackage&gt;true&lt;/CreatePackage&gt;<br>    &lt;MtouchLink&gt;SdkOnly&lt;/MtouchLink&gt;<br>&lt;/PropertyGroup&gt;</pre><p>Three different certificate types are involved: Apple Distribution (signs the app bundle), 3rd Party Mac Developer Installer (signs the .pkg installer). The certificate names include your team ID in parentheses - they come from Keychain after you install the certificates from Apple Developer portal.</p><p><strong>Every release:</strong></p><pre>dotnet publish OpenHabitTracker.Blazor.Maui.csproj -c:Release -f:net9.0-maccatalyst -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:EnablePackageSigning=true -p:CodesignKey=&quot;Apple Distribution: Your Name (53V66WG4KU)&quot; -p:CodesignProvision=&quot;openhabittracker.macos&quot; -p:CodesignEntitlements=&quot;Platforms\MacCatalyst\Entitlements.plist&quot; -p:PackageSigningKey=&quot;3rd Party Mac Developer Installer: Your Name (53V66WG4KU)&quot;</pre><p>Upload .pkg via Transporter.</p><h3>Flatpak / Flathub (Photino, Linux)</h3><p>This is the most involved distribution channel. Flatpak builds happen in a network-isolated sandbox — no internet access during build. Every dependency must be pre-declared.</p><p>Photino depends on WebKit. On a fresh Linux machine you need this before the app will run at all:</p><pre>sudo apt-get install libwebkit2gtk-4.1</pre><p><strong>First time:</strong> Apply to Flathub, fork their template repo, set up the app manifest, pass the linter, get reviewed. (<a href="https://docs.flathub.org/docs/for-app-authors/submission">Flathub submission guide</a>) Flathub creates a separate GitHub repository for your app’s manifest at github.com/flathub/net.openhabittracker.OpenHabitTracker. You maintain a fork at github.com/Jinjinov/net.openhabittracker.OpenHabitTracker.</p><p><strong>Special file: </strong><strong>net.openhabittracker.OpenHabitTracker.yaml</strong></p><p>The Flatpak build manifest. It references your git repository by tag AND commit hash — both must match:</p><pre>- type: git<br>  url: https://github.com/Jinjinov/OpenHabitTracker.git<br>  tag: 1.2.1<br>  commit: 233c4b8410756159e14f31dd7a4e3607efa53749</pre><p>It also handles cross-architecture builds through environment variables:</p><pre>build-options:<br>  arch:<br>    aarch64:<br>      env:<br>        RUNTIME: linux-arm64<br>    x86_64:<br>      env:<br>        RUNTIME: linux-x64<br>build-commands:<br>  - dotnet publish OpenHabitTracker.Blazor.Photino/... -r $RUNTIME ...</pre><p><strong>Special file: </strong><strong>net.openhabittracker.OpenHabitTracker.metainfo.xml</strong></p><p>Flathub validates this file with a linter before merging the PR. It must pass appstream-util validate and flatpak-builder-lint. It contains the app description, release history, and screenshot URLs. A release entry must be added for every version. (<a href="https://freedesktop.org/software/appstream/docs/">AppStream spec</a>)</p><p><strong>Special file: </strong><strong>net.openhabittracker.OpenHabitTracker.desktop</strong></p><pre>[Desktop Entry]<br>Name=OpenHabitTracker<br>Comment=Take notes, plan tasks, track habits<br>Exec=OpenHT<br>Icon=net.openhabittracker.OpenHabitTracker<br>Type=Application<br>Categories=Office;</pre><p>This is the Linux standard for app launchers — how your app appears in GNOME, KDE, etc. The Icon value must match the SVG filename (without extension).</p><p><strong>Special file: </strong><strong>net.openhabittracker.OpenHabitTracker.svg</strong></p><p>Flathub requires an SVG icon, not PNG. This must use the reverse-domain naming convention that matches your app ID.</p><p><strong>Special file: </strong><strong>nuget-sources.json</strong></p><p>The most unique file in the whole project. Because Flatpak builds in a network-isolated sandbox, it cannot download NuGet packages at build time. Every package — including all transitive dependencies — must be pre-declared with its download URL and SHA-512 hash. This file is generated by flatpak-dotnet-generator.py:</p><pre>python3 flatpak-dotnet-generator.py --dotnet 9 --freedesktop 25.08 nuget-sources.json OpenHabitTracker/OpenHabitTracker.Blazor.Photino/OpenHabitTracker.Blazor.Photino.csproj</pre><p>The yaml then references it as an offline source:</p><pre>sources:<br>  - type: git<br>    url: https://github.com/Jinjinov/OpenHabitTracker.git<br>    tag: 1.2.1<br>    commit: 233c4b8410756159e14f31dd7a4e3607efa53749<br>  - ./nuget-sources.json<br>build-commands:<br>  - dotnet publish ... --source ./nuget-sources --source /usr/lib/sdk/dotnet9/nuget/packages</pre><p>nuget-sources.json doesn&#39;t need to be regenerated every release - only when NuGet packages change.</p><p><strong>Every release:</strong></p><p>Before opening a PR, validate everything locally. The Flathub linter will catch these too, but it’s faster to fix them locally:</p><pre>desktop-file-validate net.openhabittracker.OpenHabitTracker.desktop<br>appstream-util validate net.openhabittracker.OpenHabitTracker.metainfo.xml<br>flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest net.openhabittracker.OpenHabitTracker.yaml</pre><p>Do a full local build and run to confirm it works:</p><pre>flatpak-builder build-dir --user --force-clean --install --repo=repo net.openhabittracker.OpenHabitTracker.yaml<br>flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo<br>flatpak run net.openhabittracker.OpenHabitTracker</pre><p>Then submit:</p><ol><li>Create a git tag</li><li>Get the commit hash: git ls-remote https://github.com/Jinjinov/OpenHabitTracker.git refs/tags/1.2.1</li><li>Update tag and commit in net.openhabittracker.OpenHabitTracker.yaml</li><li>Add a release entry to net.openhabittracker.OpenHabitTracker.metainfo.xml</li><li>Push to your fork (Jinjinov/net.openhabittracker.OpenHabitTracker)</li><li>Open a PR to flathub/net.openhabittracker.OpenHabitTracker</li><li>The Flathub bot builds and tests it — wait for ✅ Test build succeeded</li><li>If the test build fails: push a fix, update the tag and commit in the yaml, then comment in the PR: bot, build net.openhabittracker.OpenHabitTracker</li><li>Merge the PR</li><li>Sync your fork back from the upstream flathub repo so it stays up to date</li></ol><h3>Snap Store (Photino, Linux)</h3><p><strong>First time:</strong> Register at snapcraft.io, register the app name, install Snapcraft and LXD. Snapcraft uses LXD to build in an isolated container — you can’t build snaps without it:</p><pre>sudo snap install snapcraft --classic<br>sudo snap install lxd<br>sudo lxd init --auto<br>sudo usermod -aG lxd $USER<br>newgrp lxd</pre><p><strong>Special file: </strong><strong>snapcraft.yaml</strong> (<a href="https://snapcraft.io/docs/snapcraft-yaml-reference">snapcraft.yaml reference</a>)</p><pre>name: openhabittracker<br>base: core24<br>confinement: strict<br>version: &#39;1.2.1&#39;</pre><pre>parts:<br>  openhabittracker:<br>    source: .<br>    plugin: dotnet<br>    dotnet-version: &quot;9.0&quot;<br>    override-build: |<br>      dotnet publish OpenHabitTracker.Blazor.Photino/OpenHabitTracker.Blazor.Photino.csproj -c Release -f net9.0 -r linux-x64 -p:PublishSingleFile=true -p:SelfContained=true -o $SNAPCRAFT_PART_INSTALL<br>      chmod 0755 $SNAPCRAFT_PART_INSTALL/OpenHT</pre><pre>apps:<br>  openhabittracker:<br>    extensions: [gnome]<br>    command: OpenHT<br>    plugs:<br>      - hardware-observe<br>      - home<br>      - removable-media<br>      - network</pre><p>plugs are the snap equivalent of Android permissions - they declare what the app can access. (<a href="https://snapcraft.io/docs/reference/interfaces/">Snap interfaces reference</a>) extensions: [gnome] pulls in GNOME libraries and is required for GTK-based apps (Photino uses WebKit which is part of the GNOME stack).</p><p>confinement: strict means the snap is fully sandboxed. During development you use confinement: devmode and then switch to strict for release.</p><p><strong>Every release:</strong></p><pre>snapcraft pack --debug</pre><p>If the pack fails, clean the build cache and retry:</p><pre>snapcraft clean openhabittracker<br>snapcraft pack --debug</pre><p>Test locally before uploading:</p><pre>sudo snap install openhabittracker_1.2.1_amd64.snap --dangerous --devmode<br>snap run openhabittracker</pre><p>Upload and verify:</p><pre>snapcraft login<br>snapcraft upload --release=stable openhabittracker_1.2.1_amd64.snap<br>snapcraft status openhabittracker</pre><h3>Docker Hub + GitHub Container Registry (Blazor Server)</h3><p><strong>First time:</strong> Docker Hub account, GitHub account (for GHCR), set up the Dockerfile, test the image locally. Authenticate to both registries before pushing:</p><pre>docker login</pre><pre>echo &lt;GitHubToken&gt; | docker login ghcr.io -u YourUsername --password-stdin</pre><p>The GitHub token needs write:packages scope. Generate it at GitHub → Settings → Developer settings → Personal access tokens.</p><p><strong>Special file: </strong><strong>Dockerfile</strong></p><p>Multi-stage build — SDK image to compile, ASP.NET runtime image to run. (<a href="https://docs.docker.com/build/building/multi-stage/">Docker multi-stage build docs</a>)</p><pre>FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build<br>WORKDIR /src</pre><pre>COPY [&quot;OpenHabitTracker/OpenHabitTracker.csproj&quot;, &quot;OpenHabitTracker/&quot;]<br>COPY [&quot;OpenHabitTracker.Blazor.Web/OpenHabitTracker.Blazor.Web.csproj&quot;, &quot;OpenHabitTracker.Blazor.Web/&quot;]<br># ... other projects<br>RUN dotnet restore &quot;OpenHabitTracker.Blazor.Web/OpenHabitTracker.Blazor.Web.csproj&quot;</pre><pre>COPY . .<br>RUN dotnet publish &quot;OpenHabitTracker.Blazor.Web.csproj&quot; -c Release -o /app/publish</pre><pre>FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime<br>WORKDIR /app<br>COPY --from=build /app/publish .<br>ENTRYPOINT [&quot;dotnet&quot;, &quot;OpenHT.dll&quot;]</pre><p>Only copying .csproj files first and running dotnet restore before copying the rest is intentional - it lets Docker cache the NuGet restore layer so rebuilds are fast when only source files change.</p><p><strong>Special file: </strong><strong>docker-compose.yml</strong></p><p>This ships to end users, not just for building. Users run docker compose up with this file. It maps environment variables to appsettings.json values so users can set their credentials without modifying the image:</p><pre>services:<br>  openhabittracker:<br>    image: jinjinov/openhabittracker:latest<br>    ports:<br>      - &quot;5000:8080&quot;<br>    environment:<br>      - AppSettings__UserName=${APPSETTINGS_USERNAME}<br>      - AppSettings__Email=${APPSETTINGS_EMAIL}<br>      - AppSettings__Password=${APPSETTINGS_PASSWORD}<br>      - AppSettings__JwtSecret=${APPSETTINGS_JWT_SECRET}<br>    volumes:<br>      - ./.OpenHabitTracker:/app/.OpenHabitTracker</pre><p><strong>Every release:</strong></p><pre>docker compose build<br>docker tag openhabittracker jinjinov/openhabittracker:1.2.1<br>docker push jinjinov/openhabittracker:1.2.1<br>docker tag openhabittracker jinjinov/openhabittracker:latest<br>docker push jinjinov/openhabittracker:latest</pre><pre>docker tag openhabittracker ghcr.io/jinjinov/openhabittracker:1.2.1<br>docker push ghcr.io/jinjinov/openhabittracker:1.2.1<br>docker tag openhabittracker ghcr.io/jinjinov/openhabittracker:latest<br>docker push ghcr.io/jinjinov/openhabittracker:latest</pre><p>(<a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry">GitHub Container Registry docs</a>)</p><h3>WPF + ClickOnce (Windows direct download)</h3><p>ClickOnce is for users who want a classical Windows installer experience without going through the Microsoft Store.</p><p><strong>First time:</strong> Configure publish settings in Visual Studio, set up the bootstrapper. (<a href="https://learn.microsoft.com/en-us/visualstudio/deployment/clickonce-security-and-deployment">ClickOnce deployment docs</a>)</p><p><strong>Special file: </strong><strong>Properties/PublishProfiles/ClickOnceProfile.pubxml</strong></p><pre>&lt;ApplicationVersion&gt;1.2.1.0&lt;/ApplicationVersion&gt;<br>&lt;PublishProtocol&gt;ClickOnce&lt;/PublishProtocol&gt;<br>&lt;RuntimeIdentifier&gt;win-x86&lt;/RuntimeIdentifier&gt;<br>&lt;SelfContained&gt;False&lt;/SelfContained&gt;<br>&lt;BootstrapperPackage Include=&quot;Microsoft.NetCore.DesktopRuntime.9.0.x86&quot;&gt;<br>    &lt;Install&gt;true&lt;/Install&gt;<br>    &lt;ProductName&gt;.NET Desktop Runtime 9.0.0 (x86)&lt;/ProductName&gt;<br>&lt;/BootstrapperPackage&gt;</pre><p>SelfContained=False + the bootstrapper means the installer checks for .NET Desktop Runtime and downloads it if missing. This keeps the installer small.</p><p><strong>Every release:</strong> Bump ApplicationVersion, publish via Visual Studio ClickOnce, zip the output, FTP upload to the download server.</p><h3>WASM / PWA (Blazor WebAssembly)</h3><p><strong>First time:</strong> Set up IIS with the URL Rewrite module (required for SPA routing — without it, any direct URL that isn’t the root returns 404). (<a href="https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly/iis">Blazor WASM IIS hosting docs</a>)</p><p><strong>Special file: </strong><strong>wwwroot/manifest.json</strong> (<a href="https://www.w3.org/TR/appmanifest/">web app manifest spec</a>)</p><pre>{<br>  &quot;name&quot;: &quot;OpenHabitTracker&quot;,<br>  &quot;short_name&quot;: &quot;OpenHT&quot;,<br>  &quot;id&quot;: &quot;./&quot;,<br>  &quot;start_url&quot;: &quot;./&quot;,<br>  &quot;display&quot;: &quot;standalone&quot;,<br>  &quot;background_color&quot;: &quot;#808080&quot;,<br>  &quot;theme_color&quot;: &quot;#808080&quot;,<br>  &quot;icons&quot;: [<br>    { &quot;src&quot;: &quot;/icons/icon-512.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;512x512&quot; },<br>    { &quot;src&quot;: &quot;/icons/icon-192.png&quot;, &quot;type&quot;: &quot;image/png&quot;, &quot;sizes&quot;: &quot;192x192&quot; }<br>  ]<br>}</pre><p>This makes the app installable as a PWA. display: standalone hides the browser chrome. Without the 512px icon, Chrome won&#39;t offer the install prompt.</p><p><strong>Special file: </strong><strong>wwwroot/service-worker.published.js</strong></p><p>The dev version (service-worker.js) is a stub that always fetches from the network. The published version caches all .dll, .wasm, .js, .css, and asset files on first install for offline support. (<a href="https://learn.microsoft.com/en-us/aspnet/core/blazor/progressive-web-app/">Blazor PWA docs</a>)</p><pre>const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/ ];</pre><p><strong>Special file: </strong><strong>Properties/PublishProfiles/FolderProfile.pubxml</strong></p><pre>&lt;PublishUrl&gt;C:\inetpub\wwwroot&lt;/PublishUrl&gt;<br>&lt;DeleteExistingFiles&gt;false&lt;/DeleteExistingFiles&gt; &lt;!-- NEVER SET IT TO true! IT WILL DELETE C:\inetpub\wwwroot FOLDER! --&gt;</pre><p>The danger comment is real. DeleteExistingFiles=true in a publish profile pointed at C:\inetpub\wwwroot will delete the entire folder and everything in it before copying the published output.</p><p><strong>Every release:</strong> Publish to folder (directly to C:\inetpub\wwwroot), then FTP upload to the server.</p><h3>The result</h3><p>8 channels, roughly 15 special files, one codebase. The most time-consuming part on every release is keeping the version number consistent across all these files. The most time-consuming part on the first release is Apple — not because it’s hard once you understand it, but because the documentation is scattered and the error messages are unhelpful.</p><p>Flatpak is the most technically interesting because of the offline build sandbox and the nuget-sources.json workflow. Flatpak has good official documentation for .NET at <a href="https://docs.flatpak.org/en/latest/dotnet.html">docs.flatpak.org/en/latest/dotnet.html</a> - but it still took me a while to put all the pieces together for a real app with many dependencies.</p><p><a href="https://github.com/Jinjinov/OpenHabitTracker">OpenHabitTracker is open source</a> — all the files shown here are in the repo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=970f015e4d16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I use the same Blazor code for WASM, Windows, Linux, macOS, iOS, Android without a single #if]]></title>
            <link>https://medium.com/@jinjinov/how-i-use-the-same-blazor-code-for-wasm-windows-linux-macos-ios-android-without-a-single-if-0432962ac4c2?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/0432962ac4c2</guid>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[blazor]]></category>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 09:01:32 GMT</pubDate>
            <atom:updated>2026-03-29T09:01:32.968Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://openhabittracker.net/">OpenHabitTracker</a> is a free, open source app for taking Markdown notes, planning tasks, and tracking habits. It runs on Windows, Linux, macOS, iOS, Android, and as a web app — all from a single shared Razor component library. This article explains how.</p><p>In a <a href="https://dev.to/jinjinov/how-to-create-a-blazor-app-for-wasm-windows-linux-macos-ios-android-1fh5">previous article</a> I covered the architecture but skipped the actual code. This is the code.</p><h3>Why so many entry points?</h3><p>Each store or distribution method has its own requirements:</p><ul><li><strong>MAUI</strong> -&gt; Microsoft Store, Google Play, App Store, Mac App Store</li><li><strong>Blazor WASM</strong> -&gt; web / PWA</li><li><strong>Blazor Server</strong> -&gt; Docker self-hosting</li><li><strong>Photino</strong> -&gt; Linux (Flatpak, Snap) — MAUI simply has no Linux target</li><li><strong>WPF + ClickOnce</strong> -&gt; Windows direct download, classical installer experience outside the Store</li></ul><p>The entry points exist because the distribution channels demanded them.</p><p>Once you accept that you need six entry points, the question becomes: how do you stop the shared component library from knowing about any of them?</p><h3>The pattern</h3><p>Every platform difference is hidden behind an interface. The shared OpenHabitTracker.Blazor library defines the interface and a default (usually no-op) implementation. Each entry point registers its own implementation via DI. The shared library consumes the interface and never knows which platform it&#39;s running on.</p><p>There is not a single #if in OpenHabitTracker.Blazor.</p><p>Let’s go through each interface.</p><h3>IOpenFile / ISaveFile</h3><p>File picking is the most dramatic example. In a browser, you cannot open a native file dialog programmatically — the user must click a file input element. In every other platform, you call the OS dialog directly.</p><p>The interface:</p><pre>public interface IOpenFile<br>{<br>    RenderFragment OpenFileDialog(string css, string content, Func&lt;string, Stream, Task&gt; onFileOpened);<br>}</pre><p>It returns a RenderFragment - the implementation decides what HTML to render and how to wire the file picker. The component consuming it just renders whatever comes back.</p><p><strong>WASM</strong> — must use a hidden &lt;InputFile&gt; wrapped in a &lt;label&gt;:</p><pre>public class OpenFile : IOpenFile<br>{<br>    const long _maxAllowedFileSize = 50 * 1024 * 1024;</pre><pre>    public RenderFragment OpenFileDialog(string css, string content, Func&lt;string, Stream, Task&gt; onFileOpened)<br>    {<br>        return builder =&gt;<br>        {<br>            builder.OpenElement(0, &quot;label&quot;);<br>            builder.AddAttribute(1, &quot;class&quot;, css);<br>            builder.OpenElement(2, &quot;i&quot;);<br>            builder.AddAttribute(3, &quot;class&quot;, &quot;bi bi-box-arrow-in-right&quot;);<br>            builder.CloseElement();<br>            builder.AddContent(4, &quot; &quot;);<br>            builder.AddContent(5, content);</pre><pre>            builder.OpenComponent&lt;InputFile&gt;(6);<br>            builder.AddAttribute(7, &quot;class&quot;, &quot;d-none&quot;);<br>            builder.AddAttribute(8, &quot;OnChange&quot;, EventCallback.Factory.Create(this, async (InputFileChangeEventArgs args) =&gt;<br>            {<br>                Stream stream = args.File.OpenReadStream(maxAllowedSize: _maxAllowedFileSize);<br>                await onFileOpened(args.File.Name, stream);<br>            }));<br>            builder.CloseComponent();</pre><pre>            builder.CloseElement();<br>        };<br>    }<br>}</pre><p><strong>WinForms</strong> — a &lt;button&gt; that opens System.Windows.Forms.OpenFileDialog:</p><pre>public class OpenFile : IOpenFile<br>{<br>    public RenderFragment OpenFileDialog(string css, string content, Func&lt;string, Stream, Task&gt; onFileOpened)<br>    {<br>        return builder =&gt;<br>        {<br>            builder.OpenElement(0, &quot;button&quot;);<br>            builder.AddAttribute(1, &quot;class&quot;, css);<br>            builder.AddAttribute(2, &quot;onclick&quot;, EventCallback.Factory.Create(this, async () =&gt;<br>            {<br>                OpenFileDialog openFileDialog = new()<br>                {<br>                    Filter = &quot;JSON|*.json|TSV|*.tsv|YAML|*.yaml|Markdown|*.md|Google Keep Takeout ZIP|*.zip&quot;<br>                };</pre><pre>                if (openFileDialog.ShowDialog() == DialogResult.OK)<br>                {<br>                    await onFileOpened(openFileDialog.FileName, openFileDialog.OpenFile());<br>                }<br>            }));<br>            builder.OpenElement(3, &quot;i&quot;);<br>            builder.AddAttribute(4, &quot;class&quot;, &quot;bi bi-box-arrow-in-right&quot;);<br>            builder.CloseElement();<br>            builder.AddContent(5, &quot; &quot;);<br>            builder.AddContent(6, content);<br>            builder.CloseElement();<br>        };<br>    }<br>}</pre><p><strong>MAUI</strong> — FilePicker.PickAsync():</p><pre>public class OpenFile : IOpenFile<br>{<br>    public RenderFragment OpenFileDialog(string css, string content, Func&lt;string, Stream, Task&gt; onFileOpened)<br>    {<br>        return builder =&gt;<br>        {<br>            builder.OpenElement(0, &quot;button&quot;);<br>            builder.AddAttribute(1, &quot;class&quot;, css);<br>            builder.AddAttribute(2, &quot;onclick&quot;, EventCallback.Factory.Create(this, async () =&gt;<br>            {<br>                FileResult? result = await FilePicker.PickAsync();</pre><pre>                if (result != null)<br>                {<br>                    Stream stream = await result.OpenReadAsync();<br>                    await onFileOpened(result.FileName, stream);<br>                }<br>            }));<br>            builder.OpenElement(3, &quot;i&quot;);<br>            builder.AddAttribute(4, &quot;class&quot;, &quot;bi bi-box-arrow-in-right&quot;);<br>            builder.CloseElement();<br>            builder.AddContent(5, &quot; &quot;);<br>            builder.AddContent(6, content);<br>            builder.CloseElement();<br>        };<br>    }<br>}</pre><p><strong>Photino</strong> — mainWindow.ShowOpenFile():</p><pre>public class OpenFile(PhotinoWindow mainWindow) : IOpenFile<br>{<br>    private readonly (string Name, string[] Extensions)[] _filters =<br>    [<br>        (&quot;JSON&quot;, [&quot;.json&quot;]),<br>        (&quot;TSV&quot;, [&quot;.tsv&quot;]),<br>        (&quot;YAML&quot;, [&quot;.yaml&quot;]),<br>        (&quot;Markdown&quot;, [&quot;.md&quot;]),<br>        (&quot;Google Keep Takeout ZIP&quot;, [&quot;.zip&quot;])<br>    ];</pre><pre>    public RenderFragment OpenFileDialog(string css, string content, Func&lt;string, Stream, Task&gt; onFileOpened)<br>    {<br>        return builder =&gt;<br>        {<br>            builder.OpenElement(0, &quot;button&quot;);<br>            builder.AddAttribute(1, &quot;class&quot;, css);<br>            builder.AddAttribute(2, &quot;onclick&quot;, EventCallback.Factory.Create(this, async () =&gt;<br>            {<br>                string[] paths = mainWindow.ShowOpenFile(filters: _filters);</pre><pre>                if (paths.Length == 1)<br>                {<br>                    FileStream stream = File.OpenRead(paths[0]);<br>                    await onFileOpened(paths[0], stream);<br>                }<br>            }));<br>            builder.OpenElement(3, &quot;i&quot;);<br>            builder.AddAttribute(4, &quot;class&quot;, &quot;bi bi-box-arrow-in-right&quot;);<br>            builder.CloseElement();<br>            builder.AddContent(5, &quot; &quot;);<br>            builder.AddContent(6, content);<br>            builder.CloseElement();<br>        };<br>    }<br>}</pre><p>Four completely different implementations. One interface. The Backup page that renders the import button doesn’t know which it gets.</p><p>ISaveFile follows the same pattern: WASM triggers a JS download via SaveAsUTF8, WinForms/WPF use SaveFileDialog, MAUI uses CommunityToolkit.Maui&#39;s FileSaver, Photino uses mainWindow.ShowSaveFile().</p><h3>IAuthFragment — the null object pattern</h3><p>OpenHabitTracker supports optional sync with a self-hosted server. Native desktop and mobile apps (WinForms, WPF, Photino, MAUI) need a login UI to connect to it. WASM is already the web app. Blazor Server IS the server — it handles its own auth via ASP.NET Identity middleware, not through this interface.</p><p>So the null object default covers WASM and Blazor Server:</p><pre>public class AuthFragment : IAuthFragment<br>{<br>    public bool IsAuthAvailable =&gt; false;</pre><pre>    public Task&lt;bool&gt; TryRefreshTokenLogin() =&gt; Task.FromResult(false);</pre><pre>    public RenderFragment GetAuthFragment(bool stateChanged, EventCallback&lt;bool&gt; stateChangedChanged)<br>        =&gt; builder =&gt; { };<br>}</pre><p>The real implementation is registered on WinForms, WPF, Photino, and MAUI:</p><pre>public class AuthFragment(IAuthService authService) : IAuthFragment<br>{<br>    public bool IsAuthAvailable =&gt; true;</pre><pre>    public Task&lt;bool&gt; TryRefreshTokenLogin() =&gt; authService.TryRefreshTokenLogin();</pre><pre>    public RenderFragment GetAuthFragment(bool stateChanged, EventCallback&lt;bool&gt; stateChangedChanged)<br>    {<br>        return builder =&gt;<br>        {<br>            builder.OpenComponent&lt;LoginComponent&gt;(0);<br>            builder.AddAttribute(1, &quot;StateChanged&quot;, stateChanged);<br>            builder.AddAttribute(2, &quot;StateChangedChanged&quot;, stateChangedChanged);<br>            builder.CloseComponent();<br>        };<br>    }<br>}</pre><p>The settings page checks IsAuthAvailable and conditionally renders the sync section. No #if, no platform checks - just a boolean on an injected interface.</p><h3>IPreRenderService — one line that solves SSR</h3><p>Blazor Server pre-renders pages on the server before the WebSocket connection is established. During that phase, calling JS interop throws an exception. The fix:</p><pre>public interface IPreRenderService<br>{<br>    bool IsPreRendering { get; }<br>}</pre><p>Default (all non-server platforms):</p><pre>public class PreRenderService : IPreRenderService<br>{<br>    public bool IsPreRendering =&gt; false;<br>}</pre><p>Blazor Server:</p><pre>public class PreRenderService(IHttpContextAccessor httpContextAccessor) : IPreRenderService<br>{<br>    public bool IsPreRendering { get; } =<br>        !(httpContextAccessor.HttpContext?.Response.HasStarted == true);<br>}</pre><p>One property. One line. The rest of the shared library guards JS calls with if (!preRenderService.IsPreRendering) and works correctly on all platforms.</p><h3>ILinkAttributeService — a Photino-only problem</h3><p>Photino runs Blazor inside an embedded WebView. When a user clicks an external link in a Markdown note, the WebView tries to navigate itself instead of opening the system browser. The fix is a JS call that adds a custom onclick handler to all external links.</p><p>Default (everyone else — no-op):</p><pre>public class LinkAttributeService : ILinkAttributeService<br>{<br>    public Task AddAttributesToLinks(ElementReference elementReference)<br>        =&gt; Task.CompletedTask;<br>}</pre><p>Photino only:</p><pre>public class LinkAttributeService(IJSRuntime jsRuntime) : ILinkAttributeService<br>{<br>    public async Task AddAttributesToLinks(ElementReference elementReference)<br>    {<br>        await jsRuntime.InvokeVoidAsync(&quot;addAttributeToLinks&quot;, elementReference);<br>    }<br>}</pre><p>When a user clicks an external link in a Markdown note, Photino’s WebView would navigate itself instead of opening the system browser. addAttributeToLinks finds all &lt;a href&gt; elements with http:// or https:// URLs and replaces their click behavior with an onclick that calls DotNet.invokeMethodAsync(&#39;OpenHT&#39;, &#39;OpenLink&#39;, url). That invokes the [JSInvokable] OpenLink method in Photino&#39;s Program.cs, which does Process.Start(new ProcessStartInfo(url) { UseShellExecute = true }).</p><p>The full chain: user clicks link → JS intercepts → .NET interop → system browser opens.</p><p>The shared library calls AddAttributesToLinks after every Markdown render. On every other platform, it does nothing.</p><h3>IAssemblyProvider — router wiring</h3><p>Blazor’s router needs to know which assemblies contain page components. This differs between entry points:</p><p>Default (desktop — pages only in the shared library):</p><pre>public class AssemblyProvider : IAssemblyProvider<br>{<br>    public Assembly AppAssembly { get; } = typeof(IAssemblyProvider).Assembly;<br>    public Assembly[] AdditionalAssemblies { get; } = [];<br>}</pre><p>WASM and Blazor Server (entry point assembly also contains pages):</p><pre>public class AssemblyProvider : IAssemblyProvider<br>{<br>    public Assembly AppAssembly { get; } = typeof(IAssemblyProvider).Assembly;<br>    public Assembly[] AdditionalAssemblies { get; } = [typeof(AssemblyProvider).Assembly];<br>}</pre><h3>IDataAccess — the deepest split</h3><p>The storage layer is where the platforms diverge most fundamentally. The interface covers the full CRUD surface for every entity type. Behind it are three completely different backends:</p><ul><li><strong>IndexedDB</strong> (WASM) — browser storage via DnetIndexedDb</li><li><strong>SQLite via EF Core</strong> (WinForms, WPF, Photino, MAUI, Blazor Server) — local database file</li><li><strong>HTTP API client</strong> (remote sync) — calls a self-hosted Blazor Server instance</li></ul><p>The Blazor Server entry point also needs ASP.NET Identity for JWT authentication, which means its user table has a different schema than the plain SQLite UserEntity. IUserEntity bridges this:</p><pre>public interface IUserEntity<br>{<br>    long Id { get; set; }<br>    string UserName { get; set; }<br>    string Email { get; set; }<br>    string PasswordHash { get; set; }<br>    DateTime LastChangeAt { get; set; }<br>}</pre><p>UserEntity implements it for SQLite. ApplicationUser (ASP.NET Identity) implements it for Blazor Server. The service layer works with IUserEntity and doesn&#39;t know which it gets.</p><h3>What the entry points look like</h3><p>Each Program.cs calls the same four shared registrations, then adds a few lines of platform-specific DI:</p><pre>// shared - every platform calls these four<br>builder.Services.AddServices();<br>builder.Services.AddDataAccess();<br>builder.Services.AddBackup();<br>builder.Services.AddBlazor();</pre><pre>// platform-specific - only these lines differ<br>builder.Services.AddScoped&lt;IOpenFile, OpenFile&gt;();<br>builder.Services.AddScoped&lt;ISaveFile, SaveFile&gt;();<br>builder.Services.AddScoped&lt;INavBarFragment, NavBarFragment&gt;();<br>builder.Services.AddScoped&lt;IAssemblyProvider, AssemblyProvider&gt;();<br>builder.Services.AddScoped&lt;ILinkAttributeService, LinkAttributeService&gt;();<br>builder.Services.AddScoped&lt;IPreRenderService, PreRenderService&gt;();<br>builder.Services.AddScoped&lt;IAuthFragment, AuthFragment&gt;();</pre><p>Every class name in the platform-specific block is a different type — same interface name, different namespace. That’s the entire surface area of platform divergence.</p><h3>The result</h3><p>The shared OpenHabitTracker.Blazor project - the one that contains all Razor components, pages, and layouts - has zero #if directives for platform differences. It consumes interfaces, renders RenderFragment values it receives, and checks boolean properties on injected services. It has no knowledge of IndexedDB, OpenFileDialog, FilePicker, Photino, or ASP.NET Identity.</p><p>This is my third rewrite of this app in Blazor. <a href="https://dev.to/jinjinov/what-led-me-to-creating-openhabittracker-and-lessons-learned-3p85">The first two taught me what not to do.</a> The third time, the architecture finally felt right.</p><p><a href="https://github.com/Jinjinov/OpenHabitTracker">OpenHabitTracker is open source</a> — all the code shown here is in production.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0432962ac4c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenHabitTracker is more user friendly now with better UI]]></title>
            <link>https://medium.com/@jinjinov/openhabittracker-is-more-user-friendly-now-with-better-ui-3eec22be7b06?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eec22be7b06</guid>
            <category><![CDATA[habit-tracking]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[productivity-tools]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Sat, 21 Mar 2026 21:44:31 GMT</pubDate>
            <atom:updated>2026-03-21T21:46:44.683Z</atom:updated>
            <content:encoded><![CDATA[<p>OpenHabitTracker is a free, open source app for taking Markdown notes, planning tasks, and tracking habits. No account required, no ads, no subscription — all your data stays on your device.</p><p>It runs on Windows, Linux, Android, iOS, macOS, and in the browser as a PWA.</p><h3>A cleaner, more configurable interface</h3><p>The app now lets you hide the fields you don’t use. Don’t care about priorities? Turn them off. Don’t use categories? Hide them. The settings are simple toggles and they make a real difference to how much visual noise you’re dealing with day to day.</p><p>Notes, tasks, and habits each have their own background color, so you can tell at a glance what type of item you’re looking at without reading the label.</p><p>There’s also a filter to hide completed tasks, which keeps the list focused on what’s still pending.</p><h3>Weekly summary</h3><p>Tasks and habits both have an optional stats panel showing your week at a glance — how many you completed, how much time you spent, and whether you’re keeping up with your habits or falling behind.</p><h3>Keyboard navigation</h3><p>The menu sidebar follows the ARIA menu pattern — arrow keys move between items, no mouse needed. The habit calendar supports the full ARIA grid pattern: arrow keys to move between days, Home and End for the start and end of a week, Page Up and Page Down to switch months.</p><p>When you open a sidebar, focus moves into it automatically. When you close it, focus returns to where you were. It sounds like a small thing but it’s the difference between an app that feels under control and one that constantly loses your place.</p><h3>Accessibility</h3><p>Every interactive element has a proper ARIA label. The layout uses semantic HTML landmarks — &lt;nav&gt; and &lt;main&gt; - so screen readers can navigate the page structure without hunting through the content. Decorative icons are hidden from assistive technology. Toggle buttons correctly reflect their state with aria-expanded. The active page in the navigation is marked with aria-current. The app is fully usable without a mouse.</p><h3>20 languages, 26 themes</h3><p>Besides English, German, Spanish, and Slovenian, the app is now also available in French, Portuguese, Italian, Japanese, Chinese, Korean, Dutch, Danish, Norwegian, Swedish, Finnish, Polish, Czech, Slovak, Croatian, and Serbian.</p><p>It ships with 26 themes in both dark and light modes.</p><p>Data can be exported and imported as JSON, YAML, TSV, or Markdown. Google Keep notes can be imported from a Google Takeout ZIP.</p><p>For the self-hosting community, there’s a Docker image that runs a Blazor Server instance. Besides accessing it in the browser, any native version of the app — Windows, Linux, Android, iOS, macOS — can log in to your instance and sync, so your data follows you across devices without going through anyone else’s servers.</p><p>Web: <a href="https://openhabittracker.net/">openhabittracker.net</a><br>PWA: <a href="https://pwa.openhabittracker.net/">pwa.openhabittracker.net</a><br>Source: <a href="https://github.com/Jinjinov/OpenHabitTracker">github.com/Jinjinov/OpenHabitTracker</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eec22be7b06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[nas-sync-script-builder generates a bash script for one-way, no-deletion NAS sync using rsync and…]]></title>
            <link>https://medium.com/@jinjinov/nas-sync-script-builder-generates-a-bash-script-for-one-way-no-deletion-nas-sync-using-rsync-and-19ea54c11266?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/19ea54c11266</guid>
            <category><![CDATA[lsyncd]]></category>
            <category><![CDATA[rsync]]></category>
            <category><![CDATA[nas]]></category>
            <category><![CDATA[sync]]></category>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 16:12:41 GMT</pubDate>
            <atom:updated>2026-01-29T16:12:41.840Z</atom:updated>
            <content:encoded><![CDATA[<h3>nas-sync-script-builder generates a bash script for one-way, no-deletion NAS sync using rsync and lsyncd</h3><h3>nas-sync-script-builder: a small tool for a very specific NAS problem</h3><p>Most backup and sync tools assume one of two models:</p><ul><li><strong>Mirroring</strong>: source and destination must be identical</li><li><strong>Backup systems</strong>: versioned, snapshot-based, or cloud-oriented</li></ul><p>There is a common use case that falls between these models and is poorly served by existing tools:</p><blockquote><em>Keep a NAS continuously updated from a local machine, </em><strong><em>one-way</em></strong><em>, while preserving existing files on the NAS.</em></blockquote><p>This is the problem nas-sync-script-builder exists to solve.</p><h3>The niche it fills</h3><p>The target scenario:</p><ul><li>A Linux workstation or server</li><li>One or more local disks (often NTFS or mixed filesystems)</li><li>A NAS (Synology or any SMB-compatible device) as a sink</li><li>Files flow <strong>local → NAS only</strong></li><li>Existing NAS files remain untouched</li></ul><p>Many tools approximate this behavior, but none provide it directly:</p><ul><li>rsync requires careful flag management</li><li>lsyncd is powerful but tricky to configure</li><li>Backup tools (Borg, Restic, Duplicati) are versioned or snapshot-based</li><li>NAS vendor tools enforce mirroring or proprietary agents</li></ul><p>What’s missing is a safe, repeatable way to set up:</p><ul><li>Incremental initial sync</li><li>Continuous real-time sync</li><li>Systemd-aware mounts</li><li>Persistent credentials</li></ul><h3>How it works</h3><p>nas-sync-script-builder is a <strong>configuration generator</strong>, not a daemon.</p><p>It provides:</p><ul><li>A Python GUI (and optional CLI) for configuration</li><li>Automatic detection of eligible local partitions via UDisks2</li><li>A generated Bash script that:</li></ul><ol><li>Installs required packages (rsync, lsyncd, cifs-utils)</li><li>Creates local and NAS mount points</li><li>Configures CIFS mounts using systemd automounts</li><li>Writes a managed /etc/fstab block</li><li>Performs an initial one-way sync with rsync</li><li>Configures lsyncd for continuous updates</li><li>Handles systemd dependencies, logs, and inotify limits</li><li>Is safe to re-run at any time</li></ol><p>The Python tool exists to make this setup <strong>explicit, reviewable, and reproducible</strong>.</p><h3>Who this is for</h3><ul><li>Linux users with a NAS needing continuous updates</li><li>Users migrating from Windows disks to a NAS</li><li>Anyone who wants controlled, append-only sync without snapshot or backup tools</li></ul><h3>Project links</h3><ul><li>GitHub: <a href="https://github.com/Jinjinov/nas-sync-script-builder">https://github.com/Jinjinov/nas-sync-script-builder</a></li><li>PyPI: <a href="https://pypi.org/project/nas-sync-script-builder">https://pypi.org/project/nas-sync-script-builder</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19ea54c11266" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Blazor app for WASM, Windows, Linux, macOS, iOS, Android]]></title>
            <link>https://medium.com/@jinjinov/how-to-create-a-blazor-app-for-wasm-windows-linux-macos-ios-android-c3f48406c225?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3f48406c225</guid>
            <category><![CDATA[blazor]]></category>
            <category><![CDATA[wasm]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[desktop]]></category>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Thu, 19 Sep 2024 14:17:44 GMT</pubDate>
            <atom:updated>2024-09-19T14:17:44.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9oqUGtyijsKPiYoSF0I-A.png" /></figure><p>Hey everyone!</p><p>I got a few messages asking me how I created my free, open source habit tracker app <a href="https://openhabittracker.net/">OpenHabitTracker</a> so I decided to write a post about it.</p><p>You can see the source code on <a href="https://github.com/Jinjinov/OpenHabitTracker">GitHub</a>.</p><h3>Why Blazor</h3><p>I wanted to create an app that would work on as many platforms as possible and share as much code as possible between all platforms.</p><p>I compared all cross platform C# frameworks that were available.</p><p>Xamarin was replaced by MAUI and MAUI doesn’t support Web — that left Avalonia (with poor web support at that time), Uno and Blazor.</p><p>I have used a few open sourced project managed by volunteers and it did not have the best experience, so I wanted to choose a project backed by a company.</p><p>I was working with WPF for 5 years and in that time I found out that I really don’t like XAML, so I was really happy when Blazor came out.</p><p>My first Blazor project was only with WASM and Windows through WebView2 in WinForms / WPF. When Maui Blazor Hybrid was announced I knew that Blazor was a good choice.</p><h3>How I started</h3><p>I started by creating a project from every Visual Studio Blazor project template in a single solution and then I started to move all the files that were the same into a shared library.</p><p>At first, I had only a single shared library, but later I split it into OpenHabitTracker of type &lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt; that holds the core classes and to OpenHabitTracker.Blazor of type &lt;Project Sdk=&quot;Microsoft.NET.Sdk.Razor&quot;&gt; that holds the razor files. This way the logic is separated from the UI and the razor files contain few lines of C# code which is a good thing because Visual Studio editor for razor files can behave strangely at times, especially with @code blocks. The editor behaves better if you have your C# code in .razor.cs code behind files, but you can just go one step further and have the C# code in a separate library.</p><p>At first, I had only my razor components and razor pages in the shared library, I didn’t move App.razor, _Imports.razor, MainLayout.razor, JsInterop.cs, jsInterop.js, app.css into the shared library, but later I figured out that you can move all files except Program.cs and index.html into the shared library - if there is any platform specific behavior, you can solve it with C# interfaces - even if you need platform specific razor UI, you can still solve it with interfaces and methods that return a RenderFragment. All .css and .js files can be in the shared library and then included to platform specific projects in index.html with _content/OpenHabitTracker.Blazor/... for example &lt;link rel=&quot;stylesheet&quot; href=&quot;_content/OpenHabitTracker.Blazor/app.css&quot; /&gt;.</p><h3>How I chose the frameworks</h3><p>I started comparing all the frameworks that support Blazor on desktop and mobile:</p><p>Windows only:</p><ul><li>WPF: works great with Microsoft.AspNetCore.Components.WebView.Wpf NuGet</li><li>WinForms: works great with Microsoft.AspNetCore.Components.WebView.WindowsForms NuGet</li></ul><p>Windows, Linux, macOS:</p><ul><li>Photino Blazor: works great with Photino.Blazor NuGet</li><li>Electron.NET: works with ElectronNET.API NuGet - long compile times, very large builds, slow startup, opens the GUI window AND a terminal</li><li>Chromely: works with Chromely NuGet - long compile times, slow startup, opens the GUI window AND a terminal - GitHub repo was archived by the owner on Jan 16, 2023</li></ul><p>Windows, macOS, iOS, Android:</p><ul><li>MAUI: works with several Maui NuGet packages and dotnet workloads: android, ios, maccatalyst, maui-windows, see <a href="https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload">https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-workload</a></li></ul><p>To support WASM, Windows, Linux, macOS, iOS, Android you need at least:</p><ul><li>Blazor WASM</li><li>Maui</li><li>Photino Blazor</li></ul><p>I develop on Windows with Visual Studio 2022 and my startup project is usually OpenHabitTracker.Blazor.Photino because it compiles and starts much faster than OpenHabitTracker.Blazor.Wasm or OpenHabitTracker.Blazor.Maui.</p><h3>Saving user data</h3><p>I took a look at the different options for storing user data.</p><p>Because I wanted a large, persistent storage that does not require prompting the user for permission and is not deprecated I chose IndexedDB:</p><ul><li><a href="https://github.com/wtulloch/Blazor.IndexedDB">https://github.com/wtulloch/Blazor.IndexedDB</a> — TG.Blazor.IndexedDB NuGet - awkward, not user friendly, abandoned project</li><li><a href="https://github.com/Reshiru/Blazor.IndexedDB.Framework">https://github.com/Reshiru/Blazor.IndexedDB.Framework</a> — Reshiru.Blazor.IndexedDB.Framework NuGet - wraps TG.Blazor.IndexedDB NuGet, making it much nicer to work with - but it has a huge flaw: it always loads all data - you don&#39;t have the ability to load only some objects - repository has been archived by the owner on Jan 26, 2021</li><li><a href="https://github.com/amuste/DnetIndexedDb">https://github.com/amuste/DnetIndexedDb</a> — DnetIndexedDb NuGet - works well enough</li></ul><p>I made two mistakes:</p><ul><li>I chose Reshiru.Blazor.IndexedDB.Framework and I even fixed a few things and created <a href="https://github.com/Jinjinov/IndexedDB.Blazor">https://github.com/Jinjinov/IndexedDB.Blazor</a> (don&#39;t use it, it has the same problem)</li><li>I used IndexedDB on desktop and mobile — it works, but I think SQLite is a better option.</li></ul><p>I switched to DnetIndexedDb for the browser and to EF Core + SQLite for desktop and mobile.</p><h3>The user interface</h3><p>At first, I wanted to write all CSS on my own, but I soon realized that using Bootstrap is not that bad and saves you a lot of time.<br>That proved to be a good decision when I decided to implement themes and discovered that Bootswatch offers 26 themes for Bootstrap.</p><p>I decided to use a free UI library, so I took a look at what was available.</p><p>In my previous Blazor project, I used the Blazorise UI library because it had the most controls at the time and because it abstracts the CSS to C# enums and classes — that way it was really easy to switch from Bootstrap 4 to Bootstrap 5. The owner of the project is really responsive to ideas and requests (if you are reasonable and show some initiative). Later I found out that I don’t actually need any complex components in my project, so now I use only Bootstrap 5.</p><p>In my previous Blazor project, I used Font Awesome icons and Google Fonts, but now I use embedded font files and <a href="https://icons.getbootstrap.com/">Bootstrap Icons</a> because I think they work better with Bootstrap 5.</p><p>In my previous Blazor project, I used CDN to get the CSS, JS and fonts from the web, but I found out that this makes the app noticeably slower. Now I include all CSS, JS and fonts into the project and the app is much faster. The app is around 2 MB larger because of all the included resources, but at 20 MB for the whole app that is only 10% more — for a much faster UI.</p><p>Feel free to ask any questions! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3f48406c225" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Led Me to Creating OpenHabitTracker and Lessons Learned]]></title>
            <link>https://medium.com/@jinjinov/what-led-me-to-creating-openhabittracker-and-lessons-learned-b55b186b32f1?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/b55b186b32f1</guid>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[habit-tracker]]></category>
            <category><![CDATA[blazor]]></category>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Fri, 06 Sep 2024 14:20:12 GMT</pubDate>
            <atom:updated>2024-09-06T14:20:12.527Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9oqUGtyijsKPiYoSF0I-A.png" /></figure><p><a href="https://openhabittracker.net/">OpenHabitTracker</a> is a free, ad-free, open-source habit tracker app that works on Windows, Linux, Android, iOS, macOS, and as a web app. You can find the source code on <a href="https://github.com/Jinjinov/OpenHabitTracker">GitHub</a>.</p><h3>The Journey to Creating OpenHabitTracker</h3><p>I used Google Keep for a long time, but the more I used it, the harder it became to organize my notes. I tried using labels a few times, but without much success.</p><p>Then, I began using OneNote to keep track of tasks that weren’t done daily (like cleaning the windows in all rooms or taking the car to the car wash). In the note, I listed a dozen tasks along with the dates they were last completed, but soon I found myself wishing for a tool that could better manage this.</p><p>Google Calendar is good for repeating tasks, but finding out when you last completed a particular task can be bothersome — you have to search through previous weeks or months. Most habit tracker apps are great for tracking streaks, but if you miss a task, they fall short. You know you didn’t do it, but you don’t know when you last did it, how much time has passed since, or what the average repeat interval is compared to your desired repeat interval.</p><p>This is why I decided to create my own app.</p><h3>My Programming Background</h3><p>I wrote my first program in September 1989, during primary school, using QBasic, and I’ve been programming ever since. For the first 15 years of my programming career, I worked with game engines — writing my own for my university thesis, working on an in-house engine at one company, and using Unity at another. I had almost no experience with UI, UX, HTML, CSS, JS, SQL, or any other web technologies or databases.</p><h3>First Attempt: Daily Checklist and Tracker</h3><p>On July 24, 2016, I started working on <a href="https://github.com/Jinjinov/daily-checklist-and-tracker">Daily Checklist and Tracker</a> using PHP and MySQL. I managed to create a simple website with a task list and three types of tasks:</p><ul><li>Tasks to be done ASAP, with measured duration</li><li>Tasks to be done once on a specified date, saving the time when they were finished</li><li>Tasks with a repeat interval</li></ul><p>It had all the features I missed in Google Keep, but nothing else. The design was awful — or rather, there was no design at all, not even “programmer’s art” — making it unusable.</p><p><strong>Lesson learned</strong>: User interface and user experience are as important as the features. You have to learn some design.</p><h3>Second Attempt: Priority Task List</h3><p>On December 24, 2017, I started working on <a href="https://github.com/Jinjinov/priority-task-list">Priority Task List</a> using Vue.js, CouchDB, and PouchDB. I consider it a vast improvement over my first attempt. It had a menu, help section, and allowed you to group tasks into categories. Each task displayed the time elapsed since it was last completed and the number of times it was completed. It also had an automatically computed priority that changed with time and a priority factor that determined how quickly the priority increased.</p><p>This time, I paid more attention to UI, but I had no experience with responsive design. The website had a mobile-first design — perhaps mobile-only design — with just one layout for all screen sizes. It had every feature I wanted, presented on screen the way I wanted, but the user experience was still lacking. You can still try it out <a href="https://jinjinov.github.io/priority-task-list">here</a>.</p><p><strong>Lesson learned</strong>: Even if you learn some design and create the UI the way you want, it might not create a good user experience.</p><h3>Third Attempt: What Should I Be Doing Right Now</h3><p>On September 16, 2018, I started working on <a href="https://github.com/Jinjinov/what-should-i-be-doing-right-now">What Should I Be Doing Right Now</a> using Vue.js, CouchDB, and PouchDB. I had an exciting new idea: users could write JavaScript code to determine which task should be done next, based on which tasks were marked as done on a list. The website would take the JavaScript as a string and execute it in code, allowing users to determine what they should do next based on their own rules and a list of tasks with checkboxes.</p><p>It was a fun experiment, but not very useful in day-to-day life. You can still try it out <a href="https://jinjinov.github.io/what-should-i-be-doing-right-now">here</a>.</p><p><strong>Lesson learned</strong>: Sometimes, you have to test your ideas, even if they don’t prove to be the best.</p><h3>Fourth Attempt: What Should I Be Doing</h3><p>On May 12, 2019, I started working on <a href="https://github.com/Jinjinov/what-should-i-be-doing">What Should I Be Doing</a> using PHP and the Google Reminders API. I had another exciting idea: using the existing Google Reminders API to work with Google Reminders and add missing features to a website. Since I couldn’t find a PHP wrapper for the Google Reminders API, I decided to write one myself (<a href="https://github.com/Jinjinov/google-reminders-php">Google Reminders PHP</a>) and also created one for JavaScript (<a href="https://github.com/Jinjinov/google-reminders-js">Google Reminders JS</a>).</p><p>However, this took most of my time, and the website itself didn’t progress. I didn’t add any features beyond listing the reminders you have in Google Calendar and Google Keep.</p><p><strong>Lesson learned</strong>: Don’t start projects where you’ll spend more time writing missing libraries than working on the project itself.</p><h3>Fifth Attempt: The Last Time</h3><p>I became interested in Microsoft Blazor with the release of .NET Core 3.0 and started learning it. On October 4, 2020, I began working on <a href="https://github.com/Jinjinov/TheLastTime">TheLastTime</a> using Blazor with .NET Core 3.1. With the release of .NET 5 on November 10, 2020, I upgraded the project to .NET 5. This was my first Blazor app, and I thoroughly enjoyed working on it — using C# on the client side gave me IntelliSense in Visual Studio, which wasn’t available with JavaScript.</p><p>The app had a good design, a friendly UI, and was a pleasure to use — this was the first time I found myself daily using a program I had created. Using the app helped me significantly reduce procrastination and develop a few habits that I had struggled with before. The app worked on the web with Blazor WASM and on Windows with WinForms and WPF, where I used WebView to host Blazor. Most of the Blazor code was shared between all three projects.</p><p>The app included all the features of my Priority Task List project, such as habit tracking and task grouping by categories. Additionally, it introduced new features: custom categories, advanced Search, Filter, and Sort options for customizing your view, and 26 Bootswatch themes for Bootstrap. The app also supported user data export/import in JSON and YAML formats and allowed users to back up JSON to Google Drive.</p><p>However, the NuGet library I used for IndexedDB reloaded everything on every change. At first, this wasn’t an issue, but after a year, the app became so slow that it was unusable. It was clear that I needed a better library for IndexedDB, but since it was so deeply integrated into my code, I realized that a complete rewrite would be faster. You can try it out <a href="https://old.ididit.today/">here</a>.</p><p><strong>Lessons learned</strong>:</p><ol><li>When using third-party libraries, it pays off to get to know them better, especially if they are not widely used or are developed by a single person.</li><li>Using abstractions and interfaces is considered best practice in C# for a reason — don’t ignore them.</li></ol><h3>Sixth Attempt: Ididit!</h3><p>On April 15, 2022, I started working on <a href="https://github.com/Jinjinov/Ididit">Ididit</a> using Blazor with .NET 6. With the release of .NET 7 on November 8, 2022, I upgraded the project to .NET 7. I aimed to make the app truly cross-platform, so in addition to WASM, WinForms, and WPF, I also explored Microsoft MAUI, Chromely, Electron.NET, and Photino.</p><p>Using Blazor with Chromely and Electron.NET proved to be difficult and slow, and both libraries were too bloated for my needs. Photino allowed me to create a Linux version of the app. With MAUI, I could develop Android and iOS versions and publish them to the Google and Apple stores. I also published the MAUI version to the Microsoft Store and didn’t bother with WinForms and WPF versions.</p><p>I decided to implement all the features from TheLastTime and more, all at once. However, this approach caused the design to suffer — the UI wasn’t polished, and the app became bloated with features. The app combined notes, tasks, and habits into one bloated list. I added nested categories and a category tree, which proved to be unnecessary as I never used the feature myself.</p><p>The app also had a few good improvements:</p><ul><li>Markdown support for notes</li><li>User data export/import in TSV and Markdown in addition to JSON and YAML</li><li>Import Google Keep notes by uploading the ZIP file produced by Google Takeout</li><li>Localization to English, German, Spanish, Slovenian, and Czech</li></ul><p>Because I wanted to write as little platform-specific code as possible, I thought using IndexedDB on desktop through WebView was a good idea. However, it didn’t work as well as using the platform’s native file access. I also programmed file open/save for user data export/import with JavaScript on all platforms, and while it worked on web and desktop, it didn’t perform well on mobile. Although I used abstractions and interfaces this time, I didn’t structure the code independently enough. You can try it out <a href="https://app.ididit.today/">here</a>.</p><p><strong>Lessons learned</strong>:</p><ol><li>If you’re rewriting a project from scratch, don’t add all the features and ideas you had before at once — first rewrite the proven features, then start adding new ones.</li><li>Sometimes, it’s better to write platform-specific code rather than force a platform-independent solution, even if it’s possible.</li><li>Writing interfaces for their own sake is as bad as not writing them — if you suspect you might need a different implementation, plan for it when writing the interface.</li></ol><h3>Seventh Attempt: OpenHabitTracker</h3><p>On November 14, 2023, I started working on <a href="https://github.com/Jinjinov/OpenHabitTracker">OpenHabitTracker</a> using Blazor and .NET 8, which was released on that day. This time, I decided to take all the good parts of my first Blazor app, TheLastTime, and combine them with the good aspects of Ididit while fixing its problems:</p><ul><li>The app has a good design and polished UI.</li><li>IndexedDB is used only for WASM, while SQLite with EF Core is used for desktop and mobile.</li><li>User data export/import is done with native file open/save dialogs on each platform.</li></ul><p>I also introduced new improvements:</p><ul><li>All HTML, CSS, and JS files are now embedded, so the app doesn’t depend on an internet connection.</li><li>Categories have been simplified — they are no longer nested, so there’s no need for a tree.</li><li>Notes, tasks, and habits are now in separate lists, which can also be sorted by priority.</li><li>Search, Filter, and Sort features have been improved.</li><li>Added a Trash feature so deleted items can now be recovered.</li><li>All 26 themes now also work in dark mode.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b55b186b32f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing OpenHabitTracker: A Free, Open Source, and Privacy-Focused Habit Tracker]]></title>
            <link>https://medium.com/@jinjinov/introducing-openhabittracker-a-free-open-source-and-privacy-focused-habit-tracker-0452e847f696?source=rss-22c063c31742------2</link>
            <guid isPermaLink="false">https://medium.com/p/0452e847f696</guid>
            <dc:creator><![CDATA[Urban]]></dc:creator>
            <pubDate>Sat, 31 Aug 2024 07:49:52 GMT</pubDate>
            <atom:updated>2024-08-31T07:49:52.259Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m excited to announce the launch of <strong>OpenHabitTracker</strong>, a powerful, free, and ad-free habit tracking tool designed with privacy and flexibility at its core. Whether you’re managing daily tasks, building new habits, or organizing notes, OpenHabitTracker offers a robust solution that respects your privacy and adapts to your needs.</p><p>You can start using it today by visiting <a href="https://openhabittracker.net/">OpenHabitTracker</a>.</p><h4>Why OpenHabitTracker?</h4><p>In a world where most productivity apps are either paid, ad-supported, or intrusive on your privacy, OpenHabitTracker stands out as a true alternative. Here’s why:</p><ul><li><strong>Free and Ad-Free</strong>: Enjoy the full range of features without being interrupted by ads or paying for premium upgrades.</li><li><strong>Open Source</strong>: The entire project is open source, meaning the code is transparent, and contributions from the community are welcome.</li><li><strong>Privacy Focused</strong>: Your data stays with you. All user data is stored locally on your device, ensuring that your personal information remains private and secure.</li></ul><h4>Cross-Platform Availability</h4><p>OpenHabitTracker is accessible across multiple platforms, making it convenient to use whether you’re at your desk or on the go. It’s available on:</p><ul><li><strong>Windows</strong></li><li><strong>Linux</strong></li><li><strong>Android</strong></li><li><strong>iOS</strong></li><li><strong>macOS</strong></li><li><strong>Web App</strong></li></ul><p>No matter what device you use, your habits and tasks are always within reach.</p><h4>Key Features</h4><p>OpenHabitTracker comes packed with a range of features designed to help you stay organized and productive:</p><ul><li><strong>Markdown Support</strong>: Write detailed notes with full Markdown support, making it easy to format your content.</li><li><strong>Organize with Categories and Priorities</strong>: Structure your tasks, notes, and habits using customizable categories and priority levels.</li><li><strong>Advanced Search, Filter, and Sort</strong>: Quickly find what you’re looking for with powerful search, filtering, and sorting options.</li><li><strong>Data Export/Import</strong>: Easily export your data in various formats including JSON, YAML, TSV, and Markdown. You can also import notes directly from Google Keep, making it seamless to switch over.</li><li><strong>Customization with Themes</strong>: Choose from 26 different themes, and switch between Dark and Light modes to suit your environment and preference.</li><li><strong>Localized Experience</strong>: OpenHabitTracker is localized in English, German, Spanish, and Slovenian, making it accessible to a broader audience.</li></ul><h4>A Tool for Everyone</h4><p>Whether you’re a student, professional, or anyone looking to improve productivity, OpenHabitTracker is designed to be a versatile tool that adapts to your needs. Its flexibility, privacy-first approach, and wide range of features make it a powerful choice for anyone serious about habit tracking and task management.</p><h4>Get Started Today</h4><p>Ready to take control of your habits and tasks? Visit <a href="https://openhabittracker.net/">OpenHabitTracker</a> and download the app on your preferred platform. With OpenHabitTracker, you can build better habits, organize your life, and do it all with the confidence that your data is yours and yours alone.</p><p>If you have any feedback, suggestions, or would like to contribute to the project, feel free to get involved through our open source community. Let’s build something great together!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0452e847f696" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>