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

frontless

v1.0.7

Published

Frontless is a node.js stack for building universal (ismorphic) javascript applications. At the core, Frontless is just a small Express server that provides a developer with powerful tools for building SSR web applications.

Downloads

7

Readme

Build Status StackShare version MIT license

About

Frontless is a node.js stack for building universal (ismorphic) javascript applications. At the core, Frontless is just a small Express server that provides a developer with powerful tools for building SSR web applications.

Frontless is built around the best javascript technologies: Feathers.JS , Riot.JS, Turbolinks, and Express.

Motivation

In practice, the classic MVVM approach significantly complicates work with data. That causes a front-end developer to write the code, which would be better performed by the server rather than a browser application. The server has to be responsible for things like routing, data requests, user state (sessions), and in some cases - component's view-model. It would make a front-end developer better concentrate on UI rather than repeating the functionality which is done by back-end in more reliable way.

The Stack

Before you start, it is highly recommended to have essential understanding of following technologies: FeathersJS | RiotJS | Turbolinks | ExpressJS

| SERVER | CLIENT | | :------------- |:-------------| | Routing - express.js | Navigation - turbolinks | | View Model - feathers | Data Representation - riot.js | | Layout Rendering - riot/ssr | User input - riot.js | | Sessions - express.js | JWT, Cookies | | Realtime - feathers, socket.io] | @feathers/client | | DB Interface - @feathers/client | Rest/IO - @feathers/client |

Getting Started

  1. Clone this repo or use NPX
  npx create-frontless <app-name>
  1. Setup a MongoDB Server (optional). Frontless reads MONGODB_URI environment variable.
  # config.env
  MONGODB_URI=mongodb://localhost:27017/frontless
  1. Install dependencies and start dev. server
  npm run install
  npm start

Оpen http://localhost:6767 in your browser. Navigate to the playground for examples

Features

Simple routing scheme

Routing in-web applications should be as simple as it is in static sites. With that in mind, any Riot.JS component placed in the pages directory is accessible by browser: [index.riot -> GET /, page.riot -> GET /page].

Also, a page can accept positional arguments and it also has access to the Express request context:

// GET https://example.com/foo@bar;baz
export default {
  async fetch(){
    const {args} = this.req.params;
    const [arg1, arg2] = args;
    console.log(arg1 === 'bar') // true
    // arg2 = baz
  }
}

Synchronous rendering

Frontless can render pages after all asynchronous calls are complete. Including children riot components nested inside the page markup.

Server-sent state

Some API requests can return a ready view-model for a specific component. After it happens, the target component will update its state from received response. This is convenient whenever you want to update the view after a request is done. Given that, the server should return a ready view-model which eliminates extra steps you would do to handle response.

State initialization

All Riot components rendered on the server side initialize in browser with last state they were on the server side.

RestAPI/Socket.IO

Stay close to the database with power of FeathersJS services.

It is just Express.JS

Everything you can do with an express application.

Documentation

Frontless Docs | Feathers Docs | Riot Docs

❤️ Contribute

If you found a problem and know the solution:

  • Fork repository
  • Fix the problem
  • Push your fix to a separate branch
  • Make pull request to the development branch

If you need help, just open an issue

If you understand how it works under the hood, or feel like you can make this project better don't hesitate to message me directly.

License

This project is licensed under the MIT License - see the LICENSE file for details

Changelog v1.0.x

v1.0.4

  • [x] Update riot.js to v4.3.7
  • [x] Update riot-jss to v1.0.8

v1.0.2

  • [x] Replace browserify-hmr module with more reliable feature #62

v1.0.0

  • [x] SSR
  • [x] Natural Routing
  • [x] Database Interface
  • [x] Users and Sessions
  • [x] Server Sent State (w/feathers.js)
  • [x] Socket IO (w/feathers.js)
  • [x] Plugin support
  • [x] Configuration
  • [x] Modify RiotJS to work with DI (inject document, Node, and global ctx)

Roadmap v2.0

  • [ ] Static site builder [10%]
  • [ ] Global state syncronization
  • [ ] Push Notifications

Authors

Credits

Readme

Why B2B startups shouldn't use React