Skip to content

leraniode/alolyte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

✦ Alolyte

Programmable SVG design library for Go.

Alolyte lets you compose high-quality, reusable, and animated SVG graphics using code β€” no GUI, no raw XML editing, just Go.

It sits between "hand-edit SVG by hand" and "use Figma" β€” a code-first design runtime for developers who want programmable, composable visuals.


Status

In Development. The core runtime is in place. Widgets, CLI, and animations are coming in v0.1.


Concept

Widget   β†’   Instance   β†’   Document   β†’   SVG file
(SVG file)   (placed on     (the canvas)
              canvas with
              transforms
              + params)

Widget β€” a reusable .svg file with Go text/template variables for parameterization.

Instance β€” a widget placed at a position on the canvas, with scale, rotation, and param overrides.

Document β€” the canvas. Holds all instances and exports the final composed SVG.


API Preview

canvas := doc.NewDocument(800, 600).WithBackground("#0f0f1a")

bg, _  := widget.Load("assets/widgets/aurora_background.svg")
orb, _ := widget.Load("assets/widgets/gradient_orb.svg")

canvas.Add(instance.At(bg, 0, 0,
    instance.WithParams(instance.Params{
        "ID": "bg", "ColorA": "#6366f1", "ColorB": "#ec4899",
    }),
))

canvas.Add(instance.At(orb, 200, 100,
    instance.WithScale(1.4),
    instance.WithParams(instance.Params{
        "ID": "orb1", "PrimaryColor": "#ffffff", "SecondaryColor": "#a78bfa",
    }),
))

canvas.Export("output.svg")

Widget SVGs use Go template syntax for parameters:

<stop offset="0%"
  stop-color="{{if .PrimaryColor}}{{.PrimaryColor}}{{else}}#a78bfa{{end}}"/>

Project Structure

alolyte/
β”œβ”€β”€ doc/              # Document β€” canvas, composition, export
β”œβ”€β”€ widget/           # Widget β€” SVG loader, template renderer, registry
β”œβ”€β”€ instance/         # Instance β€” placement, transforms, param overrides
β”œβ”€β”€ assets/
β”‚   └── widgets/      # Built-in SVG widgets (coming in v0.1)
└── examples/         # Usage examples

Roadmap

v0.1

  • widget β€” SVG file loader with Go template param support
  • widget β€” Registry to scan and index a widgets folder
  • instance β€” Placement with position, scale, rotation, params
  • doc β€” Document canvas with Add, Render, Export
  • Tests for all three packages
  • Built-in widget collection (gradient_orb, aurora_background, geometric_ring, glow_text, noise_texture)
  • Example usage in examples/ folder
  • CLI: alolyte list, alolyte preview, alolyte render, alolyte new
  • Terminal image preview via Charm Mosaics
  • First real example output β€” animated logo mark

v0.2+

  • Widget manifest (widget.yaml) β€” metadata, param schema, preview thumbnail
  • alolyte pull <pack> β€” widget packs from GitHub
  • Animation props (delay, duration, easing as params)
  • DSL syntax sugar for common composition patterns

Contributing

See CONTRIBUTING.md.


License

MIT Β© leraniode


Part of Leraniode – Building Tools that feel alive 🌱.

Leraniode

About

Programmable SVG design library for Go 😎✨.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages