Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2684681
feat: enhance basic-node & basic-python extractors to infer component…
cjlyons Oct 26, 2025
bf7b76b
feat: scaffold and setup the astro extractor
cjlyons Oct 26, 2025
6398bbd
feat: implement Astro file discovery and package detection
cjlyons Oct 26, 2025
f4f4791
feat: implement astro ast parsing
cjlyons Oct 26, 2025
ef301e3
feat: extract jsdoc tags from Astro components
cjlyons Oct 26, 2025
8a15069
feat: code extraction from astro files
cjlyons Oct 26, 2025
6df22c0
feat: ir mapping for astro projects
cjlyons Oct 26, 2025
7827940
feat: complete the core astro extractor logic
cjlyons Oct 26, 2025
59040a9
fix: a couple of id generation regressions were introduced by the ast…
cjlyons Oct 27, 2025
990c79c
feat: enhance astro code item extraction
cjlyons Oct 27, 2025
33c6517
fix: extract jsdoc information from astro files
cjlyons Oct 27, 2025
15d2f36
fix: clean up inferred component generation
cjlyons Oct 27, 2025
f3ddbe3
feat: automate detection of component relationships in the node and p…
cjlyons Oct 27, 2025
b63626a
docs: add comprehensive code documentation to Astro extractor
cjlyons Oct 28, 2025
1581fe9
docs: update ASTRO_EXTRACTOR_PLAN.md - mark Phase 9.1 complete
cjlyons Oct 28, 2025
eb6f761
docs: add user documentation for Astro extractor
cjlyons Oct 28, 2025
68e7516
docs: update ASTRO_EXTRACTOR_PLAN.md - mark Phase 9.2 complete
cjlyons Oct 28, 2025
319d423
docs: document the astro extractor and improve test coverage
cjlyons Oct 28, 2025
f0a0178
docs: fix some inconsistentes, regenerate arch docs
cjlyons Oct 28, 2025
d5675a7
chore: bump dependencies
cjlyons Oct 28, 2025
2350c3a
chore: update dependencies
cjlyons Oct 28, 2025
11e50c2
fix: broken mkdocs links
cjlyons Oct 28, 2025
7941301
fix: update broken links
cjlyons Oct 28, 2025
ee78d4c
fix: update broken links
cjlyons Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- run: npm run lint
- run: npm run typecheck
- run: npm test
- run: npm run build
- name: Publish
run: npm publish --access public --provenance
env:
Expand Down
81 changes: 79 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
> **Code speaks. Archlette listens. Architecture evolves.**

