<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jonatã Oliveira</title>
    <description>The latest articles on Forem by Jonatã Oliveira (@jxnata).</description>
    <link>https://forem.com/jxnata</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1857820%2Fd9b9c6f8-5c3a-4c24-beeb-4c73828eba5c.jpg</url>
      <title>Forem: Jonatã Oliveira</title>
      <link>https://forem.com/jxnata</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jxnata"/>
    <language>en</language>
    <item>
      <title>I built a romantic app to surprise my wife. See what I learned from it.</title>
      <dc:creator>Jonatã Oliveira</dc:creator>
      <pubDate>Mon, 29 Dec 2025 15:26:37 +0000</pubDate>
      <link>https://forem.com/jxnata/i-built-a-romantic-app-to-surprise-my-wife-see-what-i-learned-from-it-16b2</link>
      <guid>https://forem.com/jxnata/i-built-a-romantic-app-to-surprise-my-wife-see-what-i-learned-from-it-16b2</guid>
      <description>&lt;p&gt;A few months ago, I wanted to surprise my wife with something more meaningful than just a message, flowers, or a generic gift. &lt;/p&gt;

&lt;p&gt;As a developer, I thought, "&lt;em&gt;What if I build something?&lt;/em&gt;" &lt;/p&gt;

&lt;p&gt;That idea turned into &lt;a href="https://lovememo.app" rel="noopener noreferrer"&gt;LoveMemo&lt;/a&gt;, a mobile app that lets you create a romantic public page filled with photos, music, a personal message, a relationship timer, and a QR code to reveal the surprise. &lt;/p&gt;

&lt;p&gt;This post is not about "how to get rich with apps." It's about building a product from start to finish, from idea to App Store, and the technical choices I made.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Original Idea (and the Pivot)
&lt;/h2&gt;

&lt;p&gt;LoveMemo didn't start as a romantic app. &lt;/p&gt;

&lt;p&gt;At first, it was a photo-sharing app for events like weddings and parties, where people could upload photos using QR codes. The technology worked, but something felt off:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There was low emotional attachment. &lt;/li&gt;
&lt;li&gt;It was hard to stand out.&lt;/li&gt;
&lt;li&gt;Storing many files is expensive.&lt;/li&gt;
&lt;li&gt;Users had weak motivation to pay. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I created a romantic page to surprise my wife using the same core idea of QR to public page, everything clicked. &lt;/p&gt;

&lt;p&gt;The tech was the same, but the emotional value was completely different. &lt;/p&gt;

&lt;p&gt;That's when I decided to change the product, not the tech stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  High-Level Architecture
&lt;/h2&gt;

