Skip to content
/ semio Public

🧩 Design-Information-Modeling for Kit-of-Parts Architecture 🏘️

Notifications You must be signed in to change notification settings

usalu/semio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘€ Do you want to develop the next design AI with us? Then join our Weekly-Evening-Session every Tuesday starting at 6pm (UTC+1) on Discord 🍻

semio
Cite Latest Release AGPLv3 License
Grasshopper Windows macOS
Python C# Typescript
🧩 Design-Information-Modeling for Kit-of-Parts Architecture 🏘️


You want to 🧩 the next πŸ›οΈπŸ˜οΈπŸ’πŸ­πŸ«πŸ¨β›ͺπŸ•Œ with πŸ€–? But πŸ“πŸ”’πŸ—£οΈπŸ‘₯πŸ–±οΈβŒ¨οΈ takes all your ⌚? Then try to 🧠 the 🧬 and let semio πŸ’‰πŸ–₯οΈβœ’οΈπŸ–¨οΈπŸͺ„πŸš€.

πŸ‘‹ Hello dev

Note

Are you a user of semio? Then you probably want to visit our docs πŸ‘€

Glad to see you!

Let me walk you throw 🚢

βš–οΈ Principles

Let's start with the rule of thumbs that this codebase was built with 🫰

πŸ’Ύ If something can be written in a single file, then it probably should βœ…

I know, the urge to tidy up or separate things is big πŸ—ƒοΈ

But try to withstand it πŸ«₯

Out of my experience, it makes development slower, not faster 🐌

A single file is easier for humans and computers to understand πŸ’‘

You will be supprised

  • by the awesome fill-in-the-middle suggestions of your copilot πŸ€–
  • by the hassle-free context selection for your ai agent πŸ–±οΈ
  • by the smooth refactor experience by just going top-to-bottom ⬇️
  • by the beautiful diff for your next code review πŸ”
  • by the clean git-history when you try to find a certain change πŸ”

πŸ“ If a folder doesn't make your life dramatically easier, don't create it ❌