[![npm version](https://img.shields.io/npm/v/@chrislyons-dev/archlette?color=blue&logo=npm)](https://www.npmjs.com/package/@chrislyons-dev/archlette)
[![npm downloads](https://img.shields.io/npm/dm/@chrislyons-dev/archlette?color=blue)](https://www.npmjs.com/package/@chrislyons-dev/archlette)
[![CI](https://github.com/chrislyons-dev/archlette/actions/workflows/ci.yml/badge.svg)](https://github.com/chrislyons-dev/archlette/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

Expand Down Expand Up @@ -35,14 +36,18 @@ See Archlette documenting itself: [architecture docs](docs/architecture/README.m
npm install -D @chrislyons-dev/archlette
```

**Requirements:** Node.js ≥ 18, Java ≥ 11
**Requirements:** Node.js ≥ 18 (Node 20+ recommended), Java ≥ 11

**Free and open-source** — MIT licensed. No accounts, no telemetry, no lock-in.

See [Installation Guide](https://chrislyons-dev.github.io/archlette/getting-started/installation/) for platform-specific setup.

### Annotate

Works with **TypeScript, JavaScript, and Astro** components:

**TypeScript/JavaScript:**

```typescript
/**
* @module UserService
Expand All @@ -58,6 +63,31 @@ export class UserService {
}
```

**Astro Components:**

```astro
---
/**
* @component Button
* Reusable button component with multiple variants
*
* @uses Icon Displays button icon
* @actor User {Person} {in} Clicks button to trigger action
*/

interface Props {
variant?: 'primary' | 'secondary';
disabled?: boolean;
}

const { variant = 'primary', disabled = false } = Astro.props;
---

<button class={`btn btn-${variant}`} disabled={disabled}>
<slot />
</button>
```

### Configure

Create `.aac.yaml`:
Expand All @@ -69,9 +99,14 @@ project:
extractors:
- use: extractors/builtin/basic-node
inputs:
include: ['src/**/*.ts']
include: ['src/**/*.ts', 'src/**/*.js']
- use: extractors/builtin/basic-astro
inputs:
include: ['src/**/*.astro']
```

**Note:** Use `basic-node` for TypeScript/JavaScript files and `basic-astro` for Astro components. Both produce compatible IR for aggregation.

### Generate

```bash
Expand Down Expand Up @@ -118,6 +153,48 @@ npx archlette

---

## Extractors

Archlette includes built-in extractors for multiple languages:

### basic-node

Extracts architecture from **TypeScript and JavaScript** codebases using AST analysis with ts-morph.

- Detects components from directory structure or explicit `@component` tags
- Extracts classes, functions, types, and interfaces
- Parses JSDoc annotations for actors and relationships
- Identifies dependencies from import statements

**When to use:** TypeScript/JavaScript projects, Node.js backends, frontend libraries

### basic-astro

Extracts architecture from **Astro components** using the Astro compiler.

- Identifies components from Astro file names or `@component` tags
- Extracts component props, slots, and client directives
- Parses frontmatter code for additional type information
- Detects component composition from template markup
- Works seamlessly with basic-node for full-stack analysis

**When to use:** Astro-based projects, island architecture, mixed TypeScript + Astro applications

### basic-python

Extracts architecture from **Python** codebases using AST parsing (no runtime required).

- Supports Python 3.8+ syntax
- Detects classes, functions, and dependencies

**When to use:** Python projects, data science applications, mixed-language monorepos

### custom-extractors

Write your own extractor to support additional languages or frameworks. See [Plugin Development](https://chrislyons-dev.github.io/archlette/plugins/extractors/).

---

## Features

**Pipeline:**
Expand Down
4 changes: 2 additions & 2 deletions THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The following packages are installed as production dependencies via `package.jso
### NPM Dependencies Summary

```
├─ MIT: 76
├─ MIT: 77
├─ ISC: 10
├─ BSD-3-Clause: 2
├─ Apache-2.0: 1
Expand All @@ -61,4 +61,4 @@ This script:

---

**Last generated**: 2025-10-26
**Last generated**: 2025-10-28
26 changes: 26 additions & 0 deletions archlette.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ extractors:
- '/users/chris/git/bond-math/iac/workers/pricing.toml'
- '/users/chris/git/bond-math/iac/workers/valuation.toml'

- use: extractors/builtin/basic-astro
inputs:
include:
- '/users/chris/git/bond-math/ui/**/*.astro'
exclude:
- '**/*.test.astro'
- '**/.astro/**'
- '**/dist/**'
- '**/build/**'
- '**/node_modules/**'
- '**/*.test.*'
- '**/*.spec.*'
- '**/test/**'
- '**/tests/**'
- '**/vitest.config.ts'

- use: extractors/builtin/basic-node
inputs:
include:
Expand All @@ -45,6 +61,8 @@ extractors:
- '/users/chris/git/bond-math/ui/**/*.tsx'
exclude:
- '**/node_modules/**'
- '**/dist/**'
- '**/build/**'
- '**/*.test.*'
- '**/*.spec.*'
- '**/test/**'
Expand All @@ -60,6 +78,8 @@ extractors:
- '/users/chris/git/bond-math/services/gateway/**/*.tsx'
exclude:
- '**/node_modules/**'
- '**/dist/**'
- '**/build/**'
- '**/*.test.*'
- '**/*.spec.*'
- '**/test/**'
Expand All @@ -75,6 +95,8 @@ extractors:
- '/users/chris/git/bond-math/services/daycount/**/*.tsx'
exclude:
- '**/node_modules/**'
- '**/dist/**'
- '**/build/**'
- '**/*.test.*'
- '**/*.spec.*'
- '**/test/**'
Expand All @@ -93,6 +115,10 @@ extractors:
- '**/*.venv/***'
- '**/test/**'
- '**/tests/**'
- '**/flarelette/**'
- '**/dateutil/**'
- '**/pythonjsonlogger/**'
- '**/six.py'

# ir json in, ir json out (or errors)
validators:
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading