# Case Study: 3D Printing Farm ![Hero image](https://i.ibb.co/R9Vtrxr/DSC-Aurora-1.png) ## Background ### Introduction Five years ago, [you joined the company print-it-for.me as a software architect, becoming responsible for their Shop Operation System (SOS)](https://hackmd.io/@rstropek/print-it-for-me). The business has experienced considerable growth since then. Currently, print-it-for.me operates through 75 franchisees, with plans for rapid expansion - aiming to surpass 500 franchises within the next three years. On a daily basis, each print shop manages around 50 orders, totaling 3500-4000 orders company-wide each day. This number is set to increase significantly as more franchisees join the network. The SOS architecture you developed has demonstrated reliability and flexibility. Continuous improvements have been made possible through an integrated plugin system, and its microkernel remains solid and dependable. ### Current Problems However, not everything is running smoothly, particularly in the central backend system known as the _Digital Shop Counter_ (DSC). Initially, the DSC team, under tight time and resource constraints, developed the software using PHP in a monolithic structure. Unfortunately, due to these pressures, architecture was not prioritized, resulting in a system that can best be described as a [big ball of mud](https://en.wikipedia.org/wiki/Anti-pattern#Software_engineering_anti-patterns). Several issues plague the DSC, leading to customer complaints about slow performance, missing features, software crashes, and a confusing user interface, among other things. The original DSC team, having worked in a constant state of ["crunch time"](https://www.merriam-webster.com/dictionary/crunch%20time) for years, has since disbanded and left print-it-for.me. Developers who took over the project have expressed frustration about the poor code quality and lack of clear architecture. Changes and fixes are slow and costly, and the ongoing technical issues within the DSC have become a major hurdle to the further growth of print-it-for.me. ## Functional Requirements ### Current Situation Today, DSC offers the following functions: #### End-user-facing functions * External user management (payment methods are not managed by DSC, an external service is used for that) * Browse through a repository of thousands of verified 3D models that can be ordered without any design skills * Possibility to upload custom models. These models are stored online and can be ordered repeatedly in multiple configurations (e.g. colors, filament types). * Possibility to request a model check after uploading a custom model. Model checks are done by a central team of skilled engineers. Once checked, print-it-for.me guarantees that the model can be 3D-printed. * Order management (view past orders, monitor open orders, track and trace) #### Internal functions * Shop management (on/offboarding, master data management) * Routing of orders to local print shops * Automated data exchange with print shops (orders, status changes, logs) * Automated data exchange with logistic partners * Handling customer support requests (including functions to view details of orders that are currently processed) * Handling technical support requests from print shops (includes functions to analyze logs) * Backup/restore functions for SOS workstations * Internal user management (Azure Active Directory) * Automated data exchange with billing partner (_Stripe_) * Automated data exchange with accounting software ### Planned Enhancements print-it-for.me has identified three key areas to improve in the Digital Shop Counter (DSC) to better meet the needs of its users and streamline operations: 1. **Improving External User Management:** Small business customers need a way to manage their accounts more effectively. The plan is to create one main account per customer, with the ability to add multiple user accounts for their employees. This involves managing permissions (deciding who can print what) and having a single billing system. 2. **Centralizing Purchases of Consumable Materials:** There are big potential savings in centralizing the purchase of consumables, especially filament. The idea is for print shops to order consumables via the SOS. These orders then get sent to the DSC, which combines them and even keeps a small stock of items to make sure orders can be filled. 3. **Integrating a 3D Viewer:** print-it-for.me plans to add a 3D viewer to its website, using _Babylon.js_. This will allow users to view 3D models directly on the website, improving user experience and interaction with the platform. These planned enhancements aim to simplify user interaction, streamline ordering and inventory management, and enrich the online experience for customers and print shops alike. ## Organization print-it-for.me is planning to rebuild the Digital Shop Counter (DSC) from scratch. This big project is called _Aurora_. Thanks to successful business, the company can put a lot of money and people into Project Aurora. The team will have 20 developers who already work for print-it-for.me and 15 more developers from outside the company, hired just for this project. Here are some of the print-it-for.me departments that will be involved with Aurora, and a bit about what they do: [![](https://mermaid.ink/img/pako:eNqFlG9r2zAQxr-K0IvRQv6syZa2Zgy2dLDCQkvzbvNeXOSzLWrrxFlKMSXffbJSO2kI7J3vuUen350kv0pFGcpE1tpkNdjUCMFE7o9lbdxYu3FOPKnxb5cQYn4nVsFfVdoUeyVJtCJzkYPIYaz8Bi_3utgbv2x4-nWLrHOtwGky77KiBgMF1mhcNILJhGVsQnxkXvrGUR0NT1jFRFNqG4XVUOAMTk0G27EqUT0PVN-UIm-cCFvFAr5BPsLobQ-cBT0I3PbSdx3bHlZaaAdwy6SwaYap9NDIMd14a4nfij92k43yg0Xet3MGvkDgZsBel7Rv-IA6irFDVZqJeLdDj8_kXUA6Gu0p5S8qdOO0egNYhypVK5YlaPP_8Tr26nmcMxk3cC5DwKDcCW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QHAIzUq_2fJP5Qdv8ApZ1v-g) The Aurora team can get help from experts in all different company departments whenever it's needed. These experts will make time to work on Aurora, sharing their special skills and knowledge to help make the project successful. This setup makes sure the Aurora project has all the knowledge it needs from every part of the company, making it a strong and well-informed effort. ## Non-Functional Requirements * With Aurora, print-it-for.me wants to base DSC on managed cloud services. * Although print-it-for.me is committed to use managed public cloud services, the company wants to make sure that switching the cloud provider or - in extreme circumstances - switching to a private cloud approach must be possible within three to six months. * It is foreseeable that DSC will consist of different development technologies (e.g. TypeScript with various frameworks for frontend, .NET and/or Go for web APIs, Python for interacting with machine learning models, etc.). As DSC will be used for many years, it is likely that technologies will change (e.g. new/upgraded frameworks, new programming platforms enabling business innovations, use of low-code platforms, etc.). * Speed of development will be different between departments. Some might benefit from new technologies (e.g. model presentation on website, automated model validation), some might be more stable (e.g. traditional database-oriented API). * print-it-for.me will use off-the-shelve SaaS offerings where applicable (e.g. trouble ticket management, payment). ## Your Tasks ### Basic Tasks Because of your success with SOS, you got the job of the chief architect for Aurora. You got assigned two newly hired assistants who can help with operational and organizational issues (e.g. research, documentation, technical writing, building prototypes, doing feasibility studies, etc.). You need to prepare a presentation in which you outline the general architecture for Aurora. It should contain the following aspects: * Description of the general architectural style that you are going to use * High-level architecture diagram * If you are going to use the _Microservices_ pattern, provide a list of potential microservices for DSC Aurora * Overview of data architecture * Overview of communication patterns * Draft for team organization (for development and operations) ### Additional Tasks * Describe in more details how authentication will work (user-facing, machine-to-machine) * Describe how your architecture is going to use container technology * Elaborate which standard/protocols your architecture is going to be based on