Search

PythonReactSEOPDF
GitHub Skill

c4-architecture-documentation

Document system architecture using C4 model: context, container, component, code diagrams per ARCHITECTURE.md

Hack23☆ 210 Repository stars53 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

C4 Architecture Documentation Skill

Purpose

Document CIA platform architecture using C4 model for different abstraction levels.

When to Use

  • ✅ Documenting system architecture
  • ✅ Onboarding new developers
  • ✅ Architecture decision records
  • ✅ Security architecture reviews

C4 Model Levels

Level 1: System Context
[External Users] --uses--> [CIA Platform] --uses--> [Riksdagen API]
[CIA Platform] --uses--> [World Bank API]
[CIA Platform] --uses--> [PostgreSQL Database]
Level 2: Container Diagram
[Web Browser] --HTTPS--> [Spring MVC App] --JDBC--> [PostgreSQL]
[Spring MVC App] --HTTPS--> [External APIs]
[Spring MVC App] --uses--> [Redis Cache]
Level 3: Component Diagram
// Service Layer Components
@Component PoliticianService --uses--> @Repository PoliticianRepository
@Component VotingAnalysisService --uses--> @Repository VotingRecordRepository
@Component RiksdagenClient --calls--> [External Riksdagen API]
Level 4: Code
// Detailed class design
public class PoliticianService {
    private final PoliticianRepository repository;
    private final RiksdagenClient riksdagenClient;
    // Implementation details...
}

PlantUML Diagrams

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Person(user, "Citizen", "Wants political transparency")
System_Boundary(cia, "CIA Platform") {
    Container(web, "Web Application", "Spring MVC, Vaadin 8", "Provides UI")
    ContainerDb(db, "Database", "PostgreSQL", "Stores data")
}
System_Ext(riksdagen, "Riksdagen API", "Government data")

Rel(user, web, "Uses", "HTTPS")
Rel(web, db, "Reads/Writes", "JDBC")
Rel(web, riksdagen, "Fetches data", "HTTPS/REST")
@enduml

References

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-03-11
Index updated
2026-03-11
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!