<?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: Oathan Rex</title>
    <description>The latest articles on Forem by Oathan Rex (@oathanrex).</description>
    <link>https://forem.com/oathanrex</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%2F3672767%2F8b10a690-5ef8-4044-8cae-4e9f95287e03.png</url>
      <title>Forem: Oathan Rex</title>
      <link>https://forem.com/oathanrex</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oathanrex"/>
    <language>en</language>
    <item>
      <title>Building a Notion-Style Editor from Scratch with Modern Web Tech</title>
      <dc:creator>Oathan Rex</dc:creator>
      <pubDate>Thu, 08 Jan 2026 11:40:42 +0000</pubDate>
      <link>https://forem.com/oathanrex/building-a-notion-style-editor-from-scratch-with-modern-web-tech-1288</link>
      <guid>https://forem.com/oathanrex/building-a-notion-style-editor-from-scratch-with-modern-web-tech-1288</guid>
      <description>&lt;p&gt;Rich-text editors are everywhere — notes apps, documentation tools, knowledge bases.&lt;br&gt;&lt;br&gt;
Tools like Notion made block-based writing feel natural, flexible, and powerful.&lt;/p&gt;

&lt;p&gt;As an experiment (and learning project), I built a &lt;strong&gt;Notion-style rich text editor&lt;/strong&gt; using modern web technologies, focusing on &lt;strong&gt;clean UX, extensibility, and developer clarity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;GitHub Repo:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/oathanrex/notion-style-editor" rel="noopener noreferrer"&gt;https://github.com/oathanrex/notion-style-editor&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ What Is This Project?
&lt;/h2&gt;

&lt;p&gt;This project is a &lt;strong&gt;block-based rich text editor&lt;/strong&gt; inspired by Notion’s writing experience.&lt;/p&gt;

&lt;p&gt;It’s designed to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modular&lt;/li&gt;
&lt;li&gt;Extendable&lt;/li&gt;
&lt;li&gt;Easy to embed into other web apps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of being a monolithic editor, the goal was to keep the architecture flexible so new blocks, plugins, or behaviors can be added later.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Core Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧱 Block-Based Editing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Paragraphs, headings, lists, quotes&lt;/li&gt;
&lt;li&gt;Each piece of content is treated as a block&lt;/li&gt;
&lt;li&gt;Easy to reason about and extend&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✏️ Rich Text Formatting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Bold, italic, underline, inline code&lt;/li&gt;
&lt;li&gt;Keyboard shortcuts for fast writing&lt;/li&gt;
&lt;li&gt;Clean separation between content and UI&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚡ Slash (&lt;code&gt;/&lt;/code&gt;) Command Menu
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Quickly insert blocks and components&lt;/li&gt;
&lt;li&gt;Familiar Notion-style workflow&lt;/li&gt;
&lt;li&gt;Designed to be extensible&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎯 Design Goals
&lt;/h2&gt;

&lt;p&gt;When building this editor, I focused on a few core principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clarity over complexity&lt;/strong&gt;
No unnecessary abstractions or magic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensibility first&lt;/strong&gt;
Custom blocks and plugins should be easy to add.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Framework-friendly&lt;/strong&gt;
Can be adapted for React, Next.js, or Vanilla JS projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Good UX by default&lt;/strong&gt;
Keyboard-first, minimal UI, predictable behavior.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Tech Stack
&lt;/h2&gt;

&lt;p&gt;This project uses a modern but lightweight stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JavaScript (ES6+)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modular editor architecture&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Block-based content model&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CSS / utility-first styling (Tailwind-ready)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The editor is intentionally kept framework-agnostic so it can evolve in different directions.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Project Structure (High-Level)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
src/
├── components/     # UI (toolbars, menus)
├── editor/         # Core editor logic &amp;amp; block schema
├── plugins/        # Slash menu, shortcuts, extensions
├── utils/          # Helpers &amp;amp; shared logic
└── styles/         # Editor styling

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

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;Keeping responsibilities separated makes experimentation much easier.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔧 Getting Started
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
git clone https://github.com/oathanrex/notion-style-editor.git&lt;br&gt;
cd notion-style-editor&lt;br&gt;
npm install&lt;br&gt;
npm run dev&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;Open &lt;code&gt;http://localhost:3000&lt;/code&gt; to see the editor running locally.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What I Learned
&lt;/h2&gt;

&lt;p&gt;Building a rich-text editor teaches you a lot about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cursor and selection management&lt;/li&gt;
&lt;li&gt;Block vs inline content models&lt;/li&gt;
&lt;li&gt;Keyboard accessibility&lt;/li&gt;
&lt;li&gt;Balancing UX with technical constraints&lt;/li&gt;
&lt;li&gt;Designing systems meant to be extended later&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s a deceptively deep problem space.&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 Use Cases
&lt;/h2&gt;

&lt;p&gt;This editor can serve as a foundation for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Note-taking apps&lt;/li&gt;
&lt;li&gt;Documentation platforms&lt;/li&gt;
&lt;li&gt;Knowledge bases&lt;/li&gt;
&lt;li&gt;Blog CMS systems&lt;/li&gt;
&lt;li&gt;Internal tools&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🤝 Open Source &amp;amp; Contributions
&lt;/h2&gt;

&lt;p&gt;The project is open source and intentionally structured for experimentation.&lt;/p&gt;

&lt;p&gt;If you’d like to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add new block types&lt;/li&gt;
&lt;li&gt;Improve the slash menu&lt;/li&gt;
&lt;li&gt;Enhance accessibility&lt;/li&gt;
&lt;li&gt;Experiment with collaboration features&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to fork the repo or open a pull request.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/oathanrex/notion-style-editor" rel="noopener noreferrer"&gt;https://github.com/oathanrex/notion-style-editor&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you’re interested in editor architecture, block-based systems, or building complex UI tools from scratch, I’d love to hear your thoughts or feedback in the comments.&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>editor</category>
      <category>opensource</category>
      <category>frontend</category>
    </item>
    <item>
      <title>🐍 Building a Premium Snake Game with Vanilla JavaScript</title>
      <dc:creator>Oathan Rex</dc:creator>
      <pubDate>Thu, 08 Jan 2026 11:33:05 +0000</pubDate>
      <link>https://forem.com/oathanrex/building-a-premium-snake-game-with-vanilla-javascript-40pc</link>
      <guid>https://forem.com/oathanrex/building-a-premium-snake-game-with-vanilla-javascript-40pc</guid>
      <description>&lt;p&gt;Classic arcade games never die — they just evolve.&lt;/p&gt;

&lt;p&gt;I recently built a &lt;strong&gt;modern, polished Snake game&lt;/strong&gt; using nothing but &lt;strong&gt;HTML5, CSS3, and vanilla JavaScript&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
The goal was simple: keep the nostalgia, but add the kind of &lt;strong&gt;visual polish, responsiveness, and game feel&lt;/strong&gt; you’d expect from a premium browser game.&lt;/p&gt;
&lt;h2&gt;
  
  
  🎮 Play the Game
&lt;/h2&gt;

&lt;p&gt;👉 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://oathanrex.github.io/snake-game/" rel="noopener noreferrer"&gt;https://oathanrex.github.io/snake-game/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://oathanrex.github.io/snake-game/" rel="noopener noreferrer" class="c-link"&gt;
            Snake - Premium Edition | Play Free Online
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Classic Snake reinvented with stunning neon visuals, multiple modes, and smooth gameplay
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
          oathanrex.github.io
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;







&lt;h2&gt;
  
  
  ✨ What Makes This Snake Game Different
&lt;/h2&gt;

&lt;p&gt;This isn’t just another Snake clone. I focused heavily on &lt;strong&gt;responsiveness, clarity, and feedback&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔥 Core Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3 Game Modes&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Classic&lt;/li&gt;
&lt;li&gt;No Walls&lt;/li&gt;
&lt;li&gt;Obstacles&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;4 Difficulty Levels&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Easy, Normal, Hard, Insane&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Premium Visuals&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Neon glow effects&lt;/li&gt;
&lt;li&gt;Particle explosions&lt;/li&gt;
&lt;li&gt;Smooth canvas animations&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Mobile Support&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Swipe gestures&lt;/li&gt;
&lt;li&gt;On-screen touch controls&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Progressive Difficulty&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Speed increases as you level up&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Local High Scores&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Stored using LocalStorage&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  🕹️ Controls
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Controls&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Desktop&lt;/td&gt;
&lt;td&gt;Arrow Keys or WASD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mobile&lt;/td&gt;
&lt;td&gt;Swipe or Touch Buttons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pause&lt;/td&gt;
&lt;td&gt;ESC or P&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Input buffering is used so direction changes feel responsive even at higher speeds.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Tech Stack (No Frameworks)
&lt;/h2&gt;

&lt;p&gt;I intentionally avoided frameworks to keep the project lightweight and transparent.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTML5 Canvas&lt;/strong&gt; — rendering &amp;amp; animation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla JavaScript (ES6+)&lt;/strong&gt; — game logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS3&lt;/strong&gt; — UI, layout, glow effects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Audio API&lt;/strong&gt; — procedural sound effects&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No external dependencies&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚙️ Technical Highlights
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎨 High-DPI Canvas Rendering
&lt;/h3&gt;

&lt;p&gt;The game detects &lt;code&gt;window.devicePixelRatio&lt;/code&gt; and scales the canvas accordingly, ensuring crisp visuals on Retina and 4K displays instead of blurry pixels.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎧 Procedural Audio
&lt;/h3&gt;

&lt;p&gt;All sound effects are generated with the &lt;strong&gt;Web Audio API&lt;/strong&gt;, which:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keeps the game lightweight&lt;/li&gt;
&lt;li&gt;Avoids loading audio files&lt;/li&gt;
&lt;li&gt;Allows dynamic pitch and timing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧠 Clean Game Architecture
&lt;/h3&gt;

&lt;p&gt;Even though the project is intentionally kept in a single file, the code is structured around clear responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input handling&lt;/li&gt;
&lt;li&gt;Game state updates&lt;/li&gt;
&lt;li&gt;Rendering loop&lt;/li&gt;
&lt;li&gt;Particle system&lt;/li&gt;
&lt;li&gt;Audio feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes the game easy to extend or tweak.&lt;/p&gt;




&lt;h2&gt;
  
  
  📱 Mobile-First Considerations
&lt;/h2&gt;

&lt;p&gt;Mobile wasn’t an afterthought. The game includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Swipe detection&lt;/li&gt;
&lt;li&gt;On-screen D-pad&lt;/li&gt;
&lt;li&gt;Responsive layout&lt;/li&gt;
&lt;li&gt;Particle limits for performance safety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is a smooth experience on both desktop and phones.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚧 Challenges &amp;amp; Learnings
&lt;/h2&gt;

&lt;p&gt;Some interesting challenges while building this project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Preventing canvas blur on high-DPI displays&lt;/li&gt;
&lt;li&gt;Handling browser audio autoplay restrictions&lt;/li&gt;
&lt;li&gt;Balancing visual effects with performance&lt;/li&gt;
&lt;li&gt;Avoiding input race conditions at high speed&lt;/li&gt;
&lt;li&gt;Keeping gameplay consistent across devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each problem required small but important design decisions.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎮 Try It Yourself
&lt;/h2&gt;

&lt;p&gt;👉 &lt;strong&gt;Play here:&lt;/strong&gt; &lt;a href="https://oathanrex.github.io/snake-game/" rel="noopener noreferrer"&gt;https://oathanrex.github.io/snake-game/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback, suggestions, and forks are welcome.&lt;/p&gt;




&lt;h2&gt;
  
  
  👨‍💻 Author
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Oathan Rex&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/oathanrex" rel="noopener noreferrer"&gt;https://github.com/oathanrex&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CodePen: &lt;a href="https://codepen.io/OathanRex" rel="noopener noreferrer"&gt;https://codepen.io/OathanRex&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;YouTube: &lt;a href="https://youtube.com/@oathanrex" rel="noopener noreferrer"&gt;https://youtube.com/@oathanrex&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you enjoyed the game or found the breakdown useful, feel free to leave a comment or share your thoughts 👋&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>canvas</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
