<?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 Davod on Medium]]></title>
        <description><![CDATA[Stories by Davod on Medium]]></description>
        <link>https://medium.com/@davodm?source=rss-83905f8712b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CUyE6YdBewq5P2kkEp95HQ.jpeg</url>
            <title>Stories by Davod on Medium</title>
            <link>https://medium.com/@davodm?source=rss-83905f8712b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 15:24:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davodm/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[Beporsim, Six Years Later: The Phoenix We Promised]]></title>
            <link>https://davodm.medium.com/beporsim-six-years-later-the-phoenix-we-promised-644f070b722d?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/644f070b722d</guid>
            <category><![CDATA[iran]]></category>
            <category><![CDATA[online-survey]]></category>
            <category><![CDATA[polling]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 17:58:20 GMT</pubDate>
            <atom:updated>2026-11-21T00:34:37.966Z</atom:updated>
            <content:encoded><![CDATA[<p>On 29 November 2020, I wrote the kind of post no founder ever wants to write. It was called “An Autumn Sunset for Beporsim”.</p><p>For five years we had asked people in Iran what they thought, and more than 150,000 of them answered. But Iran’s economy and its tightening restrictions made it impossible to carry on.</p><p>I wrote the farewell post myself. Its last line promised that one day we would “rise again like a phoenix”. Honestly, I wrote that more to comfort the team than as a promise.</p><p>Six years later, I can say we kept it. <a href="https://beporsim.com/">Beporsim</a> is back. But this isn’t a story about the past. It’s about why we need a place like this now more than ever.</p><figure><img alt="Flat illustration of diverse Iranians sharing questions and answers on Beporsim’s indigo background" src="https://cdn-images-1.medium.com/max/1024/1*7fZFBldA_9blPOPmr0h3CA.png" /></figure><h3>A society that can’t hear itself</h3><p>A lot changed in those six years. Many of the people who once answered our questions from Tehran, Tabriz or Zahedan now live in other cities around the world, but they still think about home.</p><p>And we have split apart. Inside and outside. This side and that side.</p><p>Most of us live in bubbles where we mostly hear people who think like us. When we meet a genuinely different view, it shocks us. Not because we disbelieve it, but because we rarely see it up close.</p><p>So the picture of “the Iranian people” we keep seeing is usually the picture of the loudest voices, not all of them.</p><h3>When you can’t trust the numbers either</h3><p>The second problem is one fewer people say out loud: polls are hard to trust.</p><p>Many Persian-language polls and media outlets depend on particular funders or ideologies. Funding isn’t wrong in itself, but in polling, even the suspicion that money shapes which questions get asked, or how, is enough to kill trust.</p><p>Then there are social media polls, where a handful of fake accounts and one organised campaign can flip a result overnight, and that number becomes tomorrow’s headline.</p><p>For six years I kept asking: if we ask again, what must change so people can trust the answers?</p><h3>The new Beporsim</h3><p><strong>We ask everyone. </strong>Iranians inside and outside Iran. We show results together and separately, so you can see where your voice sits, and what lies beyond your bubble.</p><p><strong>Every answer comes from a real person.</strong> Published results get cited and argued over, so there’s no room for bots. We watch for fake accounts and suspicious patterns all the time. Verifying a phone number through Telegram or WhatsApp is optional; it only helps us confirm which country you’re in.</p><p><strong>We take your privacy seriously.</strong> If you do verify a number, it’s only used to confirm your country, and it’s never stored with your answers. You can export your data or delete your account at any time. For someone living in Iran, that isn’t a technical detail. It’s the precondition for speaking at all.</p><p><strong>We answer to no one.</strong> Beporsim is independent and non-profit. We aren’t tied to any government, party or political movement, we never sell your data, and we hold ourselves to strict privacy rules. That’s what lets us ask the questions we think need asking and publish the answers as they are.</p><h3>Reports that sat in a drawer</h3><p>People told us things in those five years that we could only release in limited, careful ways inside Iran. Now we’re publishing them in full: on <a href="https://payam.foundation/en/reports/depressive-symptoms-2017-2020">mental health</a>, <a href="https://payam.foundation/en/reports/environmental-issues-as-iranians-see-it">the environment</a> and <a href="https://payam.foundation/en/reports/gender-equality-attitudes-2017-2019">gender equality</a>.</p><p>Some still haunt me. Ninety-one per cent of respondents said they believed in equality between women and men. Yet when we asked about street harassment, 47 per cent blamed the woman who was harassed.</p><p>The gap between those two numbers is exactly what Beporsim exists to show: the distance between what we say and what we actually think.</p><figure><img alt="A balance scale where many small speech bubbles outweigh a single megaphone, watched by two people" src="https://cdn-images-1.medium.com/max/1024/1*gm4pSiwedsy6SRGjg9zEGg.png" /><figcaption>When everyone is heard, the loudest voice is no longer the only one.</figcaption></figure><h3>No poll is perfect. Honest ones say so.</h3><p>No poll in the world is perfect. Not official statistics, not the most respected international pollsters. Every survey has a margin of error and sampling limits. Serious pollsters aren’t the ones without limits. They’re the ones who don’t hide them.</p><p>So we don’t. Some Iranians abroad still use Iranian numbers, and vice versa. Our results reflect the people who chose to answer, not official statistics, and we say so next to every result.</p><p>But being open about limits doesn’t mean sitting back. We trace bad and fake data, we fight bots constantly, and we watch for anything that could distort the results, from a single fake account to a coordinated campaign.</p><p>And there’s a simple logic underneath it: the pattern doesn’t lie. When thousands of verified, real people answer the same question, a few noisy answers don’t change the picture. One fake account can’t bend the trend, and we’re watching for anyone who tries to do it together.</p><p>So yes, Beporsim has limits, like every honest poll. Trust comes from naming them and guarding the data every day.</p><h3>Why now?</h3><p>Because every day the distance between us grows.</p><p>Because a lot is said about “the Iranian people”, and very little is asked of them.</p><p>And because if we are ever going to decide a shared future, we first need to know what we actually think: all of us, not just the loudest.</p><h3>What’s next</h3><p>More reports. More questions.</p><p>Beporsim is now a transparent platform. You can see the results. You can see profiles. And you can still keep yourself private whenever you want.</p><p>More features are coming. And the fight against bots and fake data never stops.</p><p>If you were with us back then, it’s good to see you again. If you’re new, welcome. Answer this week’s question at <a href="https://beporsim.com/">beporsim.com</a> and send it to someone you suspect disagrees with you.</p><p>Six years ago I wrote that we’d be back. We are, and this time we plan to stay.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=644f070b722d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Paper Flyer: Why I Built an AI-Powered, Open-Source Safety Net for Lost Pets]]></title>
            <link>https://davodm.medium.com/beyond-the-paper-flyer-why-i-built-an-ai-powered-open-source-safety-net-for-lost-pets-55458a337142?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/55458a337142</guid>
            <category><![CDATA[pet-listing]]></category>
            <category><![CDATA[find-pet]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 21:52:31 GMT</pubDate>
            <atom:updated>2026-07-10T21:56:32.696Z</atom:updated>
            <content:encoded><![CDATA[<p>Years ago, my cat Tedi walked out of the front door and never came back. Anyone who has ever lost a pet knows the specific, heavy kind of quiet that follows. You look at the empty food bowl, you listen for a scratch at the door that isn’t coming, and you feel entirely helpless. I walked the neighbourhood for weeks, handing out paper flyers that eventually blurred in the rain or got covered up by local event posters. It felt like shouting into a void.</p><p>Tedi never returned, but that painful silence left me with a stubborn sense of duty. As a software engineer, I couldn’t shake the feeling that we could build something better. I made a quiet promise to myself that one day I would find a way to help other families reconstruct those missing trails. For a long time, the technical reality didn’t match the vision. Building a global database where people just post pictures doesn’t scale well if it relies entirely on human eyes searching through thousands of photos.</p><p>But over the last few years, artificial intelligence shifted from a futuristic concept into a practical tool. When I saw what modern image recognition and machine learning workflows could do, it clicked. We finally had the technology to connect scattered clues across different regions and turn desperate searches into actual matches. That original promise started turning into code, and UnlostPaws was born.</p><h3>What is UnlostPaws?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MeB1D7aCHVmITHoLC5FyLw.jpeg" /><figcaption>As a tribute to the cat who started it all, the cat with the white coat and orange patches in our logo is a stylised version of Tedi.</figcaption></figure><p>At its core, <a href="https://unlostpaws.com/">UnlostPaws</a> is a platform designed to replace the fragmented, chaotic mess of traditional missing pet flyers with a unified system. Right now, if you lose a pet, you might post on Facebook, Nextdoor, a local forum, and hang up paper posters. The data is everywhere and nowhere all at once. We wanted to build a single place where reports, stray sightings, and surrendered animals live together on an interactive map, tied together by automated intelligence.</p><p>The platform operates on a straightforward, direct three-step pipeline to connect lost pets with their owners as fast as possible.</p><p>First, a user creates a detailed alert. They quickly upload a clear photo of their companion, write a description, and drop a pin on the map where the pet was last seen.</p><p>Second, our custom AI algorithms take over. The system analyses the visual features of the pet alongside the textual data, automatically cross-referencing the new report against everything else in our database. It looks at markings, shapes, and unique facial features.</p><p>Third, if the AI finds a potential match, the system instantly alerts all involved parties to establish a direct line of communication. By reducing the time it takes to connect a sighting to a frantic owner, we turn what used to take days or weeks into a matter of minutes. When a pet is out in the cold, every single second is vital.</p><h3>From Personal Project to Voluntary Community Initiative</h3><p>I engineered the entire system from the ground up, writing the code (and of course thanks to Cursor for assisting me!), setting up the infrastructure, and designing the matching workflows. As the platform neared completion, I realised that a project with this kind of emotional weight shouldn’t just sit on a private server or operate as a fragile standalone hobby. It needed stability, resources, and a guarantee that it would always remain free for the people who need it.</p><p>To give UnlostPaws the backbone it needs, I decided to place the entire system under our company’s umbrella, launching it as an entirely voluntary public utility. By anchoring it to our established technical infrastructure, we can guarantee reliable hosting, the security required to run a scalable network and someone to pay the bills. This is our way of using our resources to give something tangible back to the community. We are not here to monetise anyone’s panic or grief.</p><p>Because this is a true community utility, the entire ecosystem is completely open source. I have made the full repository publicly available on <a href="https://github.com/the-dot-squad/unlostpaws">GitHub</a>, meaning the code belongs to everyone. By opening the doors to the global developer community, we can collaborate out in the open. Whether you want to help refine our machine learning matchers, optimise our mapping components, or audit our security, you can view the code and open a pull request directly.</p><h3>Shifting from Manual Labour to Smart Automation</h3><p>Older platforms in this space often stall because they rely heavily on human eyes. Staff or volunteers have to manually review every single report, flag duplicate posts, and vet matches. That approach simply doesn’t scale, and it introduces massive delays when time is critical. When I engineered UnlostPaws, my primary goal was to completely eliminate this manual bottleneck by relying entirely on automated intelligence.</p><p>We intentionally avoid manual review to keep the platform lean and fast. Instead, the system handles the heavy lifting on its own. Beyond the automated image matching for the pets themselves, we use AI workflows to manage content moderation and platform security. The system automatically scans every upload for nudity, NSFW content, and duplicate listings without requiring human intervention.</p><p>Because we rely on technology rather than a round-the-clock moderation team, we have to enforce strict system guardrails to prevent abuse. We do not have a team of people to clean up spam or manually fix rule breaks, which is why our automated policies are rigid. The platform has a strict zero-tolerance policy for duplicate submissions and inappropriate content. We also limit the number of posts a user can create per day. These firm boundaries ensure the platform remains clean, secure, and fully operational without needing constant human policing.</p><h3>A Multilingual Safety Net</h3><p>Loss does not care about borders, and it certainly does not care about language barriers. If you are panicked because your dog or cat ran away, you should not have to struggle with a user interface that isn’t in your native tongue. To bring communities closer, we built the platform to support diverse regions from the ground up, starting with native support for English and Persian (Farsi).</p><p>By offering native language support, we can adapt our search tools to fit different cultural contexts seamlessly. Because our codebase is fully open, we want to expand this safety net much further. We are actively looking for volunteer translators to help translate our components into new languages. The goal is simple: ensure that any pet parent, anywhere in the world, can look for their best friend using a tool they fully understand.</p><h3>The Next Chapter</h3><p>What started as a solitary coding project has grown into a living ecosystem. The foundation is built, the AI workflows are active, the maps are live, and our company’s public service initiatives fully support the platform. But a platform like this is only as strong as the network of people standing behind it.</p><p>The next phase of <a href="https://unlostpaws.com/">UnlostPaws</a> depends entirely on collective action. We need developers to jump into the GitHub repository to help us scale, neighbours to upload photos when they spot an animal wandering the streets, and local communities to spread the word so families know this resource exists.</p><p>We have the technology to bridge the gap between a lost pet and a worried home. Now, we just need to build the network. If you want to contribute code, help us translate, or simply use the platform to keep your local neighbourhood safe, the doors are wide open. Let’s work together to make sure no missing flyer ever has to lead to a dead end again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55458a337142" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Self-Host Multiple Email Domains for Free]]></title>
            <link>https://davodm.medium.com/how-to-self-host-multiple-email-domains-for-free-97fb200d87e2?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/97fb200d87e2</guid>
            <category><![CDATA[email-server]]></category>
            <category><![CDATA[stalwart]]></category>
            <category><![CDATA[email]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Mon, 11 May 2026 15:57:55 GMT</pubDate>
            <atom:updated>2026-05-11T16:11:29.390Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s be honest: hosting your own email used to be a complete nightmare. You’d spend your weekends fighting with a messy web of Postfix, Dovecot, and SpamAssassin, only to have your emails vanish into Gmail’s spam folder anyway.</p><p>Even if you are not going that much technical probably you are okay to pay for expensive business email services or set up multiple domains on cPanel hosting and deal with it.</p><p>But things have completely changed. Thanks to a brilliantly modern server called <a href="https://github.com/stalwartlabs/stalwart">Stalwart</a>, <a href="https://www.oracle.com/cloud/free/">Oracle Cloud’s</a> incredibly generous free tier, and Cloudflare’s APIs, you can run a bulletproof, multi-domain email server for absolutely free. And it’s not even that hard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2kAkuZ1wgPYZNNoNjWktcg.jpeg" /></figure><p>Here is exactly how you can do it with the tech stack below:</p><ul><li><strong>Stalwart Mail Server:</strong> Forget piecing together a dozen different tools. Stalwart handles IMAP, JMAP, SMTP, and even your calendars and contacts right out of the box. Because it’s written in Rust, it is memory-safe and blisteringly fast. It also manages your TLS certificates automatically.</li><li><strong>Oracle Cloud Free Tier:</strong> First, you need somewhere to host this thing. Oracle offers an “Always Free” virtual machine, alongside a built-in Email Delivery service. The free tier lets you send up to 200 emails a day, which is more than enough for personal use or a small project.</li><li><strong>Cloudflare:</strong> We use Cloudflare to automate the absolute worst part of email: DNS records.</li></ul><p>Step 1: Prep the Server</p><p>Stalwart cares a lot about security. Because of this, its Docker container runs as an unprivileged user (specifically, UID 2000) rather than running as root.</p><p>If you don’t set up your folders properly before starting, the container will just fail to write your data. Run this on your server to create the directories and hand over the correct permissions:</p><pre>mkdir -p /srv/stalwart/config /srv/stalwart/data<br>sudo chown 2000:2000 /srv/stalwart/config /srv/stalwart/data</pre><p><strong>Step 2: Spin Up the Container</strong></p><p>We’re going to spin this up using Docker Compose. Take a close look at the logging section in the configuration below. That is crucial. We set a max log file size of 10MB so Docker doesn’t slowly eat up all the storage on your small free-tier server.</p><p>Create your docker-compose.yml:</p><pre>services:<br>  stalwart:<br>    image: stalwartlabs/stalwart:latest<br>    container_name: stalwart-mail<br>    restart: always<br>    ports:<br>      - &quot;25:25&quot;       # SMTP Inbound<br>      - &quot;143:143&quot;     # IMAP<br>      - &quot;993:993&quot;     # IMAPS<br>      - &quot;587:587&quot;     # Submission<br>      - &quot;465:465&quot;     # Submission over TLS<br>      - &quot;8080:8080&quot;   # Management/Web UI (HTTP)<br>      - &quot;443:443&quot;     # Web UI &amp; Auto-TLS (HTTPS)<br>    environment:<br>      - STALWART_RECOVERY_ADMIN=admin:ChangeThisToASecurePassword<br>      # - STALWART_PUBLIC_URL=https://mail.yourdomain.com<br>    volumes:<br>      - /srv/stalwart/config:/etc/stalwart<br>      - /srv/stalwart/data:/var/lib/stalwart<br>    logging:<br>      driver: &quot;json-file&quot;<br>      options:<br>        max-size: &quot;10m&quot;<br>        max-file: &quot;3&quot;</pre><blockquote>There are several other <a href="https://stalw.art/docs/configuration/environment-variables/">environment variables</a> that you might needed based on your setup, but the two variables on current draft are:</blockquote><blockquote><strong>STALWART_RECOVERY_ADMIN</strong>: Normally, Stalwart generates a random 16-character temporary password on the first boot and forces you to hunt for it in the container logs. By passing this environment variable, we bypass that annoying bootstrap phase entirely.</blockquote><blockquote><strong>STALWART_PUBLIC_URL :</strong> I commented this line out for now, but if you eventually put Stalwart behind a reverse proxy (like NGINX, Traefik) or need to map it to a custom port, you just pass your public-facing URL into this variable.</blockquote><p>Once that’s saved, run docker compose up -d.</p><p><strong>Step 3: The Setup Wizard &amp; Cloudflare Magic</strong></p><p>When Stalwart boots up for the very first time, it starts in “bootstrap mode”.</p><p>Check your Docker logs (docker compose logs -f). You&#39;ll find a temporary 16-character password sitting right there in the bootstrap banner. Grab it. Head over to http://&lt;your-server-ip&gt;:8080/admin in your browser and log in.</p><p>The wizard is mostly self-explanatory, but pay attention to two specific things:</p><ul><li><strong>Logging:</strong> When it asks about your log destination, select <strong>Console</strong>. Since you’re running Docker, this lets Docker’s log driver capture and safely manage the logs so they don’t spiral out of control.</li><li><strong>DNS Automation:</strong> When you reach the DNS automation step in the setup wizard, you’ll see where Stalwart truly shines. Manually configuring email DNS is notoriously frustrating. You usually have to copy and paste dozens of TXT records for your SPF, DKIM, DMARC, and MX settings.<br>It natively supports automatic API integrations with several major providers, including Cloudflare, AWS Route 53, Google Cloud DNS, and even standard BIND-compatible servers via RFC 2136.</li></ul><blockquote>If you choose Cloudflare, there is one incredibly important detail to remember right now: The newer, finely-scoped API tokens do not currently play nicely with the automation. Stick to your Legacy Global API Key or a legacy-style token. Drop that into the wizard, and Stalwart will dynamically publish, update, and rotate all your necessary mail records automatically. It is practically magic.</blockquote><p>Finish up, save your new permanent admin password, and restart the container (docker compose restart).</p><p><strong>Step 4: Outbound Delivery and Bypassing Port Blocks</strong></p><p>Here is the catch with cloud servers. Almost all of them block outbound traffic on port 25 to stop spammers. Oracle is no exception. So, to actually send mail to the outside world, you have to route your outbound messages through an intermediate relay host.</p><p><strong>Oracle Email Delivery: </strong>Oracle actually includes a built-in service called Oracle Email Delivery. It is a fantastic option for this, but its Always Free tier calculates limits in a very specific way.</p><p>You get <strong>200 free emails per day</strong>. However, Oracle defines an “email” as either a single recipient <em>or</em> a 2MB chunk of data. So, if you send a plain text email to one person, that is 1 email. But if you attach a 10MB file and send it to one person, that counts as 5 emails (10MB divided by 2MB). If you send that same 10MB email to 10 different people, that instantly burns 50 emails from your daily quota. You are also capped at sending 10 emails per minute.</p><p><strong>Alternative Relays:</strong> If Oracle’s limits or setup processes feel too restrictive, you don’t have to use them. You can absolutely swap it out for another free or low-cost third-party relay service, such as <a href="https://www.smtp2go.com/"><strong>SMTP2GO</strong></a>. The setup process on your server will be nearly identical.</p><p><strong>Setting Up Your Credentials:</strong> Before touching your mail server, you need to configure your relay provider.</p><ol><li>If you use Oracle (You can read <a href="https://blogs.oracle.com/cloud-infrastructure/step-by-step-instructions-to-send-email-with-oci-email-delivery">their guide</a>), go to the Oracle Cloud Console and add your exact “From” email address as an <strong>Approved Sender</strong> for your specific operating region.</li><li>Next, generate your SMTP credentials. Oracle limits every user to a maximum of two sets of SMTP credentials, so generate your username and password and keep them somewhere safe.</li><li>Set up SPF records on your DNS management dashboard based on what Oracle suggests in the Approved Sender section.</li></ol><p><strong>Step 5: Routing in Stalwart</strong></p><p>Now, let’s wire that relay into your mail server. Log back into your Stalwart admin panel.</p><p>First, Log into the Stalwart Web UI and navigate to <strong>Settings › MTA › Outbound › Routes</strong>. Create a new route and select the <strong>Relay</strong> variant. You’ll need to fill out a few key fields:</p><ul><li><strong>Address:</strong> Your relay’s endpoint. (e.g., Oracle’s regional SMTP endpoint, or mail.smtp2go.com).</li><li><strong>Implicit TLS</strong>: Off</li><li><strong>Port:</strong> Usually 587.</li><li><strong>authUsername:</strong> The SMTP username you just generated.</li><li><strong>authSecret:</strong> Your new SMTP password.</li></ul><p>Give this route a recognizable name, like oracle_relay or smtp2go_relay.</p><p>Finally, we need a strategy. We want local emails (like sending a message from your phone to your laptop on the same domain) to stay completely internal. But emails to Gmail or Yahoo need to be pushed through Oracle.</p><p>Go to <strong>Settings › MTA › Outbound › Strategy</strong> and edit the <strong>route</strong> expression to look like this:</p><pre>{<br>  &quot;match&quot;: [<br>    {<br>      &quot;if&quot;: &quot;is_local_domain(&#39;&#39;, rcpt_domain)&quot;,<br>      &quot;then&quot;: &quot;&#39;local&#39;&quot;<br>    }<br>  ],<br>  &quot;else&quot;: &quot;&#39;oracle_relay&#39;&quot;<br>}</pre><p>Stalwart will now evaluate every single message. If you are emailing someone on your own local domain, it drops the message straight into their internal mailbox. If you email an external address like a Gmail user, it falls back to the else condition, securely handing the email off to your Oracle or SMTP2GO relay.</p><p><strong>Wrap Up</strong></p><p>And that’s really it. You now have a fast, memory-safe mail server. Cloudflare quietly handles your complex DNS records in the background. Oracle handles the actual delivery so your outbound emails don’t get blocked by cloud firewalls. Best of all? It costs you absolutely nothing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97fb200d87e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Convert HTML to Sanity Block Content: A Step by step guide]]></title>
            <link>https://davodm.medium.com/how-to-convert-html-to-sanity-block-content-a-step-by-step-guide-3902cd8ffcec?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3902cd8ffcec</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[sanity]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[portabletext]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Fri, 25 Oct 2024 10:13:42 GMT</pubDate>
            <atom:updated>2024-10-25T10:13:42.919Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever needed to import HTML content into Sanity.io and convert it into their block content structure, you know it can be a bit challenging. In this guide, I’ll walk you through a Node.js script that does exactly that, using ES6 syntax for better readability and performance.</p><p>We’ll also extend the functionality to support image uploading to Sanity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/0*4uYGduWkdZsl5tY8" /></figure><h3>Introduction</h3><p>Sanity.io uses a rich text editor called Portable Text, which allows for a flexible and structured way to handle rich text content. However, importing existing HTML content into this format requires conversion into Sanity’s block content format.</p><p>We’ll use the following libraries:</p><ul><li>@sanity/block-tools for converting HTML to blocks.</li><li>jsdom for parsing HTML content.</li><li>@sanity/schema to define and compile our schema.</li><li>@sanity/client to upload images to Sanity.</li></ul><p>Let’s dive in!</p><h3>Prerequisites</h3><ul><li>Node.js installed on your machine.</li><li>Basic understanding of Node.js and ES6 syntax.</li><li>Familiarity with Sanity.io’s schema definitions.</li></ul><h3>Step 1: Install Necessary Packages</h3><p>First, install the required npm packages:</p><pre>npm install @sanity/block-tools jsdom @sanity/schema @sanity/client</pre><h3>Step 2: Import Required Modules</h3><p>We’ll start by importing the necessary modules using ES6 import statements.</p><pre>import { htmlToBlocks } from &#39;@sanity/block-tools&#39;;<br>import { JSDOM } from &#39;jsdom&#39;;<br>import Schema from &#39;@sanity/schema&#39;;<br>import {createClient} from &#39;@sanity/client&#39;<br><br>const client = createClient({<br>  projectId: &#39;your-project-id&#39;,    // Replace with your project ID<br>  dataset: &#39;your-dataset-name&#39;,    // Replace with your dataset name<br>  token: &#39;your-write-token&#39;,       // Replace with a token that has write permissions<br>  useCdn: false,<br>});</pre><h3>Step 3: Parse HTML Content</h3><p>We need functions to parse HTML content. We’ll use jsdom for this purpose.</p><pre>const parseHtml = (html) =&gt; new JSDOM(html).window.document;</pre><h3>Step 4: Define and Compile the Sanity Schema</h3><p>Next, define your Sanity schema. This schema includes the document type, name and fields which are arrays of block content.</p><p>You don’t need to bring the whole schema, but you need to keep the structure as the same as your sanity dashboard.</p><p>for example the postschema as below:</p><pre>const compiledSchema = Schema.compile({<br>  name: &#39;SampleSchema&#39;,<br>  types: [<br>    {<br>      type: &#39;document&#39;,<br>      name: &#39;post&#39;,<br>      fields: [<br>        // &#39;description&#39; field<br>        {<br>          name: &#39;description&#39;,<br>          type: &#39;array&#39;,<br>          of: [<br>            {<br>              type: &#39;block&#39;,<br>              styles: [<br>                { title: &#39;Normal&#39;, value: &#39;normal&#39; },<br>                { title: &#39;Heading 1&#39;, value: &#39;h1&#39; },<br>                { title: &#39;Heading 2&#39;, value: &#39;h2&#39; },<br>              ],<br>              lists: [<br>                { title: &#39;Bullet&#39;, value: &#39;bullet&#39; },<br>                { title: &#39;Numbered&#39;, value: &#39;number&#39; },<br>              ],<br>              marks: {<br>                decorators: [<br>                  { title: &#39;Strong&#39;, value: &#39;strong&#39; },<br>                  { title: &#39;Emphasis&#39;, value: &#39;em&#39; },<br>                ],<br>                annotations: [<br>                  {<br>                    name: &#39;link&#39;,<br>                    type: &#39;object&#39;,<br>                    title: &#39;URL&#39;,<br>                    fields: [<br>                      {<br>                        name: &#39;href&#39;,<br>                        type: &#39;url&#39;,<br>                        title: &#39;URL&#39;,<br>                      },<br>                    ],<br>                  },<br>                ],<br>              },<br>            },<br>            {<br>              type: &#39;image&#39;,<br>              fields: [{ name: &#39;caption&#39;, type: &#39;string&#39; }],<br>              options: { hotspot: true },<br>            },<br>          ],<br>        },<br>        // &#39;pressRelease&#39; field<br>        {<br>          name: &#39;pressRelease&#39;,<br>          type: &#39;array&#39;,<br>          of: [<br>            // Similar structure as &#39;description&#39; field<br>          ],<br>        },<br>        // Other fields...<br>      ],<br>    },<br>    // Other types if necessary<br>  ],<br>});</pre><h3>Step 5: Create the Conversion Function</h3><p>Here’s the core functions that convert HTML to Sanity block content. The convertHTML function takes the HTML source, the field name in your schema where the content will go, and a processImage flag to indicate whether to handle images.</p><pre>function convertHTMLSync(source, fieldName, processImage = false) {<br>  if (!source) return null;<br>  const blockContentType = compiledSchema<br>    .get(&quot;post&quot;)<br>    .fields.find((field) =&gt; field.name === fieldName).type;<br><br>  return htmlToBlocks(source, blockContentType, {<br>    parseHtml,<br>    rules: [<br>      {<br>        deserialize(el, next) {<br>          if (processImage &amp;&amp; el.tagName &amp;&amp; el.tagName.toLowerCase() === &quot;img&quot;) {<br>            // Capture src and alt from the img tag<br>            const src = el.getAttribute(&quot;src&quot;);<br>            const alt = el.getAttribute(&quot;alt&quot;) || &quot;&quot;;<br><br>            return {<br>              _type: &quot;image&quot;,<br>              asset: {<br>                _type: &quot;reference&quot;,<br>                _ref: src, // src as a temporary placeholder<br>              },<br>              caption: alt,<br>            };<br>          }<br>          // Process other tags as normal<br>          return undefined;<br>        },<br>      },<br>    ],<br>  });<br>}<br><br>async function convertHTML(source, fieldName, processImage = false) {<br>  const blocks = convertHTMLSync(source, fieldName,processImage);<br><br>  if (processImage) {<br>    // Process image blocks for actual uploads<br>    await Promise.all(<br>      blocks.map(async (block) =&gt; {<br>        if (block._type === &quot;image&quot; &amp;&amp; block.asset._ref) {<br>          const uploadedImageId = await uploadImage(block.asset._ref);<br>          block.asset._ref = uploadedImageId || block.asset._ref;<br>        }<br>      })<br>    );<br>  }<br><br>  return blocks;<br>}<br><br>async function uploadImage(url) {<br>  if (!url || !url.startsWith(&quot;https://&quot;)) return null;<br><br>  try{<br>    const response = await fetch(url);<br>    const buffer = await response.buffer();<br><br>    const asset = await client.assets.upload(&quot;image&quot;, buffer, {<br>      filename: url.split(&quot;/&quot;).pop(),<br>    });<br><br>    return asset._id;<br>  }catch(error){<br>    console.error(&quot;Error uploading image:&quot;, error.message);<br>    return null;<br>  }<br>}<br><br>export default convertHTML;</pre><h3>Detailed Explanation</h3><p>Let’s break down what’s happening in these functions:</p><p>1. convertHTML Function: Converts the HTML source into Sanity block content, handling image uploads if processImage is true.</p><p>2. uploadImage Function: Uploads an image from a URL to Sanity and returns the asset ID.</p><h3>Important Notes</h3><ul><li><strong>Image Uploading</strong>: Be aware that uploading images to Sanity consumes bandwidth and storage. Ensure you have the rights to use the images and that you’re not exceeding your quota.</li><li><strong>Asynchronous Operations</strong>: Since we’re uploading images, we need to handle asynchronous operations properly. That’s why convertHTML is an async function.</li><li><strong>Placeholder References</strong>: Initially, the image _ref is set to the image URL. After uploading, it&#39;s replaced with the actual asset ID from Sanity.</li><li><strong>Error Handling</strong>: Proper error handling ensures that your script can handle issues gracefully without crashing.</li></ul><h3>Step 6: Usage Example</h3><p>Here’s how you might use the convertHTML function in your code:</p><pre>(async () =&gt; {<br>  const htmlContent = `<br>    &lt;h1&gt;Hello World&lt;/h1&gt;<br>    &lt;p&gt;This is a paragraph with an image:&lt;/p&gt;<br>    &lt;img src=&quot;https://example.com/image.jpg&quot; alt=&quot;Example Image&quot; /&gt;<br>  `;<br>  const fieldName = &#39;description&#39;;<br><br>  const descBlocks = await convertHTML(htmlContent, fieldName, true);<br><br>  await client.create({<br>    _type: &#39;post&#39;,<br>    description: descBlocks,<br>  });<br><br>  console.log(&#39;Post created successfully!&#39;);<br>})();</pre><p>By following these steps, you can efficiently convert HTML content — including images — into Sanity’s block content format. This makes it easier to migrate or import existing content into your Sanity.io projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3902cd8ffcec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Veil: Unveiling Transparency in Iran’s Cryptocurrency Market with Iran Crypto Market]]></title>
            <link>https://davodm.medium.com/beyond-the-veil-unveiling-transparency-in-irans-cryptocurrency-market-with-iran-crypto-market-669affd3233b?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/669affd3233b</guid>
            <category><![CDATA[market]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[iran]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[transparency]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Tue, 19 Mar 2024 09:27:08 GMT</pubDate>
            <atom:updated>2024-03-19T09:47:29.222Z</atom:updated>
            <content:encoded><![CDATA[<p>For over a decade, trading a diverse array of cryptocurrencies in Iran, I consistently encountered a significant gap — a reliable tool to observe, monitor, and track the exchanges. This gap made it challenging to assess their credibility and understand their transactions, fostering an atmosphere of uncertainty and distrust.</p><p>In light of the financial sanctions imposed on Iran, international cryptocurrency exchanges face restrictions that prevent them from serving Iranian users. Consequently, between 2017 and 2019, a significant number of local websites and platforms emerged to fill this void in the cryptocurrency market. However, these platforms operate in isolation, akin to secluded islands, where visibility into their operations, user reactions, and the overall functioning of exchanges remains obscured, creating a landscape of uncertainty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3HvjuzW6dqFzIxC_NWy5Hg.png" /></figure><p>This challenge inspired an innovative solution, born from the creation of the “<a href="https://irancrypto.market/">Iran Crypto Market</a>” project. This initiative has significantly illuminated the cryptocurrency landscape in Iran by enabling the tracking of transaction volumes and insights into the most frequently traded coins/tokens. It offers a deep dive into market dynamics through an analysis of users’ reactions to varying conditions. Most importantly, by shedding light on transactions, the Iran Crypto Market facilitates the assessment of platforms’ credibility, evaluating them based on their historical performance and behaviour.</p><p>At Iran Crypto Market, we prioritize delivering real-time insights into the cryptocurrency market. By continuously monitoring exchange transactions, we provide our users with the latest and most accurate pricing information for an extensive range of coins and tokens. This immediate access to data aids our audience in making well-informed decisions, allowing them to identify the most affordable rates for cryptocurrencies like Bitcoin and Ethereum, and compare these with global prices. Additionally, our platform features a <a href="https://irancrypto.market/popular/">popular page</a> that showcases a dynamic list of the most traded cryptocurrencies in Iran, keeping our users abreast of current market trends and preferences.</p><h3>Iran Crypto Market on Twitter: &quot;🌐 Discover the heart of digital finance in #Iran!Whether you&#39;re an investor, enthusiast, or just crypto-curious, this is your gateway to understanding the pulse of Iran&#39;s crypto ecosystem. Watch, learn, and connect with the future of finance.https://t.co/i44Ep7B8u2 pic.twitter.com/0MbpZTFkrj / Twitter&quot;</h3><p>🌐 Discover the heart of digital finance in #Iran!Whether you&#39;re an investor, enthusiast, or just crypto-curious, this is your gateway to understanding the pulse of Iran&#39;s crypto ecosystem. Watch, learn, and connect with the future of finance.https://t.co/i44Ep7B8u2 pic.twitter.com/0MbpZTFkrj</p><p>To further support the ecosystem, Iran Crypto Market offers a <a href="https://irancrypto.market/api/">comprehensive API</a> tailored for developers, startups, media outlets, and businesses. This API delivers a wealth of data, including detailed information on exchanges, individual coins, pricing, and transaction activities. Designed to empower our professional stakeholders, it enables the creation of innovative applications and services, facilitating a deeper interaction with the cryptocurrency market. The API serves as a powerful tool for those looking to navigate the complexities of Iran’s unique cryptocurrency landscape, uncover hidden opportunities, and stay ahead of market trends.</p><p>Leveraging our comprehensive API, we’ve developed open-source tools that automate parts of our social media content creation with the help of AI, ensuring our audience stays informed with the latest market insights. Weekly recaps of coin performance and monthly overviews of exchange activities are shared on our Instagram page, while daily summaries keep our Telegram followers up-to-date. Additionally, we extend our reach to <a href="https://twitter.com/ircryptomarket">Twitter</a> (X), ensuring that our valuable data is accessible across a broad spectrum of platforms. This strategic distribution allows users to easily access up-to-the-minute market information, wherever they prefer to engage with us.</p><h3>Iran Crypto Market on Twitter: &quot;🔥Hot off the press! Top 3 #CryptoTrends in Iran over the last 24 hours: 1️⃣ Etherium Classic: Trading volume of 21.6Q IRR2️⃣ Ve Chain: Trading volume of 13.1Q IRR3️⃣ EOSIO: Trading volume of 9.4Q IRRStay tuned for more updates! 💰🚀#CryptoIran / Twitter&quot;</h3><p>🔥Hot off the press! Top 3 #CryptoTrends in Iran over the last 24 hours: 1️⃣ Etherium Classic: Trading volume of 21.6Q IRR2️⃣ Ve Chain: Trading volume of 13.1Q IRR3️⃣ EOSIO: Trading volume of 9.4Q IRRStay tuned for more updates! 💰🚀#CryptoIran</p><p>We have also implemented an innovative widget builder system designed specifically for developers and website/web app owners. This powerful tool facilitates the seamless integration of both global and local cryptocurrency data into their platforms. It enables end-users to effortlessly monitor prices, market flows, and transaction activities in real-time. By simplifying access to critical market data, our widget builder enhances user engagement and provides a more intuitive way for users to stay informed about the cryptocurrency market dynamics.</p><p>As we embark on this exciting journey with the Iran Crypto Market project, we stand just at the threshold of its potential. Our commitment to continuous improvement is fueled by your invaluable feedback and comments. Together, we can create a more transparent, informed, and vibrant cryptocurrency market in Iran.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=669affd3233b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The story of developing something on the edge of religion and tech in Iran: Nazri Yab]]></title>
            <link>https://davodm.medium.com/the-story-of-developing-something-on-the-edge-of-religion-and-tech-in-iran-nazri-yab-8e01de3b6733?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e01de3b6733</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[nazriyab]]></category>
            <category><![CDATA[iran]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 15:37:18 GMT</pubDate>
            <atom:updated>2023-08-02T16:35:57.900Z</atom:updated>
            <content:encoded><![CDATA[<p>It started with a tweet on November 24, 2011:</p><h3>DΔvod☠️ on Twitter: &quot;من یه ایده دارم روی گوگل مپ باید خونه ها رو با غذایی که میدن و اینکه در چه تاریخی میدن رو مارک کنیم تا دیتابیس خوبی ایجاد بشه اینجور مواقع / Twitter&quot;</h3><p>من یه ایده دارم روی گوگل مپ باید خونه ها رو با غذایی که میدن و اینکه در چه تاریخی میدن رو مارک کنیم تا دیتابیس خوبی ایجاد بشه اینجور مواقع</p><p>This sparked something in me once I realized it could solve an important problem — many people said it’s difficult to find or remember which places offer free meals, so this problem leads to more traffic, more fuel consumption, etc. I saw an opportunity to help address this issue.</p><h3><strong>What&#39;s Nazri?</strong></h3><p>The tradition of Nazri dates back centuries and exists across different cultures and religions. In Shiite Islam, it is a vow or commitment to carry out an act of charity, often by feeding the poor, in fulfilment of a demand.</p><p>In Iran over the past decade, these Nazri traditions have shifted from feeding the poor toward public acts of charity used for self-promotion. For example, during some Islamic mourning events, individuals or (semi) private groups now cook food and distribute it to crowds outside their homes.</p><p>Similarly, some set up tents on street corners to offer passersby free tea or juice.</p><h3><strong>Nazri Yab</strong></h3><p>I started a website called “Nazri Yab” (which means “Finding Nazri” in Farsi) by creating a crowdsourced database where people could submit locations of Nazri acts and pin them on a map. With the help of my friend Arman, a talented front-end developer, I was able to launch a basic version of the site within just 4 hours.</p><p>This platform enabled people to easily find Nazri events happening around them. To kickstart the data, I added some initial Nazri locations I knew about in my neighbourhood.</p><p>With the site launching close to Ashoura, an important day of charitable giving in Shiite Islam, the idea caught on rapidly. Within days, we had hundreds of submissions from people across the country.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ByRTs6xE4Og1a1PjdLgfWw.png" /><figcaption>Nazriyab website</figcaption></figure><h3><strong>Becoming popular</strong></h3><p>Within months, Nazri Yab took off beyond our expectations — from 1000 users on the first day to over 100,000 active users within a week. My friends contributed in different ways such as introduction videos, and technical stuff allowing us to scale.</p><p>The rapid growth soon attracted media attention. We did interviews with local newspapers, TV channels and were even featured in the <a href="https://www.washingtonpost.com/world/middle_east/iranians-relish-free-food-during-month-of-mourning/2012/12/03/1985ceb2-39f9-11e2-9258-ac7c78d5c680_story.html">Washington Post</a>. Many people <a href="https://twitter.com/search?q=%D9%86%D8%B0%D8%B1%DB%8C%20%DB%8C%D8%A7%D8%A8&amp;src=typed_query&amp;f=live">tweeted</a> about Nazri Yab, though some tweets expressed opposition to the cultural aims of the site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*cbFyvWEwNDlwUEFe" /><figcaption>I introduced our project on the State TV channel day after it was launched</figcaption></figure><p>Like every growth in Iran, we faced significant backlash, including from government-sponsored groups opposed to the site’s cultural aims to the governmental controlling approach. However, we overcame these challenges through perseverance and ingenuity.</p><p>We passed many different hard situations during this time:</p><ul><li>Website Blockage (2013)</li><li>Summons from the government authorities (2014)</li><li>Many threats from government-sponsored extremist groups (2013~2018)</li><li>Take over the domain (2017)</li></ul><p>But in any case, I was able to get out of these situations; of course, with monetary and spiritual costs.</p><h3>Forced sunset</h3><p>After years of harassment and serious threats with accusations that could have severe consequences for myself and others involved. Fearing for our safety, we made the difficult decision to step away from Nazri Yab without fully shutting it down.</p><p>While disheartening, the experience inspired other public benefit projects. It showed us the power of online tools to drive change, even in the face of opposition. This sparked our launch of <a href="https://davodm.medium.com/darukhane-yab-scracting-to-launch-6ec05bc48512">Darukhane Yab</a> in 2021 — a service helping people find nearby pharmacies during COVID.</p><p>I remain hopeful that social impact initiatives like Nazri Yab can persevere in trying conditions. The journey was rewarding, enabling connections and shifting attitudes. Nazri Yab represents the resilience of the human spirit and technology’s potential to uplift communities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKKXGhHYBpVgJDP72Moe_w.png" /><figcaption>Application installation stats</figcaption></figure><h3>Time to say goodbye</h3><p>After much deliberation, we have made the difficult decision to permanently shut down Nazri Yab, effective today. The costs of keeping the platform updated and running smoothly have become prohibitively high for our small team and the project is outdated and is not useful like the past and Iran’s society is changing.</p><p>We want to thank the thousands of users who made Nazri Yab such a vibrant community and powerful force for social good in Iran. Your passion and resilience were an inspiration. Nazri Yab represented the ability of technology to empower people and strengthen communities.</p><p>While we are saddened to see it go, we know Nazri Yab sparked change that will endure. Its legacy lives on through the connections formed and attitudes shifted.</p><p>Thank you for being part of this journey. We hope our paths cross again in future initiatives to drive positive change.</p><p>While disheartening, shutting down Nazri Yab closes a meaningful chapter in our work empowering communities through technology. We remain committed to this mission.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e01de3b6733" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Tiny Tiny RSS on a shared host]]></title>
            <link>https://davodm.medium.com/install-tiny-tiny-rss-on-a-shared-host-d013a83ffec5?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d013a83ffec5</guid>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Thu, 27 Apr 2023 16:14:45 GMT</pubDate>
            <atom:updated>2023-04-27T16:14:45.402Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are considering using TT-RSS for small-scale feed reading and don’t want to pay for a VPS, there’s a deprecated way of installing it on a shared host (like cPanel) which is working.</p><p>In this article, I tried to simplify the whole steps on <a href="https://tt-rss.org/wiki/InstallationNotesHost">tt-RSS wiki</a> into an article.</p><h3>1. Dependencies:</h3><p>You need to ensure that you are using PHP 7.1+ with these extensions:</p><ul><li>JSON</li><li>XML</li><li>Internationalization (intl)</li><li>mbstring</li><li>fileinfo</li><li>curl</li><li>pdo_mysql</li><li>posix</li><li>gd</li><li>opcache</li></ul><h3>2. Upload the latest version:</h3><p>In order to use the latest version, just clone the repo and make a zip file to upload the project on your host.</p><pre>git clone https://git.tt-rss.org/fox/tt-rss.git tt-rss</pre><h3>3. Make the config file</h3><p>Rename config.php-dist to config.php and define these values:</p><pre>putenv(&#39;TTRSS_DB_HOST=dbhost&#39;);<br>putenv(&#39;TTRSS_DB_NAME=dbname&#39;);<br>putenv(&#39;TTRSS_DB_USER=dbuser&#39;);<br>putenv(&#39;TTRSS_DB_PASS=dbpassword&#39;);<br>putenv(&#39;TTRSS_DB_TYPE=MYSQL&#39;);<br>putenv(&#39;TTRSS_DB_PORT=3306&#39;);<br>putenv(&quot;TTRSS_SESSION_COOKIE_LIFETIME=&#39;2592000&#39;&quot;);<br>putenv(&#39;TTRSS_SELF_URL_PATH=https://example.com/feedreader/&#39;);<br>putenv(&#39;TTRSS_PHP_EXECUTABLE=/path/to/php-cli-binary&#39;); # normally something like /usr/bin/php</pre><h3>4. Create the database scheme</h3><p>Since normally we can’t access shared hosting SSH, then create a cronjob to run the CLI command and then remove it.</p><pre>*/5 * * * * /usr/bin/php /path/to/tt-rss/update.php --update-schema</pre><h3>5. Setup Cronjob</h3><p>To update the feed we need to call update script regularly, which could be setup through cronjob:</p><pre>*/30 * * * * /usr/bin/php /path/to/tt-rss/update.php --feeds --quiet</pre><p><strong>Note</strong>: /usr/bin/php should be replaced with the correct path to PHP CLI binary on your hosting system which is displayed in the cronjob section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seV8YwlOSqxowg6lnPPwRQ.png" /></figure><h3>6. Secure your tt-RSS</h3><p>In order to secure the cache folder and config file you need to create .htaccess file inside the root folder of tt-RSS that contains:</p><pre>&lt;Directory ./cache&gt;<br>    Require all denied<br>&lt;/Directory&gt;<br><br>&lt;Directory ./&gt;<br>    &lt;Files &quot;config.php&quot;&gt;<br>        Require all denied<br>    &lt;/Files&gt;<br>&lt;/Directory&gt;</pre><p>Now you can login with a predefined username adminand password password, Remember to change your initialized password after the first login.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d013a83ffec5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to install Sentry on AWS EC2?]]></title>
            <link>https://davodm.medium.com/how-to-install-sentry-on-aws-ec2-3dc3e08c7ba3?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dc3e08c7ba3</guid>
            <category><![CDATA[sentry]]></category>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 17:26:26 GMT</pubDate>
            <atom:updated>2023-02-25T11:45:13.998Z</atom:updated>
            <content:encoded><![CDATA[<p>Sentry is an open-source full-stack error tracking system which supports a wide range of platforms. Since it is an open-source system, the code is available online to deploy on your own infrastructure.</p><p>To have your own on-premise Sentry on Amazon you can do these wizard steps:</p><h3>1. Create your instance on EC2</h3><p>Create an Instance EC2 with this configuration:</p><ul><li>OS: Ubuntu 22</li><li>Type: T2.Large</li><li>HDD: 40 GB gp3</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*r1DeK4EbwwIlzxq0SgFNUw.png" /></figure><h3>2. Install Requirements</h3><p>Start by installing the packages that is required to install docker with the following command:</p><pre>$ sudo apt update &amp;&amp; upgrade</pre><pre>$ sudo apt install apt-transport-https ca-certificates curl software-properties-common</pre><h3>3. Install Docker</h3><p>Add Docker’s GPG key by downloading it with the following command:</p><pre>$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</pre><p>Then, add the Docker repository with the following command:</p><pre>$ sudo add-apt-repository &quot;deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable&quot;</pre><pre>$ sudo apt-cache policy docker-ce</pre><pre>$ sudo apt update</pre><pre>$ sudo apt install docker-ce</pre><p>Start and check the status of docker with the following command.</p><pre>$ sudo systemctl start docker<br>$ sudo systemctl status docker</pre><p>You can confirm the installation with the version command.</p><pre>$ docker version</pre><h3>4. Install docker-compose</h3><pre>$ sudo curl -L &quot;<a href="https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname">https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname</a> -s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose<br><br>$ sudo chmod +x /usr/local/bin/docker-compose</pre><p>Verify your installation by this command:</p><pre>$ docker-compose --version</pre><h3>5. Get Sentry Package</h3><pre>$ cd /home/<br>$ git clone https://github.com/getsentry/self-hosted sentry<br>$ cd sentry/</pre><h3>6. Edit config files</h3><p>Before installing Sentry you should edit the pre-config files which are two: <strong>config.yml </strong>and<strong> sentry.conf.py which is more advanced.</strong></p><pre>$ nano ./sentry/config-sample.yml</pre><ul><li><strong>mail.*</strong> configuration to send email through SMTP</li><li><strong>system.secret-key</strong> by adding a solid secret string</li></ul><p>Also, editing sentry.conf.py:</p><pre>$ nano ./sentry/sentry.conf.py</pre><ul><li><strong>SENTRY_OPTIONS[“mail.from”]</strong> you can change from email address variable</li><li>or you can set your domain name instead of “localhost” in <strong>SENTRY_OPTIONS[“mail.list-namespace”]</strong></li></ul><p>By default Sentry will use port 9000 which we use on CloudFront, if you change the port number here, consider changing it on CloudFront too.</p><h3>7. Add GeoLite API database</h3><p>Sentry could work with GeoLite2 database, and you just need to create a file which contains user &amp; api key that could be retrieved through <a href="https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en">MaxMind</a> website and you can populate data by this command:</p><pre>$ sudo nano geoip/GeoIP.conf</pre><p>Put these data there and save it:</p><pre>AccountID HereisYourAccountID<br>LicenseKey HereisYourLicenseKey<br>EditionIDs GeoLite2-City</pre><h3>8. Install sentry</h3><pre>$ cd /sentry/<br>$ ./install.sh</pre><p>During the installation, you should enter your email and password to set up an admin account.</p><h3>9. Set the alias for sentry</h3><pre>$ alias sentry=&quot;docker-compose run --rm web&quot;</pre><p>Then you can run other commands for sentry directly, like:</p><pre>$ sentry createuser</pre><p>Also, you can change the config files after installation and run docker-compose again.</p><pre>$ docker-compose up -d</pre><h3>10. Setup a CloudFront distribution</h3><p>Create a distribution with you EC2 domain address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*axS4S97ZNhCoLBq_go0iLQ.png" /></figure><p>and these configurations on Default cache behavior:</p><ul><li>Cache policy — Legacy: Headers/Query Strings/Cookies: All</li><li>Allowed HTTP Methods: GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE</li><li>Viewer protocol policy: HTTPS Only</li><li>Compress objects automatically: No</li></ul><p>That’s all, then you can complete the web installation wizard with your CloudFront URL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dc3e08c7ba3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enrich your logging on Codeigniter 4 with Sentry]]></title>
            <link>https://davodm.medium.com/enrich-your-logging-on-codeigniter-4-with-sentry-6010b7a34fc9?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6010b7a34fc9</guid>
            <category><![CDATA[codeigniter]]></category>
            <category><![CDATA[sentry]]></category>
            <category><![CDATA[composer]]></category>
            <category><![CDATA[codeigniter-4]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Thu, 14 Jul 2022 21:57:57 GMT</pubDate>
            <atom:updated>2022-07-23T22:02:53.191Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are a developer probably you know about Sentry. But as far as there isn’t any document about implementation on Codeigniter 4 here we go:</p><ol><li>Installing sentry SDK through composer:</li></ol><pre>composer require sentry/sdk</pre><p>2. Add a new event with this code at the end of the file /app/Config/Events.php:</p><pre>Events::<em>on</em>(&#39;post_controller_constructor&#39;, function () {<br>    \Sentry\init([<br>    &#39;dsn&#39; =&gt; &#39;https://3a19161981ca4b3e97216be79b6f5f3b@sentry.dgtteam.com/4&#39; ,<br>    &#39;environment&#39; =&gt; <em>ENVIRONMENT</em>,<br>    &#39;traces_sample_rate&#39; =&gt; (<em>ENVIRONMENT </em>=== &#39;development&#39;) ? 1.0 : 0.2,<br>    &#39;release&#39; =&gt; &#39;ci@1.0.0&#39;,<br>    &#39;server_name&#39;=&gt;$_SERVER[&#39;SERVER_NAME&#39;]<br>]);<br>\Sentry\captureLastError();</pre><pre>});</pre><p><strong>post_controller_contructor</strong> is a type called immediately after your controller is instantiated.</p><p>You can add other configuration attributes to your code.</p><p>Note that you can also capture or flag in your code, even after setting the event.</p><pre>try {<br>    $this-&gt;functionFailsForSure();<br>} catch (\Throwable $exception) {<br>    \Sentry\captureException($exception);<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6010b7a34fc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Darukhane Yab — Scracting to launch]]></title>
            <link>https://davodm.medium.com/darukhane-yab-scracting-to-launch-6ec05bc48512?source=rss-83905f8712b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ec05bc48512</guid>
            <category><![CDATA[iran]]></category>
            <category><![CDATA[application-development]]></category>
            <category><![CDATA[drugstore]]></category>
            <category><![CDATA[darukhaneyab]]></category>
            <category><![CDATA[darukhane]]></category>
            <dc:creator><![CDATA[Davod]]></dc:creator>
            <pubDate>Fri, 05 Mar 2021 18:03:04 GMT</pubDate>
            <atom:updated>2021-03-07T09:46:25.715Z</atom:updated>
            <content:encoded><![CDATA[<h3>Darukhane Yab — Scracting to launch</h3><p>It has been almost a decade since I launched a public benefit service named “<a href="https://nazriyab.app/">Nazri Yab</a>” (Means “Free food finder”). I think it’s enough time for a person to gain many experiences and so many up and down on the road.</p><p>On the 10th birthday of “Nazri Yab”, I’m looking forward to introducing my new idea, which is concurred by Covid-19 pandemic situation around the world. This idea is coming from a simple need:</p><blockquote>Finding pharmacy and easy access to medicine’s information.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*RGV0FgkEM8sDZUKl2QVikw.png" /></figure><p>Unlike “NazriYab” which was a simple and user-centric based project, “<a href="https://darukhane.app/">Darukhane Yab</a>” started with independently processed data, which we will make a procedure for user’s data to be processed and merged in the future. Also, for implementing “DarukhaneYab”, We needed to gather enough accurate information about all the pharmacies around the country (Iran); This procedure was a time-consuming and valuable part of the project.</p><p>On the other hand, by using 10 years’ experience in managing different online products and user-centric projects, we tried our best to introduce the perfect and flawless product with perfect quality of user experience and complete trusted data.</p><h3>Darukhane Yab Challenges</h3><p>“Darukhane Yab” has three different parts; medicines, pharmacies, and Covid-19 information.</p><p>One of the most important parts of Darukhane Yab project was gathering information about all the pharmacies, their locations, and validating their data. This procedure is never done on any website or application, and none of them has a wide range of information (more than 7000 pharmacies) like Darukhane Yab.</p><p>The next step is providing complete and accurate information on medicines; besides many medicines databases, we make a comprehensive information database of common medicines in Iran with more than 1K validated information, which gives exact and complete information to the users.</p><p>For making this kind of product, I needed to use intelligence and précis people’s ability so the result will be close to that perfect plan that I had in my mind. For this purpose, we divide the project into some parts, which be handled by our team members. My team is as important as the project idea itself, so I want to introduce them specifically.</p><p><strong>Mobile Application — Parham Soltani</strong></p><p>Parham is one of the most talented people with who I’ve been working with him more than 10 years now on different projects. High-level knowledge and using the newest methods in the world make the application one of the best Persian apps.</p><p><strong>User Interface Designer — Amin Najafi</strong></p><p>Designing the idea which was in our mind was a difficult job to do. But Amin could convince the team by his intelligence and using all the important points of user experience in designing, and now after executing the project, the most important part of “Darukhane Yab” quality is the result of his special look and foresight.</p><p><strong>Collecting Data — Mohamadreza Ghorbanali</strong></p><p>Our information database and all of the information in this project is owed to Mohamadreza as a data collector who could gather information with his intelligence from any possible places. For data validation, we introduce another project which confirms every medicine and pharmacy information on different databases to help us to be sure about the accuracy and correctness of our data.</p><p><strong>Marketing — Setayesh Mehdizadeh</strong></p><p>Any idea implantation needs processing, and besides quality and presented possibilities, it needs to have a good connection with users and customers to help it be promoted. The idea of growth, maturity, and “Darukhane Yab” success owes Setayesh.</p><p><strong>Data Processing — Melika Minaei</strong></p><p>Melika is the youngest talented member of our team who, with her fast learning and her high accuracy in performance is the executive arm of the project information database. She helps to validate the information on both medicines and pharmacies. The correctness of this data and information is essential because many people will have access to them.</p><p>For me, “Darukhane Yab” or “<a href="https://darukhane.app/">Darukhaneh Yab</a>” (both used in Farsi, means “Drugstore/Pharmacy finder”) is one the most attractive project that I’ve been worked on. Besides working remotely with team members, we had many challenges on the way of implantation. Working with a volunteer and talented team on a public benefit service that is useful for most of the society is the real meaning of being successful.</p><p>If you have an android device, you can download the application through <a href="https://play.google.com/store/apps/details?id=com.dgtteam.darukhane">Google Play</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ec05bc48512" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>