<?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 Artem Dumanov on Medium]]></title>
        <description><![CDATA[Stories by Artem Dumanov on Medium]]></description>
        <link>https://medium.com/@dumanov?source=rss-967077d248e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NtLDBt8dEOGEYpaV4ijcEw.jpeg</url>
            <title>Stories by Artem Dumanov on Medium</title>
            <link>https://medium.com/@dumanov?source=rss-967077d248e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:26:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dumanov/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[Osvitalab. Part II. 18 principles I learned working on my Startup.]]></title>
            <link>https://medium.com/@dumanov/osvitalab-part-ii-18-principles-i-learned-working-on-my-startup-951f8c286648?source=rss-967077d248e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/951f8c286648</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <dc:creator><![CDATA[Artem Dumanov]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 19:22:52 GMT</pubDate>
            <atom:updated>2023-02-04T19:22:52.320Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Intro</h3><p>In this article, I want to tell you about 18 principles I learned while working on my startup Osvitalab. You may be interested in the previous article from that series <a href="https://medium.com/@dumanov/osvitalab-part-i-my-startup-architecture-overview-60989-lines-58fa12776b3e">Part I. My startup Architecture Overview (60989 lines).</a></p><p>Hey! My name is Artem, born and based in Kyiv, Ukraine. <a href="https://savelife.in.ua/en/donate-en/#donate-army-card-once">Help Ukraine to face russian aggression</a>. My passion is to build things (especially Web Apps). <a href="/service/mailto:artem.dymanov@gmail.com">I’m open to new opportunities.</a> If you like this article consider clap, share, or subscribe.</p><h3>How to read it</h3><p>The style I’ve written this article is generalized. I genuinely believe that the most of principles you can apply not only to the work scope but to life in general.</p><p>I don’t want to seem like a figure you should look up to. I share my experiences and my perception. I encourage you to skip through your perceptions and make your own conclusions.</p><h3>Principles</h3><h4>1. Make plans</h4><p>Always make a plan for whatever you do a starting business, a day plan, a trip, renovating an apartment, or anything else. Once you make a plan, you will probably see the end goals, at least think of how to meet them, and help yourself to don’t move chaotic.</p><p>You go old-school and write a plan on paper or a board, but I prefer digital tools because they are convenient, persistent, and guarantee access wherever you are. For home tasks, you can use to-do lists like <a href="https://todo.microsoft.com/">Microsoft Todo</a>. But if we are talking about a real project I advise <a href="https://www.jetbrains.com/youtrack/">YouTrack</a> or <a href="https://trello.com/en">Trello</a>. Free plans should be fine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*prWLckY276aKz_ArUqFtXA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@furtado?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Felipe Furtado</a> on <a href="https://unsplash.com/photos/2zDXqgTzEFE?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>2. Proper resource management is important</h4><p>Once you have a plan, you should understand the resource volume you need to execute (time, money, people, whatever). I’ve seen many plans fail because the resource estimation was for the ideal case or unrealistic at all.</p><p>My advice is once you make an estimate, add 20%+ to it. You may spend fewer resources than that. It’s cool keep it up for later. But the situation vice versa when you have a resource shortage is always sad because you will not be able to execute a plan.</p><h4>3. Consistency and commitment are the keys</h4><p>If you working on something major it would take time. It is not an event. It’s a process.</p><p>How many people you’ve seen start living a new life from a Monday made maxed efforts and give up by Thursday? I’ve seen a lot. I’ve seen people that show consistent commitment that maybe not be extra but they don’t quit, work every day, and meet their goals.</p><p>What is the difference between the two? The first one mobilizes and gets overexhaustion while the second finds its fine pace. In longevity doesn’t matter that one of the days you’ve shown phenomenal performance. What important is is your overall output. Day-to-day small work dedication beats off spikes.</p><h4>4. Be agile and flexible</h4><p>The world isn’t static. It’s dynamic because everything changes so quickly. Just think of how many companies have fallen down because of missing the trends (Nokia, Kodak, Yahoo, MySpace) and how many companies have remained the industry leaders through decades because of the ability to adapt (Apple, Mercedes-Benz, Visa, Nike).</p><p>In business and in life in general you have to be agile and flexible and cannot be clunky and clumsy because you will become out of the competition.</p><h4>5. Don’t set mad goals</h4><p>Some things just take time. Some things can’t be done. Sometimes you don’t have enough money. And it is fine. I encourage you to find ways to meet your goals, but if the goal is impossible don’t set it. Most probably you won’t be able to achieve it and furthermore be sad about it.</p><p>Sometimes I was too enthusiastic. I made up a plan of tasks for a month but in fact, it take me 2 months to finish them. The issue wasn’t in my performance, the issue is that no way I can do that many tasks in one month.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*LTx67ye9g-O0vGX2zUgLWw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@gallarotti?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Francesco Gallarotti</a> on <a href="https://unsplash.com/photos/ruQHpukrN7c?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>6. Any thought or idea must be written</h4><p>Let’s look at your phone, on the storage you have photos, videos, files, app data, or whatever. Imagine a virus that randomly corrupts, deletes, or replaces files on your phone. Unfortunately, that’s exactly how human memory works.</p><p>The worst storage is where data authenticity isn’t guaranteed. Depending on your mood, recent experiences, emotional state, and whatsoever, your perception of a thought or memory will change.</p><p>The best thing you can do is to write down a thought or memory because it will guarantee authenticity and sooner is better because perception can lose the original value.</p><p>Another argument is once you write it down you are forced to shape the idea to be complete. In my experience, written thoughts are always better than ones that don’t.</p><h4>7. Establish processes and write documentation</h4><p>To organize complex repetitive processes, especially if you are working with people, you have to establish processes in a written form so everybody has easy access.</p><p>I advise you to write documentation because you are forced to shape an idea, you encourage knowledge sharing, avoid knowledge silos, and are less likely you lose important bits of information. It is still beneficial if you are a one-man band too.</p><h4>8. Do what has been asked, not what you want</h4><p>Software engineers tend to have what I call “Engineer Flu”. We like to do things because we like to be doing, be innovative, be creative. The problem is these things are often extra or even unnecessary. And it doesn’t matter how cool a thing is if nobody needs it.</p><p>Especially if you are doing business, you have to do what your client wants you to do, not what you want to do. It’s a big difference that would save you a lot of resources.</p><h4>9. You must understand the market</h4><p>You must understand everything about the market. Who are your clients, what do they need, what do they like, who are your competitors, does the market growth, and whatsoever. You should know everything, and remember that the state is dynamic. You should know the client better than they know themselves. If you do you can make a great offer, if you don’t you are done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*JPXF_72K_jULeZ4bH75gOg.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/ru-ru/@catscoming/">Cats Coming</a> on <a href="https://www.pexels.com/ru-ru/photo/2035738/">Pexels</a></figcaption></figure><h4>10. Build a product based on the market requirements</h4><p>One of the mistakes that I made is I had an idea and started from the product. I didn’t really think of the market, or clients, had no clear vision of the business model, and had no sales or marketing strategy from the beginning.</p><p>Basically speaking I was building the product but didn’t think before how to make a business on it. Once I start working on a business plan later I understood that I have to reshape product features by about 15% at least to make it sell.</p><p>You have to have to build a product based on client demands not on your personal vision, what I did is vice versa. Today I see it as a big mistake because if I start with market research first at least, I would save time and resources.</p><h4>11. The product doesn’t have to be perfect, but it has to have strong advantages</h4><p>Many people think that the product has to be perfect. In fact, it’s not. If the product has strong advantages, clients are ready to deal with disadvantages, but if there are no strong advantages and no disadvantages, clients probably won’t be much engaged with a product.</p><h4>12. Partnership is so good</h4><p>The partnership is a big discovery for me. Perhaps you have a business that provides marketing services. Your clients probably need related services like website development, copywriting, and more. What you can do is find businesses that provide such kind of service and partner with them. You recommend their services to your clients and they recommend your services to their clients. That way you get qualified low-cost leads with no effort.</p><h4>13. Networking is easy</h4><p>I’m a person who likes to keep my circle small and prefers quality over quantity when it becomes to people who surround me. I don’t have many acquaintances therefore I was thinking I’m a bad network.</p><p>But in reality, it turns out differently. One day, I was walking my dog and met Alexander while he was walking his dog. We started to talk about what we do for a living. I told him my business and asked does he knows anybody who might be interested in my product. He said that he knows some people. The next day I call them and we had a nice talk. Some of them link me up with others, and that’s how the circle starts to grow. I got partners, leads, and feedback from just one acquaintance with Alexander.</p><p>Networking is cheap, easy, and beneficial. If you don’t have a network now you can build it. All you need is to step up and make an effort. My practical advice is:</p><ol><li>Watch YouTube tutorials about networking just to understand that it’s not as hard and different from what you may think.</li><li>Ask your close circle or acquittances do they know somebody who you looking for.</li><li>Find somebody who already has a good network and ask them. You don’t have a good network, but they do. Alexander was one of that kind.</li><li>Benefit who has helped you. If you ask for a favor you owe a favor. Buy a coffee, go for dinner, help with something, or whatsoever. It must be a fair exchange of value because if don’t you won’t be able to establish a connection and the next time you ask a person they would not help you.</li></ol><h4>14. Hire a copywriter to write for you</h4><p>If you ever work on a website, article, or translations you know that the art of word is a mastery that not everybody has. That’s why it’s better to hire an expert that can write or do proofreading for you. As a result, you will clearly communicate your thoughts to your customers.</p><h4>15. Freelancers are cool</h4><p>There are many cool freelancers with good price/value ratio. Some of them don’t have many reviews but are qualified and ready to work for a reasonable price. All you have to do is to look for them.</p><p>Here is my approach to choosing a freelancer that never got me disappointed.</p><ol><li><em>Find good freelancers in your price range. </em>Look for freelancers that fit your budget. At this point don’t look at the number of reviews the only requirement is the presence of reviews and 4 stars plus rating.</li><li><em>Find freelancers with great profiles.</em> Everything matters picture, bio, portfolio, and reviews. If a person invested in the profile, they likely would be diligent about a job, too.</li><li><em>Talk to them.</em> Describe your task and talk to them. Ask for advice, small questions, or inputs. The point here is to make sure that the freelancer is a qualified expert that you can trust. The real expert will respond in a polite and qualified manner and will arouse the desire to hire him.</li><li><em>Ask for offers.</em> While you be talking probably you will shape better your requirements. Send them the requirements and ask for a final price and agree on contract terms.</li><li><em>Pick the best one.</em> After you had small talks and got offers, pick the one you like the most. My approach is to compare freelancers by how much I trust them, their expertise, reviews, and similar projects.</li></ol><h4>16. Don’t be late</h4><p>Speed is important, especially in business. If the product is in demand today, it doesn’t mean it will be in demand in a year. If a client is ready to see you today, it doesn’t mean they are willing to see you next week. If you late you are late, keep up. Else somebody else comes first and takes your place.</p><h4>17. Don’t miss a bigger picture</h4><p>When you too focus on routine it’s easy to miss the bigger picture. For example, requirements have changed and you don’t need to do this task anymore, or there is a game changer technology come up that you can use.</p><p>Occasionally, you have to stop and think about what are you doing. Do you move the right way? Think about where are you going now. I recall many times when I realized that I should do something different and wondered how did I miss it for so long. The same applies to the job, business, and personal life. Some things are worth to stop and think about them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*dOkFJLjg7YZBVds9E4QpLg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sepoys?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Rohit Tandon</a> on <a href="https://unsplash.com/images/nature/mountain?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>18. There always will be a black swan</h4><p>Life is dynamic. Something always will happen that would change your plans and slow you down. All you can do is be ready to handle situations and have prepared resources exactly for such.</p><h3>Summary</h3><p>Here are the 18 principles I learned working on my Startup. Everything I share here, I learned myself. Sometimes I learned from good experiences, most of the time from bad. Don’t take failures as a bad thing. Twist a failure into an experience to learn from. If you don’t learn new things you probably be doing nothing.</p><blockquote>I am who I am today because of the choices I made yesterday.</blockquote><p>Hope you enjoy reading this article consider clap, share, or subscribe. <br><a href="/service/mailto:artem.dymanov@gmail.com">I’m open to new opportunities.</a></p><p>Sincerely,<br>Artem</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=951f8c286648" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Osvitalab. Part I. My startup Architecture Overview (60989 lines).]]></title>
            <link>https://medium.com/@dumanov/osvitalab-part-i-my-startup-architecture-overview-60989-lines-58fa12776b3e?source=rss-967077d248e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/58fa12776b3e</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Artem Dumanov]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 19:17:16 GMT</pubDate>
            <atom:updated>2023-02-07T13:07:54.885Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro</h3><p>In this article, I will do the Software Architecture of my Startup. You may be interested in the next article from that series <a href="https://medium.com/@dumanov/osvitalab-part-ii-18-principles-i-learned-working-on-my-startup-951f8c286648">Part II. 24 principles I learned working on my Startup</a>.</p><p>Hey! My name is Artem, born and based in Kyiv, Ukraine. <a href="https://savelife.in.ua/en/donate-en/#donate-army-card-once">Help Ukraine to face russian aggression</a>. My passion is to build things (especially Web Apps). <a href="/service/mailto:artem.dymanov@gmail.com">I’m open to new opportunities.</a> If you like this article consider clap, share, or subscribe.</p><h3>Project History (you can skip)</h3><p>I’ve been working as an instructor at programming courses and realized that at that time many education centers often don’t use any software to make learning or business management easier. Later I and my partner started a new education center and faced some challenges in providing better services for our students. Because of the low profit, we closed the business but I noted the experience and I saw the opportunity.</p><p>In September 2018 I decided to challenge myself in a startup. I had a clear vision of how to automate the learning process and business management for small organizations because of my experience. The name for such type of software is LMS (<strong>L</strong>earning <strong>M</strong>anagement <strong>System</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2ugfvkO_ickSeMAi.png" /><figcaption>Lesson view</figcaption></figure><p>From 2018 to 2021 I had a regular 10 to 6 job so I’ve been working on the startup in my free time.</p><p>On 1st October 2021, I left my job and dedicated myself to the project full-time.</p><p>Because of the start of the war with russia I was forced to stop working on February 24th and resume working at the end of April 2022.</p><p>In September 2022 I had a first release.</p><p>In December 2022 has made a decision to stop the project.</p><h3>Project Passport</h3><p><strong>Name</strong>: Osvitalab<strong><br>Idea: </strong>Learning Management System (LMS) for small businesses <strong><br>USP: </strong>Create courses and share them easily!<br><strong>Slogan</strong>: Flexible LMS for efficient digital education<br><strong>Website</strong>: <a href="https://osvitalab.com/">osvitalab.com</a> (live)<br><strong>Clients</strong>: Education and Training centers; Content Creators and Teachers; Corporate training;<br><strong>Team: </strong>1 person (me), people that advise me, and freelancers<br><strong>Goals</strong>:<br>1. Students are satisfied with the learning experience<br>2. Instructors are satisfied with the course editing experience<br>3. Administration satisfied with the business-administration experience</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tdna5peTMw2jyZMi.png" /><figcaption>Students course progress overview</figcaption></figure><p>You may want to read the <a href="https://docs.google.com/document/d/1SasfRi44oCvE3AaJTDqYuBP3GIAAfNXNftQCXqVJLZE/edit?usp=sharing">business plan</a>. I’ve got positive feedback because it has no fancy charts and is on point.</p><h3>Features list</h3><p>This is a text list but if you want some screenshots come to see the <a href="https://osvitalab.com/en/features/">features page</a>.</p><ul><li>Convenient course constructor</li><li>User-friendly access management based on roles</li><li>Flexible text editor to create engaging content.</li><li>Course browser that looks nice on any device.</li><li>Course progress feature to provide the best learning experience.</li><li>Course access control with the ability to grant or revoke access for any student.</li><li>User contacts database.</li><li>Email-based invites system and organization account registration.</li><li>Users can join multiple organizations instead of the concept of 1 account = 1 organization access.</li><li>Custom dashboard unique to the role and course statistics metrics for teachers.</li><li>Convenient Django Admin Panel for the Osvitalab staff team so they can provide quality customer support.</li><li>Leads can request a free demo that will automatically create an account with prepopulated data so they can get hands-on themself on the app and leave a contact sales to request if interested.</li><li>Dedicated File Storage per organization with limited disk space.</li><li>Email notifications for some events like role change or access revoked, etc.</li><li>User profile and Organization profile pages.</li><li>Responsive design that looks good on any device.</li><li>Security first approach architecture.</li></ul><h3>Accomplishments</h3><ul><li>First of all, I really glad that I released the project and didn’t stop halfway despite it taking a while to finish.</li><li>Solid multilevel testing (unit, integration, e2e) coverage. That means the application follows tech requirements, is production-grade, and is less error-prone.</li><li>It was a challenge to make a diverse but stable Text Editor.</li><li>UI / UX was a major point because it’s an external client-facing app.</li><li>Prod, stage, and test environments running in the Google Kubernetes Engine to provide reliable and scalable live environments.</li><li>Building the cloud infrastructure around Google Cloud Services.</li><li>Automated CI and CD pipeline based on Google Cloud Build and Google Container Registry.</li><li>Local setup is running on the Docker Compose to provide a simple but flexible dev environment while in production in the Kubernetes cluster.</li><li>Security and especially data security was a major point along the way.</li></ul><h3>Technology stack</h3><h4>Frontend</h4><ul><li>React</li><li>umijs (plugins ecosystem)</li><li>Ant Design (React UI lib based on umijs)</li><li>Ant Design Pro (out-of-box UI solution based on Ant Design)</li><li>Redux (Ant Pro has a built-in wrapper over Redux Saga)</li></ul><h4>Backend</h4><ul><li>Python 3.10</li><li>Django</li><li>Django Rest Framework</li><li>Celery (Redis as Message Broker and Result Backend)</li><li>Django Rest Simple JWT</li><li>Pytest (with a bunch of different plugins)</li></ul><h4>Other</h4><ul><li>Docker (the app is fully dockerized)</li><li>docker-compose (for the local development)</li><li>Kubernetes (to run the prod)</li><li>Cypress (for e2e testing)</li><li>Nginx (reverse proxy and a web server)</li><li>Google Cloud Services (Google Kubernetes Engine, Cloud Build, Cloud Storage, Artifact Registry, Cloud Compute Engine, Cloud SQL for Postgres, Cloud Code, Cloud Load Balancing, Cloud VPC, Cloud Monitoring tools)</li><li>pre-commit (to run tests before commit)</li><li>OpenVPN (to access stage and the prod admin panel)</li></ul><h3>Architecture</h3><p>In this section, you’ll get a deep dive into the architecture. I use the <a href="https://c4model.com/">C4 model</a> for visualising software architecture. The main idea is that there are 4 levels of the context and each next is more detailed.</p><p><a href="https://drive.google.com/file/d/12Wh-AeQDGz4E2IAdx_coRJz0tGRrfSyS/view?usp=sharing">The full diagram is here.</a></p><h4>System Context diagram</h4><blockquote>A System Context diagram is a good starting point for diagramming and documenting a software system, allowing you to step back and see the big picture.</blockquote><p>There are 4 Personas: Student, Organization Administration, Lead, and Osvitalab Staff. 3 external Software Systems. And 2 External Software Systems and 2 Internal Sofware Systems. WordPress Website and Learning Management System (the actual app).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*_wDxD1X-ZK4SMrPT_QR8OA.png" /><figcaption>System Context diagram</figcaption></figure><h4>Container Level diagram</h4><blockquote>The Container diagram shows the high-level shape of the software architecture and how responsibilities are distributed across it. It also shows the major technology choices and how the containers communicate with one another.</blockquote><p>This diagram focuses on the backend application and its relations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*QqgyplVTi-Iy9EZQXR69dg.png" /><figcaption>Container Level diagram</figcaption></figure><h4>Component diagram</h4><blockquote>The Component diagram shows how a container is made up of a number of “components”, what each of those components are, their responsibilities and the technology/implementation details.</blockquote><p>This diagram shows the overview of the backend application. The resolution is so bad because it has a lot of elements.</p><p>You can see a <a href="https://drive.google.com/file/d/12Wh-AeQDGz4E2IAdx_coRJz0tGRrfSyS/view?usp=sharing">zoomable high-resolution image here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZb3ULOWUipvnKYdKfjbXg.png" /><figcaption>Component diagram</figcaption></figure><h4>Backend</h4><p>To have the best overview of the backend app I encourage you to read the “Architecture” section of this article.</p><p>The backend application is a Django monolith with few external dependencies. Because of the correct usage of abstractions, the codebase didn’t become a mess over time and remained manageable and scalable both wide and long.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JmXA83Ibval3ASkleJre5Q.png" /><figcaption>CourseViewSet uses the internal framework PermissionModelViewSet which is an interface to provide proper data and action access based on User and its permission level in the particular Organization.</figcaption></figure><p>Good unit and integration test coverage guaranteed that the app follows the requirements and ensures production readiness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wG0D7d22c-FZxhHjxS2l1Q.png" /><figcaption>pytest run results</figcaption></figure><h4>Frontend</h4><p>I find it hard to make a c4 visualization for the frontend application. My experience was mostly straightforward. Make a component, and then make a view. Ant Pro architecture follows a principle similar to Django’s “batteries included” though I don’t have to use many other major libraries outside umi or Ant orbit.</p><p>Cool things besides the routine that found interesting to work on are the Text Editor based on TinyMCE, …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*250ULcyHDAABLTt0.png" /><figcaption>Text Editor</figcaption></figure><p>… and a Course Constructor / Course browser because I really have to make them nice and useful. I am satisfied with the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j5Ha_Oah4P65otqC.png" /><figcaption>Lesson view in the Course Browser</figcaption></figure><h4>Admin panel</h4><p>The staff relies on the Django Admin to provide customers with better services. For security reasons has made a decision to allow access only with OpenVPN which was set up on a dedicated Google Compute Engine machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*leo3JqIRqr0p22BViq3W1g.png" /><figcaption>Admin view</figcaption></figure><h4>Celery</h4><p>Some management commands needed to be run by a schedule, though celery + celery beat was a perfect setup for me. I used Redis anyway so I set it up as a message broker and, as a results backend.</p><h4>Database</h4><p>The database is a crucial part of the live environment. I found Google Cloud Cloud SQL for Postgres beneficial because it required almost zero effort to maintain but followed the best production practices.</p><h4>Local setup</h4><p>To don’t overcomplicate the development routine was made a decision for local development to use Docker Compose because of its simplicity over local Kubernetes cluster solutions.</p><h4>Project setup</h4><p>The project setup consists of 4 git repositories (root, cypress, backend, frontend). I find git subrepositories feature sweet for my case. Easy to set up and understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5MwsOY8kRLIDYgrE0ekzA.png" /><figcaption>tree -L 2</figcaption></figure><p>Before committing to the backend pre-commit hooks get triggered (run some basic checks and tests).</p><p>Once you download repositories, you can run the project with docker-compose or build containers and push it to the registry to run live.</p><p>I like to use .env files and different settings files, though I had a template that you can copy and easily override to get the environment you need to or use the same templates to make secrets and configmap if you run live.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*z3kRSWXIrdZycTU-TZb6oA.png" /><figcaption>settings</figcaption></figure><h4>Prod</h4><p>Because the product consists of multiple apps, then dockerization is fully justified. In production, I used Google Kubernetes Engine in Standard mode (was no need for autopilot). The cluster has multiple namespaces equal to environments prod, stage, and test-$HASH$ (created a new namespace for each test run). As an Ingress, I used Google Cloud Load Balancer because it seems to be more appropriate for my situation.</p><p>For monitoring Google Cloud Monitoring Uptime checks and notifications to my email. Hence, I can be involved quickly.</p><h4>CI/CD</h4><p>Nowadays, CI and CD are really crucial to have for rapid software development. For that, I set up the Google Cloud Build 2 scripts test and prod. The setup was rapid and automated.</p><p>The stage cloudbuild script steps</p><ol><li>Set up the test db and cluster preparation</li><li>Pull the codebase</li><li>Build containers</li><li>Deploy to the test namespace in the cluster</li><li>Run unit tests</li><li>Run Cypress tests on the fully deployed app</li><li>Push artifacts to the stage registry</li><li>Clean up the test database and cluster</li></ol><p>If the commit was run successfully on the stage, then you could deploy it to the prod.</p><h3>Project management</h3><p>I love using Agile and applying this methodology in my life wherever feels necessary. YouTrack is my favorite issue tracker and used it for this project. Because of my ty team size (I was alone), I couldn’t use Scrum or Kanban methodologies fully (you know :)), but I can use elements from them.</p><p>I had one board for dev tasks and one for business tasks. My strong rule is wherever I have an idea or even thought I create a ticket or commoner on an appropriate task. I can make plans for some fixed date, monthly, or fixed basis. That’s my sprints alternative. Usually, I sort tasks by priority, estimate, and dependencies. After each such “sprint”, I’m doing an analysis and adjusted my strategy, then starting a new sprint.</p><p>From Kanban, I borrowed to limit the number of issues in the progress stage (2–3 max for me)i.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aSnKge3ftnRGJ2HvVtYxsw.png" /><figcaption>YouTrack Dev Board</figcaption></figure><h3>Testing</h3><p>Without proper testing, you cannot build a reliable web application. And the more complexity of it the more coverage you need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/0*USnCBH92EPcPHqN5.png" /><figcaption><a href="https://www.edureka.co/blog/software-testing-levels/">Levels of testing</a></figcaption></figure><p>On the backend, we used pytest framework to write unit and integration tests.</p><p>On the frontend, there are no unit tests but instead, good coverage of system and integration tests are written with Cypress (simulates a user in the browser).</p><p>I was satisfied because the software meet the initial business and reliability requirements. Of course, during the real user Acceptance testing we found bugs but it was nothing major.</p><h3>The Scale</h3><h4>Codebase</h4><p>The codebase for the app is 60989 lines of code in total excluding empty lines, libraries, and autogenerated files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iq-kzkawNympFdxlLbQWOQ.png" /><figcaption>How many lines I wrote</figcaption></figure><h4>Tests</h4><p>The backend application has in total of 516 unit and integration tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wG0D7d22c-FZxhHjxS2l1Q.png" /><figcaption>pytest run results</figcaption></figure><p>For testing the web app, I used Cypress. In total, we have 81 tests and the run is approximately 30–40 minutes. Despite of relatively small number, there are some complex and heavy tests that run for 3–5 minutes for example the demo feature test, or a user signup test.</p><h4>Issue number</h4><p>In total, I created 681 tasks, 381 of which were in finished states.</p><h4>Time</h4><p>I can’t tell the exact number but I lean towards that I’ve been working on the project for 20–30 hours per week on average from September 2018 to December 2022 on any type of task including but not limited to the dev tests.</p><h3>Lessons learned</h3><p>As I said before the primary focus of this article is a Software Architecture overview. All lessons that I’ve learned you can read in <strong>Part II 24 lessons</strong></p><h3>Summary</h3><p>In this article, I’ve shown you the Software Architecture of my startup Osvitalab. My goal is to share the internals of a real project and my experience with other engineers so you get some insights and learn something new.</p><p>Hope you enjoy reading this article consider clap, share, or subscribe. <br><a href="/service/mailto:artem.dymanov@gmail.com">I’m open to new opportunities.</a></p><p>Don’t hesitate to ask your questions in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58fa12776b3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Powerfull and simple search engine in Django Rest Framework]]></title>
            <link>https://medium.com/@dumanov/powerfull-and-simple-search-engine-in-django-rest-framework-cb24213f5ef5?source=rss-967077d248e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb24213f5ef5</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[search-engines]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <dc:creator><![CDATA[Artem Dumanov]]></dc:creator>
            <pubDate>Mon, 12 Oct 2020 12:37:57 GMT</pubDate>
            <atom:updated>2022-10-17T21:26:10.969Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fuzzy search in Django Rest Framework (Primitive search engine)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TevVtjufx-ox_OgvKBLbQA.png" /></figure><p>Hi! My name is Artem, I’m a software developer with solid experience based in Kyiv, Ukraine. Recently I founded <a href="https://bit.ly/3ToHC2S">Osvitalab</a>. It is an LMS perfect for Education business, Infobusiness, Private Teachers, and Corporate training. Create courses and share them easily with <a href="https://bit.ly/3ToHC2S">Osvitalab</a>!</p><p>I use Django and Django Rest Framework a lot. One of the components that a lot of developers underestimate is Filters Framework. That’s so powerful, force DRY, and logic separation which as a result code that simple to read.</p><p>However, with the standard filter library like <a href="https://django-filter.readthedocs.io/en/stable/">django-filters</a> or a <a href="https://www.django-rest-framework.org/api-guide/filtering/">default rest framework filters</a> I lack of Postgres “Trigram similarity” search filter which has <a href="https://docs.djangoproject.com/en/3.1/ref/contrib/postgres/search/">built-in support in the Django</a>.</p><p>So what “Trigram” is?</p><blockquote>A trigram is a group of three consecutive characters taken from a string. We can measure the similarity of two strings by counting the number of trigrams they share. This simple idea turns out to be very effective for measuring the similarity of words in many natural languages.</blockquote><p>Long story short, this type of search different from the standard search because will look for similarities not for the exact search term (the same as Google search does).</p><p>Unfortunately, I did not find a solution over the internet that’s why I decided to write a filter by myself.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8faea8bf15ceae217f31975639906daa/href">https://medium.com/media/8faea8bf15ceae217f31975639906daa/href</a></iframe><p>To use this you have to:</p><ol><li>Choose a ViewSet.</li><li>Add `TrigramSimilaritySearchFilter` to the `filter_backends`.</li><li>Specify the <a href="https://www.django-rest-framework.org/api-guide/filtering/#searchfilter">`search_fields` attribute</a>. Which is a list of fields where the search will be performed on.</li><li>Optionally, you can set the `trigram_similarity` attribute on a view. That’s a value between 0 and 1 which indicates how similar results should be. I usually use 0.2 or 0.3 because if bigger I have poor results.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d28be6b2705155446279f11df407468/href">https://medium.com/media/6d28be6b2705155446279f11df407468/href</a></iframe><p>Let’s try a query. I have a group with a `note` field with value as `pretty notebook` but my search query will be `prety notebok` (two typos) and I still will be able to query the right result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*jVnPN7upFPryvnel9luxRQ.png" /></figure><p>That’s it! As an outro, I recommend you to take a look at other search capabilities provided by Postgres and implemented with Django <a href="https://docs.djangoproject.com/en/3.1/ref/contrib/postgres/search/">like SearchVector</a>.</p><p>If you like this article please consider clap or subscribe 🤗</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb24213f5ef5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Always use auto-increment ID’s in Django]]></title>
            <link>https://medium.com/@dumanov/always-use-ids-in-django-660b5aec50ea?source=rss-967077d248e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/660b5aec50ea</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-design]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[postgres]]></category>
            <dc:creator><![CDATA[Artem Dumanov]]></dc:creator>
            <pubDate>Sun, 23 Feb 2020 09:06:01 GMT</pubDate>
            <atom:updated>2023-07-28T14:50:28.882Z</atom:updated>
            <content:encoded><![CDATA[<h3>Always use auto increment primary keys in Django</h3><p>Long story short: If you decide to change the primary key of the model after creation (probably you will) you will have a hard time refactoring the Foreign Keys by your hands because Django won’t do that for you.</p><h4>Intro</h4><p>Hi! My name is Artem, I’m a software developer with solid experience based in Kyiv, Ukraine. Recently I founded <a href="https://bit.ly/3Saf4t4">Osvitalab</a>. It is an LMS perfect for Education business, Infobusiness, Private Teachers, and Corporate training. Create courses and share them easily with <a href="https://bit.ly/3Saf4t4">Osvitalab</a>!</p><p>I’ve been using a lot of Django last 6 years and I always got into the same pitfall. Using custom fields as the primary key (name, slugs). Let me show you a real-world case that happened to me.</p><blockquote>Database design says that Primary Keys must be never changed.</blockquote><p>And that’s why using user-provided data is a bad idea. You don’t know but maybe in the future, you would like to edit field values (alter) that are forbidden or even change a primary key. The caveat is that changing a primary key is a challenge that it’s better to avoid. Simply use the Django AutoField or UuidField as primary keys and mark else primary keys like data as unique. Nobody will stop you from querying that fields and that would save you time and improve the robustness of your application.</p><h4>Background</h4><p>For example, we have a class DoctorSpecialization with one field. Simple. I know that the name must be unique. Why don’t make it a primary key? Yes, let’s do that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*vcHcpblFLUi5psDpmovueg.png" /></figure><p>We grew up and now a couple of models have foreign keys or M2M relations to DoctorSpecialization. For example Doctor model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*3J_xF3PMPtNGwoD7rbs04A.png" /></figure><h4>Problem</h4><p>With time, I saw that I need the ability to change the name. Modifying the primary key is not a good practice and Django in some cases will not manage primary key changes for you. So I decided to switch the primary key type to the AutoField field instead of CharField as the primary key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*p3kBmuBllVZjNQ1A.jpg" /><figcaption>Time to problems began</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TKB4KKPAm3Z9DujRz-FY3A.png" /><figcaption>Not again</figcaption></figure><p>The SQL query is:</p><p>SELECT “doctor_doctorspecialization”.”id”, “doctor_doctorspecialization”.”name”, “doctor_doctorspecialization”.”slug” FROM “doctor_doctorspecialization” INNER JOIN “doctor_doctor_specializations” ON (“<strong>doctor_doctorspecialization”.”id” = “doctor_doctor_specializations”.”doctorspecialization_id</strong>”) WHERE “doctor_doctor_specializations”.”doctor_id” = 1 LIMIT 21; args=(1,)</p><p>It does mean that linked in the M2M table <strong>doctor_doctor_specializations</strong>, <strong>doctorspecialization_id</strong> column is still of the character type. However, doctor_specialization primary key now is of another type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*pH-GXZvqcSzmFOTm98Mc8g.png" /><figcaption>doctor_doctor_specializations table description</figcaption></figure><h4>Solutions</h4><ol><li><strong>If your app is not in prod</strong> and does not want to write nasty SQL queries just delete all of your migrations and then create again. Simple, but not always a choice.</li><li>Write an SQL migration using raw queries.</li></ol><ul><li>create new Django migration python manage.py makemigrations --empty --name doctorspecialization_fk_type_change doctor</li><li>Find the name of the indices that block you. I know that my index is of VARCHAR type. So I was looking for something pointing to this type in the index description.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*R9F4Oy1ba2IfGXA7sp8ojg.png" /></figure><ul><li>Write the actual migration. Explanations are in the comments.</li></ul><pre><strong>from </strong>django.db <strong>import </strong>migrations<br><br><br><strong>class </strong>Migration(migrations.Migration):<br><br>    dependencies = [<br>        (<strong>&#39;doctor&#39;</strong>, <strong>&#39;0008_auto_20200221_0936&#39;</strong>),<br>    ]<br><br>    operations = [<br>        <em># drop index. REPLACE THE NAME TO YOURS.<br>        # drop &lt;INDEX_NAME&gt;<br>        </em>migrations.RunSQL(<strong>&#39;drop index if exists doctor_doctor_specializa_doctorspecialization_id_db59809e_like&#39;</strong>),<br>        <em># create a new one index<br>        # create &lt;INDEX_NAME&gt; on &lt;TABLE_NAME&gt; (&lt;COLUMN_NAME&gt;)<br>        </em>migrations.RunSQL(<strong>&#39;create index doctor_doctor_specializa_doctorspecialization_id_db59809e_like on doctor_doctor_specializations (doctorspecialization_id)&#39;</strong>),<br>        <em># change the type of the column<br>        # alter table &lt;TABLE_NAME) alter &lt;COLUMN_NAME&gt; type &lt;YOUR_TYPE&gt; using (&lt;COLUMN_NAME&gt;::&lt;YOUR_TYPE&gt;)<br>        </em>migrations.RunSQL(<strong>&#39;alter table doctor_doctor_specializations alter doctorspecialization_id type int using (doctorspecialization_id::int)&#39;</strong>)<br>]</pre><ul><li>Repeat other indices if they exist.</li></ul><p>3. If you don’t have the data linked and f you haven’t pushed the repository yet.</p><ul><li>Inspect the table. \d table_name and find the Foreign Key field, Foreign Key index, and Foreign Key constraint. Ald drop them all.</li><li>Drop the Foreign Keys index drop index data_management_dataentry_product_id_e4c903e1;</li><li>Drop the Foreign Keys constraintALTER TABLE your_tbl DROP constraint data_management_data_product_details_id_fe63654b_fk_product_p;</li><li>Drop the Column ALTER TABLE data_management_dataentry DROP COLUMN product_id;</li><li>Delete an old migration or comment that (if you haven’t pushed the repository yet) or comment on the migration action if the migration is in between the migration list and you don’t want to mess with them.</li><li>Create a new migration.</li><li>Migrate.</li></ul><h4>Conclusion</h4><p>I strongly advise you don’t use any primary key except for the auto-increment. Django doesn’t care about relations if you change the primary key field. If<em> you are 100% sure you won’t change the primary key type ever you can try, </em>but from my experience 80% of the time at some point I’ve needed to change the key because of any reason that comes from the new business requirements or bugs.</p><p>Nothing stops you from using the unique parameter on fields that needs to be unique and you can do the querying by those fields. However, it gives you more flexibility and a less error-prone app in the end.</p><p>My rule of thumb is to use AutoField default Django primary key always, at least if there are really good reasons not to. Tbh never have been strong enough and today I see it as my mistake in the application design.</p><p>If you like this article please consider clap or subscribe 🤗</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=660b5aec50ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>