MCPcopy Index your code
hub / github.com/factorapp/factor

github.com/factorapp/factor @v0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.1 ↗ · + Follow
127 symbols 278 edges 57 files 14 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Factor

Factor is a tool for building SPA web applications in Go using Web Assembly (WASM).

Factor is heavily inspired by Svelte and Sapper, but doesn't attempt to be a straight port, but rather take those ideas and present them in a way natural for a Go developer.

Application Structure

├ app
│ ├ App.html # Main/initial view
│ └ template.html # application template
├ assets
│ ├ # your files here
├ components 
│ ├ # your files here
├ routes
│ ├ # your routes here - these are pages.
│ ├ _error.html
│ └ index.html

Requirements

WASM support is only available in Go 1.11, which is not yet officially released, so you'll need to download a pre-release:

$ go get golang.org/x/build/version/go1.11beta1

Then, use go1.11beta1 when building.

Development

$ cd factor
$ go1.11beta1 install

Make sure you have $GOPATH/bin in your executable path (i.e. $PATH) and your factor CLI is ready to go, hot off the presses.

Notes

  • Factor enforces very strict HTML rules. `

will break. Close all self-closing tags properly:

. Failing to do this will result in an error likeelement input closed by form` in your generated Go files.

Core symbols most depended-on inside this repo

writeTemplate
called by 11
cmd/init.go
Create
called by 8
examples/models/todo_server.go
SanitizedName
called by 2
files/files.go
IsHTML
called by 2
files/file_types.go
GeneratedGoFileName
called by 2
files/file_types.go
ComponentName
called by 2
files/file_types.go
NewTranspiler
called by 2
component/transpiler.go
Code
called by 2
component/transpiler.go

Shape

Function 54
Method 44
Struct 27
Class 2

Languages

Go87%
TypeScript13%

Modules by API surface

examples/app/wasm_exec.js17 symbols
component/component.go10 symbols
model/model.go8 symbols
examples/models/todo_types.go8 symbols
examples/models/todo_server.go7 symbols
component/transpiler.go5 symbols
component/component_test.go5 symbols
files/file_types.go4 symbols
examples/server/main.go4 symbols
cmd/init.go4 symbols
examples/routes/about.go3 symbols
examples/models/todo.go3 symbols

For agents

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

⬇ download graph artifact