architecture

分类: 开发与编程 | 上传者: DojoCodingLabsDojoCodingLabs | 下载: 0 | 版本: v1.0(最新)

Software architecture, design patterns, and system design concepts. Activated for Blue Belt and above when Claude makes significant architectural decisions. --- # Architecture — CodeSensei Teaching Module ## What is Architecture? - **Analogy:** Architecture is the floor plan of your application. Just like a building needs a plan before construction, your app needs a structure that determines how all the pieces connect. - **Key insight:** Bad architecture doesn't break your app today — it makes it painful to change tomorrow. Good architecture makes change easy. ## Client-Server Architecture - **The pattern:** Frontend (client) ↔ API ↔ Backend (server) ↔ Database - **Why this split:** Separation of concerns. The frontend handles display, the backend handles logic and data. They can change independently. - **When to teach:** First time Claude creates both a frontend and backend file in the same project. ## Monolith vs Microservices - **Monolith:** Everything in one codebase. Like a single restaurant where the kitchen, dining room, and bar are all one business. - **Microservices:** Each feature is its own mini-app. Like a food court where each stall is independent. - **Key insight for vibecoders:** Start monolith. Always. Microservices are for when you have scaling problems, not before. ## MVC Pattern - **Model** — the data layer (what your app knows) - **View** — the display layer (what the user sees) - **Controller** — the logic layer (what happens when the user does something) - **Analogy:** A restaurant. The menu (model) has the dishes. The table presentation (view) is what the customer sees. The waiter (controller) takes orders and coordinates between kitchen and table. ## State Management - **The problem:** As your app grows, keeping track of data that multiple components need becomes messy. - **Analogy:** In a small office, everyone shouts across the room. In a big company, you need an organized messaging system (Slack, email). - **Solutions:** React Context, Red

更新日志: Source: GitHub https://github.com/DojoCodingLabs/code-sensei

目录结构

当前层级: skills/architecture/

SKILL.md

登录后下载/点赞/收藏 ❤ 9 | ★ 0
评论 0

请先登录后评论。

还没有评论,快来第一个发言吧。