npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fractal-core

v6.0.6

Published

A minimalist and well crafted app, content or component is our conviction

Downloads

55

Readme

Build Status Join the chat at https://gitter.im/Fractal-core/Lobby

We believe in more than frameworks, we believe that minimalist and well crafted software will change the world. Lets build your ideas with elegance and simplicity with Fractal.

TLDR

We use better tools, we move fast, we love innovation ... Oh and Fractal is fractal, this means you can embed any Fractal app inside another with no effort.

Features

  • Minimal, simple and composable architecture that scales
  • Simple inter-component comunication via messages, you can broadcast messages to all components and listen for them
  • Async operations made simple. Fractal make a wide use of async functions and you can use it in your app
  • We gives you powerful patterns and composing tools that helps you to build small and large apps like Legos
  • Excellent developer experience. We love to improve your experience, for now we have hot-swapping support but wait more dev tools in the short term
  • Lazy loading support
  • Prerendering and Server Side Rendering support
  • Blazingly fast because we use caching. This is possible because actions are the unique way of updating the state and the component view changes only depends on state so we only compute components that are actually needed. For DOM updates we use Snabbdom that it's pretty fast but you can use whatever DOM library you want, e.g. React
  • Excellent error / warn handling:
    • Your app will never crash for a runtime error (Actually under testing, if you have an uncovered case please open an issue)
    • Application logs are meaningful. No more WTF?!! errors, if you see one, report it and we will fix it in a timely manner
  • You can easly serialize side effects, this means you can run Fractal in a Web Worker, in a server via Websockets or even in a remote browser via WebRTC, crazy right? :'). An example comming soon...
  • High code quality, we love that!! We helps you to achive it in your proyect :heart:

See the design document. In order to be scalable, Fractal is implemented using Typescript

We make use of Fractal in our projects and this library is continuosly evolving, be in touch...

How it works?

Concepts:

  • Module: A engine for you app, connect a component tree to the external world.
  • Component: Is a part of your app, a component have:
    • State: The component changing data.
    • Inputs: Async processes that recieve messages (data) from other components or outside the app, in an Input you can:
      • Send messages to other Inputs (same Component).
      • Send messages to other Components via Inputs.
      • Send messages outside the aplication with Tasks.
      • Perform side effects but only while prototyping, after that you should use Tasks.
    • Actions: The only way to change the state.
    • Interfaces: Here lives continous and hierachical connections with external world, the most common Interface is the view.
    • Groups: Data that can be used when a component is initialized, we use it for styles.
  • Task: A mechanism to send messages to external world in a clean way (AKA perform side effects nicely), e.g. get some data from your local database.
  • Handlers: Perform side effects, they receive messages from Tasks and hierachical structures from Interfaces and handle them.

Techniques:

  • Fractal architecture: This is a kind of unidirectional user interface architecture see an insightful article here by @staltz.
  • Reactive views: We use Snabbdom for rendering.
  • CSS in JS: We create styles in JS using TypeStyle, see this Vjeux slides.
  • Typescript: We use TypeScript that is the same as JS but optionally you can have some types, we use it for better tooling see this Eric Elliot article. Our lemma is to be fast with dynamic types but use types for stable code and some data modeling. We use it for:
    • A nice autocomplete for Styles and JavaScript
    • Errors in Styles (via TypeStyle)
    • Type some data models
    • Type functions
    • Catch syntax errors and a few bugs
  • Hot-swapping: Live develop your application with no state loss. It gives you a nice developer experience.
  • JS Bundling / Loading: FuseBox :fire::fire::fire: We love it! is fast, clear and powerful ... Oh! I said it's fast? .. Well, it's blazingly fast, let's try it!

Future

  • Nice in-app debugger with timetravel debugging and a component tree view
  • A list of all possible errors can happen with their respective solution, this can evolve including links within error logs
  • We have high code quality standards and development flows you and your team can follow, from prototyping to production code (We will publish these soon ...)
  • Prototype with ease and transform to a production level code with easy (Guide comming soon...)
  • We support hot-swapping code in production :rose: (soon)

Getting started

The recomended way is using FuseBox, please download the Fractal-quickstart or Fractal-featured repo depending on your needs, this gives you all things ready to start hacking.

Or in nodejs, browserify, Webpack like environments:

npm i --save fractal-core

Or with yarn:

yarn add fractal-core

Note for VSCoders, you can use the Fractal VSCode Extension

Examples

Working examples you can start hacking immediately:

Tutorial

See our tutorial and the examples (We are refactoring examples and tutorial, be in touch ...).

Note: The tutorial is not updated, we will update it soon.

Related Projects

Development Notes

See our Development Documentation