&lt;p&gt;LoveMemo has two main parts:&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobile App (React Native / Expo)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Guides users step-by-step. &lt;/li&gt;
&lt;li&gt;Handles photos, messages, music, and payments. &lt;/li&gt;
&lt;li&gt;Generates the "memo." &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Public Romantic Page (&lt;a href="https://lovememo.app" rel="noopener noreferrer"&gt;lovememo.app&lt;/a&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A lightweight, cinematic page. &lt;/li&gt;
&lt;li&gt;Loads by ID shared through a link or QR code. &lt;/li&gt;
&lt;li&gt;Optimized for emotion, not interaction. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation was intentional:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The app focuses on creation. &lt;/li&gt;
&lt;li&gt;The website focuses on experience. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Mobile App Stack
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Core
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;React Native (Expo) &lt;/li&gt;
&lt;li&gt;TypeScript &lt;/li&gt;
&lt;li&gt;Expo Router for navigation &lt;/li&gt;
&lt;li&gt;Zustand for state management &lt;/li&gt;
&lt;li&gt;MMKV for fast local drafts&lt;/li&gt;
&lt;li&gt;InstantDB for authentication and database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast iteration &lt;/li&gt;
&lt;li&gt;One codebase &lt;/li&gt;
&lt;li&gt;Zero friction for publishing updates &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Expo provided exactly that. &lt;/p&gt;

&lt;h3&gt;
  
  
  UI &amp;amp; Animations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;NativeWind (Tailwind for RN) &lt;/li&gt;
&lt;li&gt;React Native Reanimated &lt;/li&gt;
&lt;li&gt;Soft shadows, rounded corners, and a pink-based color scheme. &lt;/li&gt;
&lt;li&gt;Decorative 3D-like elements (visual only, no heavy meshes)&lt;/li&gt;
&lt;li&gt;Liquid Glass (ah yes, that's beautiful) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The UI was very important. If it doesn't &lt;strong&gt;feel romantic&lt;/strong&gt;, the product fails. &lt;/p&gt;

&lt;h3&gt;
  
  
  Media Handling
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;expo-image-picker &lt;/li&gt;
&lt;li&gt;Local previews &lt;/li&gt;
&lt;li&gt;Upload only after payment to prevent waste &lt;/li&gt;
&lt;li&gt;Background music via YouTube link (managed on the web side) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Drafts are saved locally, so users can leave and come back later. &lt;/p&gt;

&lt;h3&gt;
  
  
  Payments
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feien7413p774y3tl909d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feien7413p774y3tl909d.png" alt="App payment screen" width="800" height="1333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I kept the pricing model simple: &lt;em&gt;One-time purchase for one romantic page, active for a month&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;I also removed every possible friction point related to payments. No payment screen, credit card form or checkout flow. The user doesn't even need to create an account to publish their memo. LoveMemo uses In-App Purchases, so payment happens with a single tap using &lt;strong&gt;Apple Pay&lt;/strong&gt; or &lt;strong&gt;Google Pay&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Public Romantic Website
&lt;/h2&gt;

&lt;p&gt;The public page is built with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vite + React (with SSG to improve SEO)&lt;/li&gt;
&lt;li&gt;TailwindCSS&lt;/li&gt;
&lt;li&gt;Framer Motion for animations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Displays the couple's names&lt;/li&gt;
&lt;li&gt;Shows a relationship timer&lt;/li&gt;
&lt;li&gt;Plays background music&lt;/li&gt;
&lt;li&gt;Animates photos in a cinematic slideshow&lt;/li&gt;
&lt;li&gt;Ends with a personal love message&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's intentionally simple from a technical standpoint but visually rich.&lt;/p&gt;

&lt;p&gt;Performance matters because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Users often access it by scanning a QR code.&lt;/li&gt;
&lt;li&gt;The "wow moment" must be instant.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  QR Code as a Product Feature
&lt;/h2&gt;

&lt;p&gt;One of the best decisions was to make the QR card a key feature.&lt;/p&gt;

&lt;p&gt;Instead of just saying "share this link," the app generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A printable and shareable card&lt;/li&gt;
&lt;li&gt;A QR code&lt;/li&gt;
&lt;li&gt;A short romantic message&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This transforms a digital product into something physical, which greatly increases its perceived value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Launch &amp;amp; Marketing
&lt;/h2&gt;

&lt;p&gt;I didn't start with ads.&lt;/p&gt;

&lt;p&gt;I focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TikTok organic videos&lt;/li&gt;
&lt;li&gt;Product-led storytelling&lt;/li&gt;
&lt;li&gt;Showing the reaction, not the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The typical flow in videos:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Screen recording of the app&lt;/li&gt;
&lt;li&gt;Showing the QR card&lt;/li&gt;
&lt;li&gt;Scanning it&lt;/li&gt;
&lt;li&gt;Revealing the romantic page&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;People don't care about features, they care about outcomes.&lt;/p&gt;

&lt;h2&gt;
  
  
  App Store Optimization (ASO)
&lt;/h2&gt;

&lt;p&gt;ASO turned out to be more important than I expected.&lt;/p&gt;

&lt;p&gt;Key lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A clear title is better than a clever one.&lt;/li&gt;
&lt;li&gt;Keywords matter more than the description.&lt;/li&gt;
&lt;li&gt;Emotional screenshots work better than feature screenshots.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also localized the store description in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;English&lt;/li&gt;
&lt;li&gt;Portuguese&lt;/li&gt;
&lt;li&gt;Spanish&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'd Do Differently
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I would validate the emotional angle earlier.&lt;/li&gt;
&lt;li&gt;I would avoid building features without a strong reason.&lt;/li&gt;
&lt;li&gt;I would spend more time on the first 10 seconds of the experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pivot taught me that distribution and emotion are as important as the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://lovememo.app" rel="noopener noreferrer"&gt;LoveMemo&lt;/a&gt; started as a personal surprise and evolved into a product.&lt;/p&gt;

&lt;p&gt;The technology wasn't groundbreaking. The idea wasn't complex.&lt;/p&gt;

&lt;p&gt;But combining:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A clear emotional goal&lt;/li&gt;
&lt;li&gt;Simple architecture&lt;/li&gt;
&lt;li&gt;Strong user experience&lt;/li&gt;
&lt;li&gt;Focused marketing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…made all the difference. &lt;/p&gt;

&lt;p&gt;If you're building something, ask yourself, &lt;strong&gt;"Why would someone care about this?"&lt;/strong&gt; That answer is usually more crucial than the tech stack. &lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>mobile</category>
      <category>ux</category>
      <category>ui</category>
    </item>
    <item>
      <title>How I Built and Launched an AI-Powered SaaS in 10 Days with Minimal Effort</title>
      <dc:creator>Jonatã Oliveira</dc:creator>
      <pubDate>Wed, 19 Mar 2025 18:34:29 +0000</pubDate>
      <link>https://forem.com/jxnata/how-i-built-and-launched-an-ai-powered-saas-in-10-days-with-minimal-effort-1j1g</link>
      <guid>https://forem.com/jxnata/how-i-built-and-launched-an-ai-powered-saas-in-10-days-with-minimal-effort-1j1g</guid>
      <description>&lt;h2&gt;
  
  
  The Challenge: Building a Mobile SaaS—Fast
&lt;/h2&gt;

&lt;p&gt;As an indie hacker, I’m always looking for ways to build and launch projects quickly. I had an idea for an AI-powered meal tracking app that could analyze food images and estimate calories, proteins, and other nutrients. But instead of spending months coding everything manually, I wanted to see how much I could leverage AI to accelerate the process. &lt;/p&gt;

&lt;p&gt;The goal was simple: launch a functional and monetizable SaaS in record time, with as little manual coding as possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tech Stack
&lt;/h2&gt;

&lt;p&gt;I used a modern stack optimized for fast development and scalability:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Expo (React Native)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Navigation:&lt;/strong&gt; expo-router&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend &amp;amp; Authentication:&lt;/strong&gt; Appwrite (Google &amp;amp; Apple Sign-In)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling:&lt;/strong&gt; NativeWind (Tailwind for React Native)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Localization:&lt;/strong&gt; expo-localization + i18next + react-i18next&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payments:&lt;/strong&gt; react-native-purchases (RevenueCat)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management:&lt;/strong&gt; Zustand&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Revalidation:&lt;/strong&gt; TanStack Query&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forms:&lt;/strong&gt; React Hook Form&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Requests:&lt;/strong&gt; Axios&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Storage:&lt;/strong&gt; MMKV&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ads:&lt;/strong&gt; react-native-google-mobile-ads&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The AI-Driven Development Workflow
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Generating the Base Project
&lt;/h3&gt;

&lt;p&gt;Instead of manually setting up the project structure, I wrote a detailed prompt describing the app and used &lt;strong&gt;bolt.new&lt;/strong&gt; to generate the initial codebase. I also included reference UI screenshots to guide the generation process. This alone saved hours of boilerplate coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: The Power of &lt;code&gt;context.md&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;One of the most critical steps in this process was creating a &lt;strong&gt;&lt;code&gt;context.md&lt;/code&gt;&lt;/strong&gt; file. This document contained all the details about the project—architecture, features, folder structure, and coding conventions. Every time I needed to add a new feature, I provided this file as context to AI tools like &lt;strong&gt;Cursor&lt;/strong&gt; and AI Agents, ensuring that the generated code followed the same patterns and structure.&lt;/p&gt;

&lt;p&gt;The more detailed &lt;strong&gt;&lt;code&gt;context.md&lt;/code&gt;&lt;/strong&gt; was, the better the AI-assisted development became. This approach helped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maintain consistency across the codebase.&lt;/li&gt;
&lt;li&gt;Reduce the need for manual refactoring.&lt;/li&gt;
&lt;li&gt;Speed up feature implementation significantly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: AI-Assisted Iterations
&lt;/h3&gt;

&lt;p&gt;Once I had the base project, I used &lt;strong&gt;Cursor&lt;/strong&gt; as my AI-powered IDE to fine-tune the app. Any time I needed to create new features, I asked AI agents to generate code while ensuring consistency by referencing &lt;strong&gt;&lt;code&gt;context.md&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This approach allowed me to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quickly scaffold new screens and components.&lt;/li&gt;
&lt;li&gt;Maintain a consistent coding style across the project.&lt;/li&gt;
&lt;li&gt;Avoid repetitive tasks and focus on refining user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: Automating Marketing &amp;amp; Copywriting
&lt;/h3&gt;

&lt;p&gt;I didn’t stop at development—AI also helped with marketing. Using AI tools, I generated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;App Store &amp;amp; Play Store descriptions&lt;/strong&gt; (optimized for ASO).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Launch texts for ProductHunt &amp;amp; Reddit&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Social media posts for Twitter (X).&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TikTok video scripts to promote the app.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This meant I could focus on shipping while still ensuring the app had a strong launch strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Outcome
&lt;/h2&gt;

&lt;p&gt;With AI handling around &lt;strong&gt;80% of the development and marketing work&lt;/strong&gt;, I was able to:&lt;br&gt;
✅ Build a working prototype in just a few days.&lt;br&gt;
✅ Integrate payments &amp;amp; gamification to make the app engaging and profitable.&lt;br&gt;
✅ Launch the app without hiring a team or spending months coding manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned &amp;amp; Key Takeaways
&lt;/h2&gt;

&lt;p&gt;1️⃣ &lt;strong&gt;AI doesn’t replace developers, but it massively speeds up the process.&lt;/strong&gt; Instead of writing every line of code, I focused on orchestrating AI-generated components.&lt;/p&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Good prompts are essential.&lt;/strong&gt; The more detailed my instructions, the better the AI-generated output.&lt;/p&gt;

&lt;p&gt;3️⃣ &lt;strong&gt;A well-structured &lt;code&gt;context.md&lt;/code&gt; file is a game changer.&lt;/strong&gt; The more information it contains, the more consistent and efficient the AI-generated code becomes.&lt;/p&gt;

&lt;p&gt;4️⃣ &lt;strong&gt;AI-assisted marketing is a game changer.&lt;/strong&gt; Writing store descriptions, social media content, and launch posts took minutes instead of hours.&lt;/p&gt;

&lt;p&gt;5️⃣ &lt;strong&gt;Fast execution beats perfection.&lt;/strong&gt; The app isn’t “perfect,” but it’s live, and that’s what matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This experiment proved that launching a SaaS doesn’t have to take months (or even weeks). With AI tools, indie hackers can move faster than ever, reducing both cost and time-to-market. &lt;/p&gt;

&lt;p&gt;I’d love to hear from others: Have you used AI to accelerate your development process? What’s your experience been like?&lt;/p&gt;

&lt;p&gt;🚀 Let’s discuss in the comments!&lt;/p&gt;

&lt;p&gt;👉 Try the app: &lt;a href="https://apps.apple.com/us/app/nutriai-smart-nutrition-guide/id6742901094" rel="noopener noreferrer"&gt;NutriAI on the App Store&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>mobile</category>
      <category>reactnative</category>
      <category>ai</category>
    </item>
    <item>
      <title>You can't generate a BTC wallet, they all already exists</title>
      <dc:creator>Jonatã Oliveira</dc:creator>
      <pubDate>Wed, 31 Jul 2024 10:45:35 +0000</pubDate>
      <link>https://forem.com/jxnata/you-cant-generate-a-btc-wallet-they-all-already-exists-2dn1</link>
      <guid>https://forem.com/jxnata/you-cant-generate-a-btc-wallet-they-all-already-exists-2dn1</guid>
      <description>&lt;p&gt;Have you ever wondered how Bitcoin wallets work? It might sound mysterious, but it's actually quite fascinating and surprisingly simple once you get the hang of it. Let's dive into the magic behind Bitcoin wallets and discover why they’re so secure.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Big Secret: A Really, Really Big Number
&lt;/h3&gt;

&lt;p&gt;At the heart of every Bitcoin wallet is a &lt;strong&gt;private key&lt;/strong&gt;. Think of this private key as a secret password that gives you access to your Bitcoin. But here's the kicker: this "password" is actually just a really, really big number!&lt;/p&gt;

&lt;p&gt;Imagine picking a random number between 1 and... a ridiculously huge number (we're talking 10^77). This number is your private key. It’s so large that it's almost impossible to guess, making it super secure.&lt;/p&gt;

&lt;p&gt;Here an example of private key (decimal) and the code to generate:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;52147378319558728862623655427315561659185315407517972433517332038732568592384&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ECPairFactory&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ecpair&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;ecc&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tiny-secp256k1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ECPair&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ECPairFactory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ecc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;keypair&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ECPair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makeRandom&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;//734a5ec40d22bd022b4377e620880236681384f6c985a3b8b30031d316edef2f&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dec&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BigInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;16&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;//52147378319558728862623655427315561659185315407517972433517332038732568592384&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  From Numbers to Addresses: The Role of Elliptic Curves
&lt;/h3&gt;

&lt;p&gt;So, how does this enormous number (your private key) turn into something useful like a Bitcoin address? That's where elliptic curves come in. Bitcoin uses a special kind of math called &lt;strong&gt;elliptic curve cryptography&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An elliptic curve is a type of mathematical function that creates a specific shape when plotted on a graph. When you apply your big private key number to this function, it produces a unique point on the curve. This point is called your &lt;strong&gt;public key&lt;/strong&gt;. From the public key your bitcoin address is generated and you can receive values.&lt;/p&gt;

&lt;p&gt;In simpler terms, you use your private key (big number) to generate a public key using these math operations with elliptic curves. It’s like using a secret recipe to create a unique dish that only you can make.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wallets: Ready-Made and Just Waiting for You
&lt;/h3&gt;

&lt;p&gt;Here's a mind-blowing thought: all possible Bitcoin wallets already exist. Yes, you read that right! Every possible combination of private and public keys is already out there, just waiting for someone to pick one. When you create a new wallet, you're simply choosing one of these pre-existing combinations, randomly.&lt;/p&gt;

&lt;p&gt;In fact, there is even a website that lists all possible Bitcoin private keys, &lt;u&gt;&lt;strong&gt;including yours&lt;/strong&gt;:&lt;/u&gt;&lt;br&gt;
&lt;a href="https://privatekeys.pw/keys/bitcoin/1" rel="noopener noreferrer"&gt;https://privatekeys.pw/keys/bitcoin/1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But don’t worry, with so many possible combinations (remember that ridiculously huge number?), the chances of two people picking the same private key are astronomically low. It's like picking a specific atom in the entire universe!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A small and obvious note: &lt;strong&gt;DO NOT SEARCH FOR YOUR PRIVATE KEY ON THIS SITE&lt;/strong&gt;. You will lose your funds if you do.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why Bitcoin is Super Secure
&lt;/h3&gt;

&lt;p&gt;So, why is Bitcoin so secure? It all comes down to the size of that private key number. With such an enormous range of possible numbers, guessing the right private key is practically impossible. It would take a computer longer than the age of the universe to randomly guess your private key.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Bitcoin wallets might sound complicated, but at their core, they're based on some simple and clever math. Your private key is just a huge number, and it’s used to generate a unique public key through elliptic curve operations.&lt;/p&gt;

&lt;p&gt;And remember, all Bitcoin wallets already exist; you're just choosing one out of an unfathomably large number of possibilities. This incredible number is what makes Bitcoin so secure and reliable.&lt;/p&gt;

&lt;p&gt;So next time you open your Bitcoin wallet, you can smile knowing the incredible math and cryptography that keeps your funds safe. 🚀🔒&lt;/p&gt;

</description>
      <category>bitcoin</category>
      <category>blockchain</category>
      <category>javascript</category>
      <category>security</category>
    </item>
    <item>
      <title>HTMX: Giving HTML Superpowers! 🚀✨</title>
      <dc:creator>Jonatã Oliveira</dc:creator>
      <pubDate>Tue, 30 Jul 2024 03:25:50 +0000</pubDate>
      <link>https://forem.com/jxnata/htmx-giving-html-superpowers-13pl</link>
      <guid>https://forem.com/jxnata/htmx-giving-html-superpowers-13pl</guid>
      <description>&lt;h2&gt;
  
  
  What is HTMX? 🤔
&lt;/h2&gt;

&lt;p&gt;Imagine if your HTML could do more than just sit there. Meet &lt;a href="https://htmx.org" rel="noopener noreferrer"&gt;htmx&lt;/a&gt;, the magic wand that lets you sprinkle AJAX, CSS Transitions, WebSockets, and Server-Sent Events directly into your HTML. No more boring, static pages!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why HTMX Rocks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simplicity:&lt;/strong&gt; Add interactivity without breaking a sweat (or writing tons of JavaScript).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency:&lt;/strong&gt; Less JavaScript = fewer bugs. Your future self will thank you!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive Enhancement:&lt;/strong&gt; Works with your current HTML setup. No need for a complete overhaul. Sweet! 🍬&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Catch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited Flexibility:&lt;/strong&gt; For super complex stuff, you might still need to call in the big guns (hello, JavaScript frameworks!).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smaller Community:&lt;/strong&gt; Not as many tutorials or StackOverflow answers. You might feel a bit lonely out there. 🌵&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Peek at HTMX in Action
&lt;/h2&gt;

&lt;p&gt;Check this out! With htmx, you can load content dynamically without writing a single line of JavaScript. Magic, right? 🎩✨&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Button that loads content from /hello endpoint --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;hx-get=&lt;/span&gt;&lt;span class="s"&gt;"/hello"&lt;/span&gt; &lt;span class="na"&gt;hx-target=&lt;/span&gt;&lt;span class="s"&gt;"#output"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Click me!&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Div where the content will be loaded --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"output"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Backend Magic with Express
&lt;/h2&gt;

&lt;p&gt;Here’s how you set up the &lt;code&gt;/hello&lt;/code&gt; endpoint in Express to return content for your HTMX-powered page. 🛠️✨&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Express setup&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;p&amp;gt;Hello from the server!&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Server running at http://localhost:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  My Two Cents
&lt;/h2&gt;

&lt;p&gt;HTMX is like HTML on steroids – super cool and definitely interesting. BUT, mixing front-end and back-end code can get messy. Think tangled earphones messy. For now, I prefer keeping my code clean and scalable with a clear separation. 💡 What do you think?&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;HTMX gives HTML some serious superpowers, making it a nifty tool for adding interactivity. Despite its charm, I still wouldn't use it for serious projects because mixing front-end and back-end code can harm readability and scalability. But hey, it's definitely worth a try if you're curious! 🌟&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>htmx</category>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