We all know this ./src/** folder that has made it into a lot of starters πŸš€

Other than feeling cool about using hacky abbreviations, does it really help you to understand the project faster and work more efficient on it?

If your project contains hundreds of config file and other project folders at the root, maybe πŸ€”

But most likely not ❌

πŸ“‘ If multiple people work longterm on the same part, then one file for each part should be created βš™οΈ

Trust me, it will make collaboration much easier πŸ”€

πŸ“¦ If you don't need an interface because something is not likely to be extended in the future, don't create it ❌

The main question is the interface productive or not?

The pay-off of abstraction happens in the future πŸ›£οΈ

Every extension profits from a clean interface πŸš€

Most things are not extended πŸͺ¨

If you change your architecture, just design proper interfaces for something concrete not something potential and reactor it ✍️

🀏 Repeating code is ok if it probably doesn't happen more than twice and the repeated code is close in the source code βœ…

We are past the time where we copy code for no reason πŸ“ƒ

Actually repeated code can improve the quality of your copilots suggestion 🀯

The main question is how can your application grow?

If a change requires exponentially more duplication then you'll probably have to fix it πŸ› οΈ

If not, then you are probably good πŸ‘Œ

🀨 Wait, no high-level advice and only plain numbers, files, folders or close line of codes?

In my understanding, rule-of-thumbs are most useful when they are concrete πŸ”¨

Besides that I am sure you know about KISS (Keep-It-Simple-Stupid), DRY (Dont-Repeat-Yourself), YAGNI (You-Aren't-Gonna-Need-It), SoC (Seperation-of-Concerns), Avoid Premature Optimization, Law of Demeter, LCHC (Low-Coupling-High-Cohesion), SOLID (Single Responsibility (SR), Open/Closed (OC), Liskov’s Substitution (LS), Interface Segregation (IS), Dependency Inversion (DI)), …

But as always, the devil is in the details 😈

Even if 95% of the codebase follows those principles, there are good reasons for the other 5% βš–οΈ

🚩 Don't worry, you'll figure out the possiblites and make the right choice for the specific problems βœ…

πŸ¦‘ Monorepo

This git repo has everything that exists in the open semio ecosystem 🀯

πŸ“¦ Components

Do you wonder how the same looking ui or functionality is avalailable on multiple components? The secret is that they have shared cores in their ecosystem πŸ₯œ

A component is a piece of software which runs independently 🏝️

✏️ sketchpad

An electron-based desktop app primarly working for with local kits πŸ’Ύ

πŸ¦— Grasshopper

A full-blown Grasshopper Plugin that has (almost) everything πŸ’―

βš™οΈ engine

A hidden fat-client which exposes shared functionality to other desktop uis 🀝

It takes care of:

  • CRUDs (Create-Read-Update-Delete) for local kits πŸ’Ύ
  • Client-Server communication ↔️

It offers two APIs to other clients:

  • A simple REST OpenAPI πŸ₯‡
  • A complex GraphQL Relay API πŸ₯ˆ

If you go to http://127.0.0.1:2412/api/docs/ you find the Swagger UI:

GraphQL Query

Still a prototype ✏️

If you go to http://127.0.0.1:2412/graphql/ you find the GraphiQL UI:

GraphQL Query

πŸ“š docs

πŸ›οΈ assets

🏘️ Examples

πŸš€ Starter

πŸ‘‹ Hello semio

🌈 Geometry

πŸ«€ Metabolism

πŸ’Ώ Ecosystems

You might have noticed that the individual components can be closely related such as sketchpad, Grasshopper and engine but they are in totaly different folders πŸ“‚

The reason for this is that the monorepo is not disected according content but according technology stack βœ‚οΈ

This is less intuitive but more tool-friendly and everything that is easier for our tools is less pain to develop πŸ§‘β€πŸ’»

🐍 Python

Currently only engine but in the future it might grow and then the .venv will be centralized, …

πŸ’» Building from source

You need the following tools:

If you do not have Python installed, I recommend to install it over the Microsoft Store πŸͺ

Afterwards you can install poetry with this Powershell command:

(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -

In the console you will see a warning that the poetry.exe is not installed in the requested location πŸ“ Actual Location Then copy the actual path ...\AppData\Local\Packages\PythonSoftwareFoundation...\Roaming\pypoetry\venv\Scripts and add it to your environmental path variable βž•

Then you can build.ps1 in the Powershell and add your full path LOCAL_PATH\dotnet\Semio.Grasshopper\Debug\net48 to your GrasshopperDeveloperSettings βš™οΈ

If you have never executed local Powershell before then you have to first Set-ExecutionPolicy ⚠️ If you don't care just run:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine

πŸ’― Brand

✍️ Concept

βœ… Do

  • Visual is better than text πŸ‘€
  • Compact ➑️ Less space ➑️ More information ➑️ Faster to understand πŸš€

❌ Dont

  • Rounded corners ⬜
  • Shadows 🌀️
  • Multiple unicode directly after each other πŸ₯‡πŸ₯ˆπŸ₯‰

🌈 Colors

Palette

πŸ₯‡ Primary

πŸ₯ˆ Secondary

πŸ₯‰ Tertiary

⚫ Dark

βšͺ Light

🩢 Grey

Are you curious how a 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 colored gradient can come together for an invertible theme in a semantically meaningfull way? Well, here is how you achieve it with 33 colors 🀯

Grayscale

πŸ“„ Typography

  • One symbol after every sentance πŸ’―
  • One symbol at a time πŸ₯‡
  • Pick emoji if possible otherwise unicode βš–οΈ
  • πŸ“ One symbol to summarize a title
  • πŸ’‘ One symbol to summatize a title description and one to think about in the end πŸ€”
  • . are forbidden β›”
  • All components in semio (sketchpad,studio, …) start with a small letter πŸ”‘
  • Did you know that … is just one character?

πŸ”‘ Fonts

πŸ‘€ Visual elements

  • Sharp corners πŸ“
  • Borders β–‘
  • Basic geometric shapes βšͺ

πŸ“Š Stats