MCPcopy Index your code
hub / github.com/davestewart/vuex-pathify

github.com/davestewart/vuex-pathify @v1.5.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5.1 ↗ · + Follow
75 symbols 160 edges 28 files 11 documented · 15% updated 4y agov1.5.1 · 2021-08-10★ 1,35830 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

splash

Overview

Pathify makes working with Vuex easy, with a declarative, state-based, path syntax:

pathify-diagram

Paths can reference any module, property or sub-property:

pathify-diagram

Pathify's aim is to simplify the overall Vuex development experience by abstracting away Vuex's complex setup and reliance on manually-written code. The path syntax does the heavy-lifting, with a small set of helper functions used to directly access or wire up components to the store.

Examples

Get or set data without syntax juggling or worrying about implementation:

store.get('loaded')
store.set('loaded', true)

Reach into sub-properties and arrays:

store.get('products@items.0.name')
store.set('products@items.1.name', 'Vuex Pathify')

Set up one or two-way data binding on any store value without bloat or fuss:

computed: {
  products: get('products'),
  category: sync('filters@category')
}

Wire multiple properties (or sub-properties) using array, object and wildcard formats:

computed: {
  ...sync('filters@sort', [
    'order', 
    'key'
  ]),

  ...sync('filters@sort', {
    sortOrder: 'order',
    sortKey: 'key'
  }),

  ...sync('filters@sort.*')
}

Use variable expansion to dynamically reference store properties:

computed: {
  product: get('products@items:index')
}

Set up mutations – including sub-property mutations – in a single line:

make.mutations(state)

Results

In practical terms, Pathify results in:

  • less cognitive overhead
  • zero store boilerplate
  • one-liner wiring
  • cleaner code
  • lighter files

The code comparison demo demonstrates reductions in lines of code of between 2 and 14 times (or more) depending on store size and setup.

To see the principles behind such radical code reduction, check out the Pathify 101.

Next steps

Get started:

Demos:

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 63
Interface 6
Class 4
Method 2

Languages

TypeScript100%

Modules by API surface

src/utils/object.js9 symbols
src/helpers/component.js8 symbols
docs/assets/js/plugins.js7 symbols
types/index.d.ts6 symbols
src/services/wildcards.js6 symbols
src/services/resolver.js5 symbols
src/services/store.js4 symbols
src/helpers/store.js4 symbols
src/classes/Payload.js4 symbols
docs/pages/appendix/products.js4 symbols
src/services/paths.js3 symbols
src/helpers/modules.js3 symbols

For agents

$ claude mcp add vuex-pathify \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page