<?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 Ozan Aydın on Medium]]></title>
        <description><![CDATA[Stories by Ozan Aydın on Medium]]></description>
        <link>https://medium.com/@ozanaydin9?source=rss-5670b99947c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9TlwQQMDtjPd1t2GeCpbuA.jpeg</url>
            <title>Stories by Ozan Aydın on Medium</title>
            <link>https://medium.com/@ozanaydin9?source=rss-5670b99947c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 05:19:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ozanaydin9/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[The Business Case for Monorepo Architecture: Measuring Impact, ROI, and Developer Happiness]]></title>
            <link>https://medium.com/call-center-studio/the-business-case-for-monorepo-architecture-measuring-impact-roi-and-developer-happiness-30b8a88d49ab?source=rss-5670b99947c------2</link>
            <guid isPermaLink="false">https://medium.com/p/30b8a88d49ab</guid>
            <dc:creator><![CDATA[Ozan Aydın]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 12:47:32 GMT</pubDate>
            <atom:updated>2025-12-26T15:15:47.993Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 2: Results, Benefits, and Lessons Learned from Managing Multiple Applications in a Single Repository</h4><p>Hi, I’m <strong>Ozan Aydın</strong>, Frontend Software Development Team Lead at <strong>Call Center Studio</strong>.</p><p>In <a href="https://ozanaydin9.medium.com/493f149df542">Part 1 Architecture, Implementation, and Migration Strategy</a>, we explored the technical architecture of our monorepo migration using Lerna and Yarn Workspaces. Now, let’s examine the <strong>quantifiable business impact</strong>, <strong>developer experience improvements</strong>, and <strong>lessons learned</strong> from managing many shared components across many production applications.</p><p>This article presents data-driven insights into how architectural decisions translate to <strong>real-world productivity gains</strong>, <strong>cost savings</strong>, and <strong>team satisfaction improvements</strong>.</p><p><strong>Abstract</strong></p><p>This study highlights the operational and business impact of migrating from multiple independent repositories to a monorepo structure in a production contact center platform. Through systematic measurement of development velocity, code quality, and team feedback, we observed substantial improvements in ROI, deployment efficiency, bug resolution time, and developer productivity.</p><p><strong>Key Findings:</strong></p><ul><li>Significantly faster bug fix propagation across applications</li><li>Noticeable reduction in cross-application feature development time</li><li>Increased deployment frequency</li><li>Strong team preference for the monorepo approach over the previous multi-repository setup</li></ul><p>— -</p><h3><strong>The Results: By The Numbers</strong></h3><p><strong>Code and Performance Improvements</strong></p><ul><li>Significant reduction in codebase size and complexity</li><li>Consolidation of components, eliminating much of the previous duplication</li><li>Faster build and installation times, improving developer workflow</li><li>Smaller production bundles for better runtime performance</li></ul><p><strong>Development Velocity</strong></p><ul><li>Faster propagation of bug fixes across applications</li><li>Reduced time for developing cross-application features</li><li>Increased deployment frequency, enabling quicker iteration cycles</li><li>Improved onboarding experience for new developers</li></ul><p><strong>Quality Improvements</strong></p><ul><li>Better test coverage across shared components, benefiting all applications</li><li>Fewer bugs due to code reuse and consistent testing practices</li><li>Centralized and improved documentation with live examples</li></ul><p><strong>Summary</strong></p><p>Overall, migrating to a monorepo structure led to measurable improvements in code maintainability, developer productivity, deployment efficiency, and overall platform quality — without exposing sensitive internal metrics or proprietary numbers.<strong>Real-World Impact: Case Studies</strong></p><p><strong>Case Study 1: AI-Powered Sentiment Analysis Feature</strong></p><p><strong>The Challenge:</strong></p><p>Product management requested AI-powered sentiment analysis integrated across three applications:</p><p>- <strong>Agent app</strong>— Real-time sentiment feedback during calls</p><p>- <strong>Supervisor app</strong> — Team sentiment trends and alerts</p><p>- <strong>Quality app</strong>— Historical sentiment analysis for coaching</p><p><strong>Technical Requirements:</strong></p><p>- Real-time WebSocket connections for live updates</p><p>- Complex data visualization (sentiment graphs, emotion tracking, keyword clouds)</p><p>- Modal interfaces for detailed analysis</p><p>- Consistent UX across all three applications</p><p><strong>⏱️ Time Comparison</strong></p><p><strong>Multi-Repo Approach (estimated based on previous projects):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvpZ8QwY-156sVXM_Zq6DA.png" /><figcaption>multi-repo approach</figcaption></figure><blockquote>Assumes parallel development, but realistically includes sync overhead</blockquote><p><strong>Monorepo Approach (actual):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCNSLoGWqz2Pk1uZDujfkQ.png" /><figcaption>monorepo approach</figcaption></figure><blockquote>Apps automatically get updates via imports</blockquote><h4><strong>🎯 Time saved: </strong>Development became much faster<strong> ⚡</strong></h4><p><strong>The Implementation:</strong></p><pre>// Created ONCE in @company/common<br>import { AIAnalyzer } from &#39;@company/common/components/aiAnalyzer&#39;;<br><br>&lt;AIAnalyzer<br>  callId={currentCallId}<br>  wsConnection={socketConnection}<br>  metrics={[&#39;sentiment&#39;, &#39;emotion&#39;, &#39;keywords&#39;]}<br>  onAnalysisComplete={handleComplete}<br>  visualizationMode=&quot;realtime&quot;<br>/&gt;<br><br>// Used IDENTICALLY in 3 applications<br>// No duplicate work, instant consistency</pre><p><strong>Actual Deployment Timeline:</strong></p><p>- <strong>Day 1:</strong> Shared component built and tested</p><p>- <strong>Day 2:</strong> Integrated in Agent app</p><p>- <strong>Day 3:</strong> Rolled out to Supervisor and Quality</p><p>- <strong>Day 4–6: </strong>A/B testing and refinements in common component</p><p>- <strong>Result:</strong> All apps benefit from improvements simultaneously</p><p>— -</p><h3><strong>Developer Experience: What Changed</strong></h3><p><strong>Before vs After</strong></p><p><strong>😰 Before (Multi-Repo Hell):</strong></p><p>Developer: <em>”I found a bug in the date picker”</em></p><pre>→ Fix in Agent repo<br>→ Create PR, code review, merge<br>→ Copy fix to Supervisor repo<br>→ Adjust for local API differences<br>→ Create PR, code review, merge<br>→ Copy fix to Quality repo<br>→ Adjust again for different API<br>→ Create PR, code review, merge<br>→ Hope you didn&#39;t miss any repos...<br>→ Verify fix in many different staging environments</pre><p>&gt; ⏱️ <strong>Time: 2–3 days</strong> | 😤 <strong>Frustration: High</strong></p><p><strong>✨ After (Monorepo Heaven):</strong></p><p>Developer: <em>”I found a bug in the date picker”</em></p><pre>→ Fix in common/components/xyzComponent<br>→ Run tests (covers all app use cases)<br>→ Create PR, code review, merge<br>→ CI automatically tests many apps<br>→ All apps get the fix in next deploy</pre><p>&gt; ⏱️ <strong>Time: 2–4 hours</strong> | 😊 <strong>Satisfaction: High</strong></p><p>— -</p><p><strong>👥 Team Satisfaction Survey</strong></p><p>We surveyed our developers after months with the monorepo:</p><p><strong>Survey Question 1:</strong> <em>”Has onboarding new developers become easier?”</em></p><p>📈 Strongly Agree / Agree</p><blockquote>“New developers can see the entire system in one place. They understand the architecture within days, not weeks.”</blockquote><p><strong>Survey Question 2:</strong> <em>”Has code navigation improved?”</em></p><p>🔍 Strongly Agree / Agree</p><blockquote>“Jump-to-definition works across packages. No more searching through multiple repos.”</blockquote><p><strong>Survey Question 3: </strong><em>”Has context switching overhead reduced?”</em></p><p>🧠 Strongly Agree / Agree</p><blockquote>“I can work on agent and supervisor features in the same branch. Game changer.”</blockquote><p><strong>Survey Question 4:</strong> <em>”Would you prefer to go back to multi-repo?”</em></p><p>❤️ No</p><blockquote>“Never going back. Monorepo is the only way forward for us.”</blockquote><p>— -</p><p><strong>💬 Developer Testimonials</strong></p><p><strong>Senior Frontend Developer:</strong></p><blockquote><em>”Previously, fixing a bug in the call transfer feature meant updating code in many different repositories, each with slightly different implementations. Now, one fix in the common package instantly propagates to all applications. This single change has saved us countless hours and eliminated entire classes of bugs.”</em></blockquote><p><strong>Junior Developer (hired post-migration):</strong></p><blockquote><em>”I joined right after the monorepo migration. I can’t imagine how chaotic it must have been before. Being able to see how all the apps connect and reuse components made my ramp-up so much smoother.”</em></blockquote><p><strong>DevOps Engineer:</strong></p><blockquote><em>”CI/CD became more complex initially, but the payoff is enormous. We went from managing many separate pipelines to one coordinated system. Deployment confidence is at an all-time high.”</em></blockquote><p><strong>Product Manager:</strong></p><blockquote><em>”Feature parity across our applications used to take months. Now, when we add AI sentiment analysis or new reporting widgets, they appear simultaneously in Agent, Supervisor, and Quality apps. Our competitive advantage has improved dramatically.”</em></blockquote><p>— -</p><h3><strong>💰 Cost Analysis: The Business Case</strong></h3><p><strong>Annual Savings Breakdown</strong></p><ul><li><strong>Initial Investment:</strong> Time and resources spent to set up a centralized monorepo, including development and tooling.</li><li><strong>Before Monorepo:</strong> Multiple repositories caused duplicated work, slower bug propagation, and repeated code reviews.</li><li><strong>After Monorepo:</strong> Shared components and unified processes reduced duplication, sped up bug fixes, streamlined reviews, and improved tooling efficiency.</li><li><strong>Annual Savings:</strong> Significant reduction in repetitive work and faster feature delivery led to measurable cost savings.</li><li><strong>ROI:</strong> The investment in monorepo infrastructure typically pays back within the first year, with faster break-even and sustained efficiency gains.</li></ul><p>— -</p><p><strong>When Should You Use a Monorepo?</strong></p><p><strong>Good Fit For:</strong></p><ul><li>Multiple related applications that share components or logic</li><li>Enterprise platforms with role-based interfaces</li><li>Teams struggling with code duplication</li><li>Organizations seeking consistent UI/UX</li><li>Projects with overlapping dependencies</li><li>Teams that value atomic cross-package refactoring</li><li>Companies with strong DevOps practices</li></ul><p><strong>Not Ideal For:</strong></p><ul><li>Single applications with no shared logic</li><li>Completely independent products with separate release cycles</li><li>Very small teams where monorepo overhead is too high</li><li>Projects with minimal code sharing</li><li>Teams needing complete autonomy with different tech stacks</li><li>Organizations without CI/CD infrastructure</li><li>Teams resistant to coordinated releases</li></ul><p>💡 <strong>Recommendation:</strong></p><blockquote><em>If your organization has multiple applications with significant shared logic, consider a monorepo with a shared component library to improve consistency, reduce duplication, and streamline cross-application development.</em></blockquote><p>— -</p><h3>Challenges We Faced (And How We Solved Them)</h3><p><strong>Challenge 1️⃣: Learning Curve</strong><br> <strong>Challenge 2️⃣: Build Complexity</strong><br> <strong>Challenge 3️⃣: Component Abstraction Overhead</strong></p><h3>🎯 Key Takeaways</h3><p><strong>1️⃣ Positive Outcomes Are Measurable</strong></p><ul><li>Significant reduction in code duplication</li><li>Faster bug detection and resolution</li><li>Time and cost savings in development</li><li>Increased deployment frequency</li><li>Strong ROI from improved processes</li></ul><p><strong>2️⃣ Developer Happiness Matters</strong></p><blockquote><em>A productive, happy team ships faster. Removing repetitive work and inconsistencies makes developers more effective and engaged.</em></blockquote><p><strong>Measured Impact:</strong></p><ul><li>Shorter onboarding times</li><li>Lower team turnover</li><li>Higher participation in code reviews</li></ul><p><strong>3️⃣ Upfront Investment Pays Off</strong></p><blockquote><em>Building reusable components may take more time initially, but reusing them widely quickly demonstrates value.</em></blockquote><p><strong>4️⃣ Start Small, Scale Gradually</strong></p><blockquote><em>Migrate high-value components first, learn, iterate, then expand.</em></blockquote><p><strong>Phased Approach Example:</strong></p><ul><li>Initial phase: Core utilities and hooks</li><li>Next: Common UI components</li><li>Then: Complex domain components</li><li>Later: Optimization and advanced patterns</li></ul><p><strong>5️⃣ Documentation is Critical</strong><br> Without clear documentation, shared components are underutilized. Invest in:</p><ul><li>✅ Live code examples</li><li>✅ Migration guides</li><li>✅ Video walkthroughs for complex components</li><li>✅ Auto-generated API documentation</li></ul><h3>🚀 What’s Next?</h3><p><strong>Short-term Goals:</strong></p><ul><li>Increase test coverage</li><li>Build an interactive component playground</li><li>Implement tools to automate component creation</li></ul><p><strong>Long-term Vision:</strong></p><ul><li>Explore micro-frontend architecture for flexibility</li><li>Real-time component performance monitoring</li><li>Use machine learning to identify component reuse opportunities</li></ul><p>— -</p><h3>Conclusion</h3><p>Migrating to a monorepo with a shared component library proved to be a highly effective architectural decision. Beyond the measurable improvements, it created a development environment where:</p><p>✨ Bugs are fixed once, everywhere<br> ✨ New features propagate across all applications efficiently<br> ✨ UI/UX consistency is maintained<br> ✨ Developers focus on building features, not maintaining duplicates<br> ✨ Business value is delivered faster and more reliably</p><blockquote><em>If you’re managing multiple related applications and struggling with code duplication, this approach is highly recommended. The initial effort pays off over time.</em></blockquote><h3>Final Thoughts</h3><p>The journey from multiple fragmented repositories to a unified monorepo wasn’t just a technical migration — it was also a cultural transformation. It required:</p><ul><li>Support from leadership and development teams</li><li>Patience during the learning curve</li><li>Discipline in maintaining shared standards</li><li>Investment in tooling and documentation</li></ul><p>The outcomes — faster development, happier developers, higher product quality, and operational efficiency — demonstrate that a monorepo architecture is not just a trendy DevOps pattern, but a strategic advantage for teams managing multiple applications.</p><h3><strong>Further Reading &amp; References</strong></h3><p><strong>Architecture &amp; Patterns:</strong></p><p>1. <strong>[Monorepo at Google Scale](</strong><em>https://research.google/pubs/pub45424/</em><strong>)</strong> — Why Google uses a monorepo</p><p>2. <strong>[Uber’s Monorepo Migration](</strong><em>https://eng.uber.com/monorepo/</em><strong>)</strong>— Large-scale migration case study</p><p><strong>ROI &amp; Business Case:</strong></p><p>3. <strong>[The Cost of Code Duplication](</strong><em>https://martinfowler.com/bliki/OpportunisticRefactoring.html</em><strong>)</strong>— Martin Fowler on technical debt</p><p>4. <strong>[Developer Productivity Metrics](</strong><em>https://queue.acm.org/detail.cfm?id=3454124</em><strong>)</strong> — ACM Queue article</p><p><strong>Team &amp; Culture:</strong></p><p>5. <strong>[Developer Experience (DX)](</strong><em>https://dx.tips/</em><strong>)</strong> — Measuring and improving DX</p><p>6. <strong>[The Phoenix Project](</strong><em>https://itrevolution.com/the-phoenix-project/</em><strong>)</strong> — DevOps transformation lessons</p><p>— -</p><h3><strong>About This Series</strong></h3><p>This is <strong>Part 2</strong> of a 2-part series on monorepo architecture.</p><p><strong>Part 1 </strong>Architecture, Implementation, and Migration Strategy <strong>(</strong><a href="https://ozanaydin9.medium.com/493f149df542"><em>link-to-part-1</em></a><strong>)</strong> covered:</p><p>- Architecture design and implementation</p><p>- Component patterns and best practices</p><p>- Build pipeline and CI/CD configuration</p><p>- Migration methodology</p><p><strong>Part 2 </strong>(this article) covered:</p><p>- Quantified business impact and ROI</p><p>- Developer experience improvements</p><p>- Team satisfaction and productivity</p><p>- Lessons learned and decision framework</p><p>— -</p><p><strong>Questions?</strong> Drop a comment below! I’d love to hear about your experiences with monorepos or answer questions about our journey.</p><p><strong>Found this helpful?</strong> Give it a 👏 and <strong>follow</strong> for more engineering insights!</p><p>— -</p><p><strong>🏷️ Tags</strong></p><p>`Monorepo` `Developer Experience` `ROI` `Software Engineering` `Productivity` `Team Culture` `Cost Savings` `Business Case` `React` `Enterprise` `Developer Happiness`</p><p>— -</p><p>&gt; <em>📅 Part 2 of 2 | Business Impact Series</em></p><p>&gt; <em>📖 ~2,900 words | ⏱️ ~12 minute read</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30b8a88d49ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/call-center-studio/the-business-case-for-monorepo-architecture-measuring-impact-roi-and-developer-happiness-30b8a88d49ab">The Business Case for Monorepo Architecture: Measuring Impact, ROI, and Developer Happiness</a> was originally published in <a href="https://medium.com/call-center-studio">Call Center Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Scalable Monorepo Architecture for Enterprise Contact Centers: A Technical Deep Dive]]></title>
            <link>https://medium.com/call-center-studio/building-a-scalable-monorepo-architecture-for-enterprise-contact-centers-a-technical-deep-dive-493f149df542?source=rss-5670b99947c------2</link>
            <guid isPermaLink="false">https://medium.com/p/493f149df542</guid>
            <dc:creator><![CDATA[Ozan Aydın]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 12:47:19 GMT</pubDate>
            <atom:updated>2025-12-26T14:13:55.924Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Part 1: Architecture, Implementation, and Migration Strategy</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P8twddTbaHikUa8wV-lbdQ.png" /><figcaption>Monorepo Architecture Visualization</figcaption></figure><p>Hi, I’m <strong>Ozan Aydın</strong>, Frontend Software Development Team Lead at <strong>Call Center Studio</strong>.</p><p>Managing multiple role-based applications in an enterprise contact center platform presents significant architectural challenges. When you have agents, supervisors, administrators, quality analysts, and reporting users — each needing their own specialized interface — how do you maintain code quality, consistency, and development velocity at scale?</p><p>In this technical deep dive, I’ll share our journey of architecting and implementing a monorepo solution that supports <strong>multiple role-based React applications</strong> through a <strong>large, centralized shared component library</strong>.</p><h4><strong>Abstract</strong></h4><p>This article presents a comprehensive technical analysis of migrating a multi-repository contact center platform to a monorepo architecture using Lerna and Yarn Workspaces. It covers the architectural decisions, implementation patterns, and migration methodology that significantly reduced code duplication while preserving independent deployability across a large set of production applications.</p><p><strong>Key Technical Achievements:</strong></p><p>- Significant reduction in duplicated components through consolidation into a shared library</p><p>- Noticeable decrease in overall codebase size and maintenance overhead</p><p>- Unified dependency management across multiple packages</p><p>- Substantial improvements in build and installation performance</p><p>— -</p><h4><strong>The Problem: Architecture at Breaking Point</strong></h4><p><strong>Our Starting Point</strong></p><p>Picture this technical scenario: You’re building a contact center platform that requires:</p><blockquote>- 📞 <strong>**Agent Application**</strong> — Real-time call handling with WebRTC</blockquote><blockquote>- 👁️ <strong>**Supervisor Dashboard**</strong> — Live monitoring and team management</blockquote><blockquote>- ⚙️ <strong>**Admin Panel**</strong> — System configuration and user management</blockquote><blockquote>- 📊 <strong>**Quality Management**</strong> — Call review and AI-powered analysis</blockquote><blockquote>- 📈 <strong>**Reporting Application**</strong> — Business intelligence and analytics</blockquote><blockquote>- 🔐 <strong>**Authentication App**</strong> — OAuth2 and SSO integration</blockquote><blockquote>- …and 9 more specialized applications</blockquote><h4><strong>The Multi-Repository Architecture Problem</strong></h4><p>Initially, we maintained <strong>multiple independent Git repositories</strong>, each with its own isolated dependency tree and duplicated implementation layers:</p><pre>application-A/<br>├── package.json<br>├── src/<br>│   ├── components/<br>│   │   ├── ComponentX.js  ← Duplicated<br>│   │   ├── ComponentY.js  ← Duplicated<br>│   │   └── ComponentZ.js  ← Duplicated<br>│   └── utils/<br>└── node_modules/<br><br>application-B/<br>├── package.json<br>├── src/<br>│   ├── components/<br>│   │   ├── ComponentX.js  ← Copy (slightly diverged)<br>│   │   ├── ComponentY.js  ← Copy (slightly diverged)<br>│   │   └── ComponentZ.js  ← Copy (slightly diverged)</pre><p>Each application evolved independently, leading to increasing divergence in shared logic and dependency versions over time.</p><p><strong>Quantified Technical Debt:</strong></p><pre>Accumulated Technical Debt<br><br>As the platform scaled, this architecture resulted in substantial technical debt:<br><br>❌ Hundreds of components distributed across repositories, many of them functionally overlapping<br><br>❌ Widespread component duplication with slight behavioral differences<br><br>❌ A large and growing codebase that was costly to maintain<br><br>❌ Frequent dependency version inconsistencies between applications<br><br>❌ Delayed propagation of bug fixes across multiple codebases<br><br>❌ Inconsistent API contracts and integration patterns</pre><h4><strong>Real-World Technical Impact</strong></h4><h3>Case Study: Critical Issue in Call Handling Logic</h3><p>A synchronization issue discovered in shared call-handling logic exposed the operational cost of this architecture:</p><ul><li>Initial fix implemented in one application</li><li>Additional effort required to locate and adapt similar implementations in other applications due to code divergence</li><li>Repeated validation and regression testing across affected applications</li><li>Coordinated multi-application releases to safely roll out the fix</li></ul><p>What should have been a straightforward change instead required <strong>several days of cumulative engineering effort</strong>, highlighting the inefficiencies of maintaining duplicated logic across repositories.<strong>Total: 24 developer-hours </strong>for what should have been a 4-hour fix.</p><p><strong>Technical Root Causes:</strong></p><ul><li>Lack of a single source of truth for shared business logic</li><li>Gradual divergence of API contracts between applications</li><li>Dependency version mismatches introducing subtle runtime issues</li><li>Absence of shared testing and validation infrastructure</li></ul><p>— -</p><h4><strong>The Solution: Monorepo + Shared Component Library</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHvGcPgC3qq51Sgrvtk_aQ.png" /><figcaption>Before</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBTC-Phvjx10Dzt9J1ejPw.png" /><figcaption>After</figcaption></figure><p><strong>Architectural Design</strong></p><p>We restructured the frontend codebase into a <strong>single monorepo</strong> managed with <strong>Lerna and Yarn Workspaces</strong>, enabling centralized dependency management and shared infrastructure while preserving application-level isolation.</p><pre>frontend/                     ← Single Git repository<br>├── package.json              ← Root workspace configuration<br>├── lerna.json                ← Monorepo management<br>├── node_modules/             ← Hoisted shared dependencies<br>└── packages/<br>    ├── common/               ← Shared component and infrastructure layer<br>    │   ├── package.json<br>    │   ├── components/       ← Reusable UI components<br>    │   ├── state/            ← Shared state management modules<br>    │   ├── utils/            ← Cross-cutting utilities<br>    │   └── services/         ← API integration layer<br>    ├── application-agent/    ← Role-based application<br>    ├── application-supervisor/<br>    ├── application-admin/<br>    ├── application-quality/<br>    ├── application-reporting/<br>    ├── application-auth/<br>    └── additional applications…</pre><p>The common package serves as the single source of truth for shared UI, state, and integration logic, while each application remains independently buildable and deployable.</p><p><strong>Core Architectural Principles</strong></p><p><strong>1. Dependency Hoisting</strong></p><p>Shared dependencies are hoisted to the root node_modules directory and managed centrally via Yarn Workspaces:</p><pre>// Root package.json (simplified)<br>{<br>  &quot;name&quot;: &quot;root&quot;,<br>  &quot;private&quot;: true,<br>  &quot;workspaces&quot;: [&quot;packages/*&quot;],<br>  &quot;dependencies&quot;: {<br>    &quot;react&quot;: &quot;^x.x.x&quot;,<br>    &quot;react-dom&quot;: &quot;^x.x.x&quot;,<br>    &quot;redux&quot;: &quot;^x.x.x&quot;,<br>    &quot;ui-library&quot;: &quot;^x.x.x&quot;<br>  },<br>  &quot;devDependencies&quot;: {<br>    &quot;lerna&quot;: &quot;^x.x.x&quot;<br>  }<br>}</pre><p><strong>Benefits:</strong></p><ul><li>A single dependency installation workflow for all workspace packages</li><li>Centralized dependency resolution with shared node_modules</li><li>Guaranteed dependency version consistency across applications</li><li>Reduced storage footprint and simplified local environment setup</li></ul><p><strong>2. Application-Specific Dependencies</strong></p><p>Specialized dependencies remain isolated:</p><pre>// packages/application-agent/package.json (simplified)<br>{<br>  &quot;name&quot;: &quot;@company/application-agent&quot;,<br>  &quot;dependencies&quot;: {<br>    &quot;agent-only-library&quot;: &quot;^x.x.x&quot;,<br>    &quot;legacy-integration-sdk&quot;: &quot;^x.x.x&quot;<br>  }<br>}</pre><p>This separation ensures that:</p><ul><li>Shared packages remain lightweight and focused</li><li>Specialized integrations do not leak into unrelated applications</li><li>Each application can evolve or be modernized independently</li></ul><p><strong>3. Centralized Component Library</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q9tspvkQQbTCgIQSgqkljg.png" /><figcaption>Component Structure diagram</figcaption></figure><p>The @company/common package provides a <strong>domain-oriented shared component library</strong> that acts as the single source of truth for UI, state, and integration logic across applications.</p><pre>common/<br>├── components/<br>│   ├── account/<br>│   │   ├── Softphone.js<br>│   │   ├── Dialpad.js<br>│   │   ├── TransferDialog.js<br>│   │   └── Video.js<br>│   ├── forms/<br>│   ├── charts/<br>│   ├── navigation/<br>│   ├── access-control/<br>│   └── notifications/<br>├── state/                  ← Shared state management modules<br>├── utils/                  ← Cross-cutting utilities<br>└── services/               ← API integration layer</pre><p>Components are grouped by <strong>business domain rather than application</strong>, which improves discoverability and encourages reuse across different user roles and workflows.</p><h3><strong>Component Import Pattern</strong></h3><p>Applications consume shared components via ES6 imports:</p><pre>// Before: Multiple app-specific implementations<br>// application-agent/components/Softphone.js<br>// application-supervisor/components/Softphone.js<br>// application-quality/components/Softphone.js<br>// ❌ Independently maintained, gradually diverged<br><br>// After: Single source of truth<br>import Softphone from &#39;@company/common/components/account/Softphone&#39;;<br>import { TransferDialog } from &#39;@company/common/components/account/TransferDialog&#39;;<br>import { useCallState } from &#39;@company/common/state/hooks&#39;;<br><br>// Used consistently across applications ✅</pre><p>This pattern ensures behavioral consistency, simplifies maintenance, and enables atomic improvements across the platform.</p><p>— -</p><h3><strong>Implementation Methodology</strong></h3><p><strong>Phase 1: Component Audit &amp; Extraction (3 weeks)</strong></p><p><strong>Automated Analysis:</strong></p><p>To identify reusable candidates, we performed a structured audit of existing codebases supported by automated analysis.</p><pre>// Simplified illustration of the duplication detection approach<br>function findDuplicateComponents(codebases) {<br>  const componentMap = new Map();<br><br>  codebases.forEach(base =&gt; {<br>    const components = extractComponents(base);<br>    components.forEach(component =&gt; {<br>      const signature = generateStructuralSignature(component);<br>      componentMap.set(<br>        signature,<br>        [...(componentMap.get(signature) || []), component]<br>      );<br>    });<br>  });<br><br>  return Array.from(componentMap.values())<br>    .filter(group =&gt; group.length &gt; 1);<br>}</pre><p>This process helped surface functionally overlapping components and highlight areas where APIs had diverged over time.</p><p><strong>Extraction Strategy:</strong></p><p>For each identified candidate:</p><ol><li>Analyze implementations to separate shared behavior from application-specific logic</li><li>Design a generic, role-agnostic API using props-based configuration</li><li>Extract the component into the shared library</li><li>Add comprehensive test coverage for existing usage patterns</li><li>Document migration guidelines for consuming applications</li></ol><p>As a result, the majority of duplicated components were consolidated into configurable, reusable implementations, while a small subset remained application-specific due to legitimate domain constraints.</p><p><strong>Phase 2: Dependency Consolidation</strong></p><p><strong>Version Alignment</strong></p><p>Prior to migration, dependency versions evolved independently across applications, creating fragmentation and compatibility issues.</p><pre>Before:<br>Application A → module v1<br>Application B → module v2<br>Application C → module v3<br><br>After:<br>Root workspace → single aligned version</pre><p>By centralizing dependency management at the workspace level, all applications were validated against the same versions, significantly reducing integration risk.</p><p><strong>Migration Strategy:</strong></p><p>Shared packages declare core libraries as peer dependencies to avoid duplication and ensure compatibility with consuming applications:</p><pre>// packages/common/package.json (simplified)<br>{<br>  &quot;name&quot;: &quot;@company/common&quot;,<br>  &quot;peerDependencies&quot;: {<br>    &quot;react&quot;: &quot;^x.x.x&quot;,<br>    &quot;state-library&quot;: &quot;^x.x.x&quot;<br>  }<br>}</pre><p>This approach keeps shared packages flexible while maintaining strict version alignment across the platform.</p><pre>// packages/application-agent/package.json (simplified)<br>{<br>  &quot;dependencies&quot;: {<br>    &quot;@company/common&quot;: &quot;*&quot;<br>  }<br>}</pre><p><strong>Phase 3: Application Integration (4 weeks)</strong></p><p><strong>Migration Checklist per Application:</strong></p><p>Each application was migrated incrementally using a standardized checklist to ensure functional parity and minimize regression risk.</p><p><strong>Migration Checklist per Application:</strong></p><ul><li>Update imports to reference shared packages</li><li>Remove local component implementations</li><li>Adapt component props to generic, role-agnostic APIs</li><li>Integrate shared state management modules</li><li>Execute regression and integration test suites</li><li>Validate real-time communication and data flows</li><li>Verify internationalization coverage</li><li>Perform performance validation</li><li>Roll out changes through staged deployments</li></ul><h3><strong>Example Migration:</strong></h3><pre>// Before: Application-specific implementation<br>import AgentSoftphone from &#39;../components/AgentSoftphone&#39;;<br><br>&lt;AgentSoftphone <br>  agentId={currentAgent.id}<br>  allowVideo={true}<br>/&gt;<br><br>// After: Shared, configurable component<br>import { Softphone } from &#39;@company/common/components/account&#39;;<br><br>&lt;Softphone<br>  userRole=&quot;agent&quot;<br>  userId={currentUser.id}<br>  permissions={{<br>    video: currentUser.hasVideoPermission,<br>    recording: currentUser.canRecord,<br>    transfer: currentUser.canTransfer<br>  }}<br>  onCallAction={handleCallAction}<br>/&gt;</pre><p>This approach ensured consistent behavior across applications while allowing role-based configuration where required.</p><p><strong>Phase 4: Build Optimization</strong></p><p>To optimize bundle size and runtime performance, we leveraged standard tree-shaking and code-splitting techniques supported by modern build tooling.</p><pre>// webpack.config.js (simplified)<br>module.exports = {<br>  optimization: {<br>    usedExports: true,<br>    splitChunks: {<br>      chunks: &#39;all&#39;<br>    }<br>  }<br>};</pre><p>These optimizations reduced redundant code in application bundles and improved load-time characteristics without introducing additional architectural complexity.</p><p><strong>Component Design Patterns</strong></p><p><strong>Pattern 1: Role-Agnostic Design</strong></p><p>Shared components are designed to be configurable via props rather than hardcoded for specific roles.</p><pre>&lt;Softphone<br>  userRole={currentUser.role}<br>  permissions={aclPermissions}<br>  onCallAction={handleCallAction}<br>  features={{<br>    video: true,<br>    recording: currentUser.canRecord,<br>    transfer: currentUser.canTransfer,<br>    conferencing: currentUser.canConference<br>  }}<br>  theme={brandingConfig}<br>/&gt;</pre><p>This enables a single implementation to support multiple workflows without duplication.</p><p><strong>Pattern 2: Composition Over Configuration</strong></p><p>Complex UI flows are built by composing smaller, focused primitives.</p><pre>&lt;CustomDialog title=&quot;Transfer Call&quot;&gt;<br>  &lt;SearchableUserList onSelect={handleUserSelect} /&gt;<br>  &lt;DialpadTabs onNumberEnter={handleNumberEnter} /&gt;<br>  &lt;CallActions onConfirm={handleTransfer} onCancel={handleCancel} /&gt;<br>&lt;/CustomDialog&gt;</pre><p><strong>Benefits:</strong></p><ul><li>Independent testing of primitives</li><li>Flexible reuse across different scenarios</li><li>Easier extension with new functionality</li></ul><p><strong>Pattern 3: Built-in Internationalization</strong></p><p>Internationalization support is integrated at the component level, allowing automatic localization based on user context.</p><pre>import { strings } from &#39;@company/common/components/i18n&#39;;<br><br>&lt;Button&gt;{strings.transfer.confirmButton}&lt;/Button&gt;<br>&lt;Text&gt;{strings.calls.count(callCount)}&lt;/Text&gt;</pre><p>This ensures consistent language handling across applications without duplicating translation logic.</p><ul><li>Multi-language support integrated at the component level</li><li>Centralized translation key management</li><li>Full localization coverage for core user flows</li><li>Contributions and extensions managed through a shared workflow</li></ul><p>— -</p><h3><strong>CI/CD Pipeline Architecture</strong></h3><p><strong>Build Pipeline Configuration</strong></p><p>The monorepo is supported by a centralized CI/CD pipeline designed to balance shared infrastructure with application-level isolation.</p><pre>pipelines:<br>  branches:<br>    main:<br>      - step:<br>          name: Install Dependencies<br>          script:<br>            - yarn install --frozen-lockfile<br><br>      - parallel:<br>          - step:<br>              name: Build Application A<br>              script:<br>                - yarn workspace application-a run build<br><br>          - step:<br>              name: Build Application B<br>              script:<br>                - yarn workspace application-b run build<br><br>          - step:<br>              name: Build Application C<br>              script:<br>                - yarn workspace application-c run build<br><br>      - step:<br>          name: Deploy<br>          script:<br>            - ./deploy.sh</pre><p><strong>Key Optimizations:</strong></p><ul><li>Parallelized builds for independently deployable applications</li><li>Selective validation based on affected workspace packages</li><li>Dependency and artifact caching to reduce redundant work</li><li>Build-once, deploy-many strategy across environments</li></ul><p>— -</p><p><strong>Conclusion</strong></p><p>This implementation demonstrates that a well-designed monorepo architecture can significantly reduce complexity in platforms composed of multiple related frontend applications.</p><p>By leveraging Lerna and Yarn Workspaces, we achieved:</p><p><strong>Technical Benefits:</strong></p><ul><li>A single source of truth for shared UI and infrastructure</li><li>Centralized and consistent dependency management</li><li>Atomic refactoring across application boundaries</li><li>Standardized and predictable build and deployment workflows</li></ul><p>The resulting architecture scales effectively as new applications are added and provides a stable foundation for long-term platform evolution — without requiring fundamental structural changes.</p><p>— -</p><h3><strong>Further Reading &amp; References</strong></h3><p><strong>Monorepo Tools:</strong></p><p>1. <strong>[Lerna Documentation](</strong><em>https://lerna.js.org/</em><strong>)</strong> — Multi-package repository management</p><p>2. <strong>[Yarn Workspaces](</strong><em>https://yarnpkg.com/features/workspaces</em><strong>)</strong>— Official workspace guide</p><p><strong>Architecture Patterns:</strong></p><p>3. <strong>[React Component Libraries Best Practices](</strong><em>https://react.dev/learn/sharing-state-between-components</em><strong>)</strong> — Component design patterns</p><p>4. <strong>[Monorepo at Scale — Google](</strong><em>https://research.google/pubs/pub45424/</em><strong>)</strong> — Why Google stores billions of lines in a single repository</p><p>5. <strong>[Webpack Code Splitting](</strong><em>https://webpack.js.org/guides/code-splitting/</em><strong>)</strong> — Optimization techniques</p><p><strong>Case Studies:</strong></p><p>6. <strong>[Babel’s Monorepo](</strong><em>https://github.com/babel/babel</em><strong>)</strong> — Large-scale open source monorepo</p><p>7. <strong>[React and React Native](</strong><em>https://github.com/facebook/react</em><strong>)</strong> — Meta’s monorepo approach</p><p>— -</p><p><strong>About This Series</strong></p><p>This is <strong>Part 1 </strong>of a 2-part technical series on monorepo architecture for enterprise applications.</p><p><strong>Part 2</strong> will cover:</p><p>- Quantified business impact and ROI analysis</p><p>- Developer experience improvements</p><p>- Team satisfaction metrics</p><p>- Lessons learned and best practices</p><p>- When (and when not) to use monorepo architecture</p><p>— -</p><p><strong>Tags:</strong> `Monorepo` `Architecture` `React` `Lerna` `Yarn Workspaces` `Software Engineering` `Technical Deep Dive` `Enterprise` `Frontend` `Build Systems`</p><p>— -</p><p>&gt; <em>📅 Part 1 of 2 | Technical Architecture Series</em></p><p>&gt; <em>📖 ~2,400 words | ⏱️ ~10 minute read</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=493f149df542" width="1" height="1" alt=""><hr><p><a href="https://medium.com/call-center-studio/building-a-scalable-monorepo-architecture-for-enterprise-contact-centers-a-technical-deep-dive-493f149df542">Building a Scalable Monorepo Architecture for Enterprise Contact Centers: A Technical Deep Dive</a> was originally published in <a href="https://medium.com/call-center-studio">Call Center Studio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Todo App - ReactJs+Redux]]></title>
            <link>https://ozanaydin9.medium.com/todo-app-reactjs-redux-f14605aeead2?source=rss-5670b99947c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f14605aeead2</guid>
            <category><![CDATA[react-hook]]></category>
            <category><![CDATA[figma]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[redux-thunk]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Ozan Aydın]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 20:17:16 GMT</pubDate>
            <atom:updated>2020-06-07T20:17:16.693Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*orEdsQHblfpXzSFxtIbDdQ.png" /></figure><p>In this part, we will make a simple todo application using ReactJs, Redux and design which we made at <a href="https://medium.com/@ozanaydin9/todo-app-designing-with-figma-b1fbf135c410">Part1</a>. On the backend side, we will use an API that I wrote earlier. As a result of Part1 and Part2, we will reach Figma + Mern Stack but backend is not our topic for now. If you want to check backend codes anyway visit <a href="https://github.com/ozanaydin9/todo-nodejs">my github repository</a>.</p><p>If you want to check codes about this blog visit <a href="https://github.com/ozanaydin9/react-redux-todo">here on my github page</a>.</p><p>We will try to keep it simple and clear. Before start coding i want to share some information about the concepts you will hear often and we will use.</p><h4>First things first..</h4><blockquote><strong>ReactJS:</strong> A JavaScript library for building user interfaces.</blockquote><p>ReactJs is an open-source library developed by Facebook (initial release 2013) and is currently maintained with open source community.</p><blockquote><strong>Create React App: </strong>A comfortable environment for learning React, and is the best way to start building a new single-page application in React.</blockquote><p>It offers a modern build setup with no configuration.</p><blockquote><strong>Redux: </strong>A Predictable State Container for JS Apps.</blockquote><p>Redux was created by Dan Abramov and Andrew Clark in 2015. They are in React Core Team at Facebook(<a href="https://twitter.com/dan_abramov/status/1268571783575351298?s=20">for now</a>). Most of people think Redux for only ReactJS but Redux can be used as a data store for any UI layer.</p><p>If you think that ‘Do i need Redux every Reactjs project?’ you don’t. Dan Abramov says “Don’t use Redux until you have problems with vanilla React.”</p><blockquote>In general, use Redux when you have reasonable amounts of data changing over time, you need a single source of truth, and you find that approaches like keeping everything in a top-level React component’s state are no longer sufficient.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NfpyR2JX2z2SLVF1MHVrkA.png" /><figcaption><strong>P.3:</strong> Redux Flow</figcaption></figure><p><strong>Action: </strong>Actions are payloads of information that send data from your application to your store. They must have a type property that indicates the type of action being performed. They are the only source of information for the store. You can also hear action creator, it is functions that create actions.</p><pre>Simple Action: <br>{ type: ‘ACTION_TYPE’ , payload: ‘data’}</pre><pre>Action Creator: <br>function actionCreator(data) {<br>         return { type: ‘ACTION_TYPE’,  payload: ‘data’}}</pre><p><strong>Reducer: </strong>Reducers specify how the application’s state changes in response to actions sent to the store. Actions only describe what happened, but don’t describe how the application’s state changes. The reducer is a pure function that takes the previous state and an action, and returns the next state.</p><pre>function simpleReducer(state = defaultState, action) {<br>    switch (action.type) {<br>        case &#39;ACTION_TYPE&#39;:<br>            return newstate<br>        case &#39;ANOTHER_ACTION_TYPE&#39;:<br>            return newstate<br>        default:<br>            return state<br>    }<br>}</pre><p><strong>Store: </strong>Holds all your application’s state. Any dispatched action returns a new state to the store via reducers. It’s important to note that you’ll only have a single store in a Redux application.</p><h4>Let’s Start Coding</h4><p>Creating our app which name is ‘todo’ with Create React App</p><pre>yarn create react-app todo</pre><p>It gives us a project, it’s file structure like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*wYJ5DOjFDerKawCf8OJPKg.png" /><figcaption><strong>P.1:</strong> Create react-app file structure</figcaption></figure><p>I change that file structure like i feel comfortable and what I needed when coding, there is no only one correct way about it. You can change it how you feel right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*0yAQAZHZ6ET6mNERelcLFg.png" /><figcaption><strong>P.2:</strong> My file Structure</figcaption></figure><p>Index.html, index.js and then here we go from our <strong>App.js</strong>. The &lt;Provider /&gt; makes the Redux store available to any nested components so we should wrapp our App. I won’t write all codes here, you can check all codes from <a href="https://github.com/ozanaydin9/react-redux-todo">here</a>. Also I won’t add import codes.</p><pre>function App() {<br>  return (<br>      &lt;Provider store={<strong><em>store</em></strong>}&gt;<br>          &lt;BrowserRouter&gt;<br>            &lt;Layout /&gt;<br>          &lt;/BrowserRouter&gt;<br>      &lt;/Provider&gt;<br>  );<br>}<br><br>export default App;</pre><p>We wrapp our app with store but where is our <strong>Store</strong>? Here is.</p><pre>const middlewareEnhancer = applyMiddleware(<strong><em>thunk</em></strong>);<br>const composedEnhancers = composeWithDevTools(middlewareEnhancer);<br><br><br>const <strong><em>store </em></strong>= <strong><em>createStore</em></strong>(rootReducer, undefined, composedEnhancers)<br><br>export default <strong><em>store</em></strong>;</pre><blockquote>A store creator is a function that creates a Redux store. Like with dispatching function, we must distinguish the base store creator, createStore(reducer, preloadedState) exported from the Redux package, from store creators that are returned from the store enhancers.</blockquote><pre>const <strong><em>store </em></strong>= <strong><em>createStore</em></strong>(reducer, preloadedState, enhancer)</pre><p><a href="https://github.com/reduxjs/redux-thunk">Redux Thunk</a> is a middleware that lets you call action creators that return a function instead of an action object.</p><p>We have a design and i focus to make same with design as a Layout. Basically our <strong>Layout.js</strong> will be like that.</p><pre>const Layout = () =&gt; {<br><br>    return(<br>        &lt;div className=&quot;main&quot;&gt;<br>             &lt;div className=&quot;todo-button&quot;&gt;<br><br>                    &lt;Switch&gt;<br>                        &lt;Route path=&quot;/todo&quot; <strong>component={Todo}</strong> /&gt;<br>                        &lt;Route path=&quot;/list&quot; <strong>component={List}</strong> /&gt;<br>                    &lt;/Switch&gt;<br><br>            &lt;div className=&quot;list-button&quot;&gt;<br>            &lt;div className=&quot;footer&quot;&gt;by ozanaydin&lt;/div&gt;<br>        &lt;/div&gt;<br>    )<br>};</pre><pre>export default Layout;</pre><p>Router will be change our todo and list boxes. Todo component has a input area and add button. List component has a TodoList component as a child which contains textarea and delete button.</p><p>Now let’s create <strong>Actions.js</strong> and <strong>TodoReducers.js</strong>. After that we will use them in our components for adding and listing todos.</p><pre>export function todosAdd(text) {</pre><pre>    return async (dispatch) =&gt; {<br>        dispatch({<br>            type: &#39;TODOS_ADD&#39;<br>        })<br><br>        try {<br>            const res = await fetch(&#39;endpoint and request details&#39;)<br>            if(res.ok) {<br>                alert(&quot;todo added successfully&quot;);<br>                dispatch({<strong><br>                    type: &#39;TODOS_ADD_SUCCESS&#39;,</strong><br>                    <strong>payload: text<br>              </strong>  })<br>            }<br>        } catch (error) {<br>            dispatch({<br>                type: &#39;TODOS_ADD_FAILED&#39;,<br>                payload: error<br>            })<br>        }<br>    }<br>}</pre><p>As you can see we have type in action, this will match with Reducer. Reducer will take payload from Action, will take the previous state and will send next state to store. Let’s see our <strong>TodoReducers.js</strong>:</p><pre>const defaultState = {<br>    isLoading: null,<br>    error: null,<br>    todos: [],<br>}<br><br>const TodoReducers = (state = defaultState, action) =&gt; {</pre><pre>    switch (<strong>action.type</strong>) {<br><br>        case <strong>&#39;TODOS_ADD_SUCCESS&#39;</strong>:<br>            return { <strong>...state</strong>, isLoading: false,<br>                   todos: [<strong>...state.todos</strong>, <br>                   {todo_completed: false,todo_name:<strong>action.payload</strong>}]<br>             };                     <br><br>        default:<br>            return state<br>    }<br>}<br><br>export default TodoReducers</pre><p>If our action type is TODOS_ADD_SUCCESS, Reducer matches with that case and returns new state. Important thing is here never mutating state because of that we use <strong>…state</strong>. The object spread operator is conceptually similar to the ES6 array spread operator. It lets you to copy enumerable properties from one object to another in a more succinct way. In here, we got new object which same previous state and added only new todo text (todo_name: action.payload) to that object.</p><p>We have more action types for deleting, updating and getting todos in TodoReducers. But in this app we have one Reducer which name is TodoReducers. If you need more than one Reducer, for example x, y, z, you should combine them like this:</p><pre>export default combineReducers({TodoReducers, x, y, z})</pre><p>Let’s fire an action in <strong>Todo.js</strong> and see what’s happening:</p><pre>const Todo = () =&gt; {<br><br>    const dispatch = <strong><em>useDispatch</em></strong>();<br>    const [text, setText] = useState([]);<br><br>    function addTodo() {<br>        <strong>dispatch(todosAdd(text))</strong><br>    }<br><br>    return(<br><br>       &lt;div className=&quot;todo-box&quot;&gt;<br>          &lt;div className=&quot;todo-area&quot;&gt;<br>              &lt;textarea className=&quot;textarea&quot; <br>                <strong>onChange={(e) =&gt;  setText(e.target.value)}</strong>&gt;<br>              &lt;/textarea&gt;<br>          &lt;/div&gt;<br>          &lt;div className=&quot;button-area&quot;&gt;<br>              &lt;button className=&quot;add-button&quot; <br>                <strong>onClick={addTodo}</strong>&gt;<br>                &lt;span className=&quot;add-button-text&quot;&gt;ADD&lt;/span&gt;<br>              &lt;/button&gt;<br>          &lt;/div&gt;<br>       &lt;/div&gt;<br>    )<br>}<br><br>export default Todo;</pre><p>When we click Add button, we getting text value from textarea and dispatching todosAdd(text) action creator with useDispatch hook. Reducer matchs with action’s type and take action’s payload then returns new state to store.</p><p>When coding Redux, using Redux Dev Tools is getting easier the things for you. You can see the all changes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*uBAiXpgHfAaU-jAmnwqAbg.png" /><figcaption><strong>P.3:</strong> Redux DevTools</figcaption></figure><p>Finally take a look our todos in <strong>List.js</strong>:</p><pre>const List = () =&gt; {<br><br>    const dispatch = <strong><em>useDispatch</em></strong>();<br>    const <strong>todos</strong> = <strong><em>useSelector</em></strong>(selectTodos)<br><br>    useEffect(() =&gt; {<br>        dispatch(getTodos())<br>    }, [dispatch])<br><br>    return (<br>        &lt;div className=&quot;list-box&quot;&gt;<br>            &lt;div className=&quot;list-area&quot;&gt;<br>                {<strong>todos</strong>.map((t) =&gt; (<br>                    <strong>&lt;TodoList key={t._id} {...t} /&gt;</strong><br>                ))}<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    )<br>}<br><br>export default List;</pre><p>We use the useSelector hook to get the state from the Redux store in a React component. You can write accessors like “selectTodos” for not writing inside component.</p><pre>export const <strong>selectTodos</strong> = (state) =&gt; state.TodoReducers.todos;</pre><p>With this way you can use simple use useSelector(selectTodos).</p><p>In List.js also we have a child &lt;TodoList /&gt; component as you see. Inside <strong>TodoList.js</strong> we have a text area, which shows our todo and a text area which has x value for deleting todo. Our text areas will work like buttons. They will have onClicks.</p><p>When we click our todo text area, we will change todo-completed status. To change todo completed status, we will use todoUpdate(_id, todo_completed) action creator. If todo is completed, the text will has “list-text-done” css class and text will has a strikethrough.</p><p>If we click x button then we will delete that todo. To delete todo, we will use todoDelete(_id) action creator.</p><pre>const TodoList = ({todo_name, todo_completed, _id}) =&gt;{<br><br>    const dispatch = <strong><em>useDispatch</em></strong>();<br><br>    return(<br>        &lt;&gt;<br>            {(todo_completed) ? &lt;textarea readOnly={true} onClick=  {() =&gt; <strong>dispatch(todoUpdate(_id,todo_completed))</strong>} className=&quot;list- text-done&quot; defaultValue={todo_name}&gt;&lt;/textarea&gt;<br>                              : &lt;textarea readOnly={true} onClick={() =&gt; <strong>dispatch(todoUpdate(_id,todo_completed))</strong>} className=&quot;list-text&quot; defaultValue={todo_name}&gt;&lt;/textarea&gt;}<br><br>            &lt;textarea readOnly={true} className=&quot;list-delete&quot; onClick={() =&gt; <strong>dispatch(todoDelete(_id))</strong>} defaultValue={&quot;x&quot;}&gt;&lt;/textarea&gt;<br>        &lt;/&gt;<br>    )};<br><br>export default TodoList;</pre><h4>What we got?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7uuzkFki5AWVyaQewyta_Q.png" /><figcaption><strong>P.4:</strong> Screenshot from App</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3XfxE2hQI0Fl4sxUjd_D2Q.png" /><figcaption><strong>P.5:</strong> Screenshot from App</figcaption></figure><p><a href="https://github.com/ozanaydin9/react-redux-todo"><strong>If you want to check all codes visit here on my github page.</strong></a></p><p><a href="https://medium.com/@ozanaydin9/todo-app-designing-with-figma-b1fbf135c410"><strong>Part1: Todo App-Designing with Figma</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f14605aeead2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Todo App - Designing with Figma]]></title>
            <link>https://ozanaydin9.medium.com/todo-app-designing-with-figma-b1fbf135c410?source=rss-5670b99947c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1fbf135c410</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[figma]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[redux]]></category>
            <dc:creator><![CDATA[Ozan Aydın]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 20:12:27 GMT</pubDate>
            <atom:updated>2020-06-07T20:17:53.644Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dTSTW5LGI3qv4DpPZ7wG8Q.png" /></figure><p>There might be some people who want to code their own design. As a one of them, i am planning to write a blog about that which has two part.</p><p>In this blog, we will make a todo app. We will use Figma as a designing tool and we will code that design using ReactJS+Redux at <a href="https://medium.com/@ozanaydin9/todo-app-reactjs-redux-f14605aeead2">Part2</a>. On the backend side, We will use an API that I wrote earlier. I can briefly say that blog about Figma+Mern Stack. But I do not intend to focus on the backend side in this blog. Maybe I can write Part3 in the future, and I can even turn it into an application that lives on Heroku with Part4.</p><p><strong>What is Figma?</strong></p><blockquote>Figma helps teams create, test, and ship better designs from start to finish.</blockquote><p>It has a beautiful structure which you can progress on the same project with your teammates at the same time. It is an application that offers up to 2 editors and 3 projects for free. You can use it on MacOS, on Windows and on Web. I suggest to you after read this, take a look their <a href="https://www.figma.com/">website</a> and start to try something.</p><p><strong>About design</strong></p><p>Before starting the design, I am looking for answer the question of “What i need?” To be honest, it can easily handle in one screen because our app will be very simple, but i want to use Routing so i will make it two page and i will use menus. One of them for adding, one of them for listing. I will not focus details, just wanna do basic things.</p><p><strong>In Figma..</strong></p><p>You can see the menus and design tools on top left (like adding lines and texts, creating some shapes etc.), under that you can see your layers, assets(components, we will talk about it) and pages. The other specifications like colors, borders, constraints, effects, positioning, text sizes etc. on the right of the page. Our playground is on the middle!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGnV-2RLtVB7ph4GikzUaQ.png" /><figcaption><strong>P.1:</strong> We are in!</figcaption></figure><p>When i starting a new design, firstly i am creating a frame. Our design will be for web so as you can see(P.1), i prefer to use 1366x768.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*5iukKcGMdzG-GRLEyHhRNA.png" /><figcaption><strong>P.2:</strong> Presented Frames</figcaption></figure><p>By the way, you can use the presented frames(P.2) provided by the Figma.</p><p>Figma also has constraints feature for making responsive designs. (today we will not use we will go for only 1366x768)</p><blockquote>Constraints tell Figma how objects should respond as you resize their Frames. This helps you to control how designs look across different screen sizes and devices.</blockquote><p><strong>Components</strong></p><p>The most important thing that i want to mention about Figma for today is component structure. I can say that, Figma has similar component structure with ReactJS component structure. One on coding, one on designing. How it works? For example, we can set buttons, input boxes, headers and footers etc. on our page as component. So what convenience does this provide us? Imagine that you are not progressing in the component structure, you have made dozens of page designs on the layout with your same header and footer. Then, when you want to change the size, position, etc. of an element in the header or you want to add something new, you need to make this change individually in the header on all pages. Instead of that, if you initially select this layout as a component and proceed by creating instances from it, your changes on your main component will be reflected in all instances and you will get rid of a big load. To make an element component, you can select that element after that click the component icon top middle of the page or just right click then click create component(Ctrl+Alt+K on web).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pjzqctNi6yeAzUxKx5AAcw.png" /><figcaption><strong>P.3:</strong> Our Layout as a component</figcaption></figure><p>Todo and List fonts will be our clickable buttons that can works as menu(P.3). We will make this layout a component so if we decide to change something in the future on this layout like font sizes, footer placement etc. we will not need the change other two page one by one.</p><p><strong>Elements and Distances</strong></p><p>You can hold down the ctrl key to select one or more of your design elements(on web). This way, you can avoid selecting or modifying the wrong elements, especially in your nested designs.</p><p>One of the other thing you need to pay attention to in design is distances. Figma is very helpful in positioning to reach smooth and measured designs. If you want to check the distances detailed, select that element and hold down alt key then move your mouse over other elements to see distances(P.4) (on web).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hlq2xzlF4ewOrYsutU7Vg.png" /><figcaption><strong>P.4:</strong> Distances</figcaption></figure><p><strong>Code</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*tZve-nMeSX52Jp_rXGjjoQ.png" /><figcaption><strong>P.5:</strong> CSS codes</figcaption></figure><p>Another beauty of the figma is that it outputs the css details (not only css there is also some codes for ios and android developers) that will help us in coding the design. Of course it will not solve all our coding work, but it will make it easier.</p><p><strong>Final Design</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EgIPjnd2ZU6SbJJYeMIjgA.png" /><figcaption><strong>P.6:</strong> TODO</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*noAwgjQtAMbGqWMWY77viQ.png" /><figcaption><strong>P.7:</strong> LIST</figcaption></figure><h4><a href="https://medium.com/@ozanaydin9/todo-app-reactjs-redux-f14605aeead2">Part2: Todo App - ReactJS+Redux</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1fbf135c410" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>