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

diamonds

v0.0.9-q

Published

Clustered Angular, Polymer, Compound, Passport, Famo.us on PM2+NGinx

Downloads

41

Readme

Diamonds

The Super Web Stack

Diamonds are coupled client/server apps composed of Compound, Angular, Polymer, and Famo.us Yeoman generators forming a super HMVC-to-MVVM web & device development stack in full. And yes while Compound alone's a ''full stack'' solution we found it didn't do things that Angular does bindingly bright in browser nor clairvoyantly adept like Polymer nor targets the emergent UI/X plural device standards of Material Design metaphors. While Compound has a strong performance backend its PolyFAng siblings all delegate to a myriad of specialized server platform options making the marriage of Diamonds' poly spouses most ideal.

NPM Installation

Also installs:: angular, closure-compiler, compound, compound-passport, co-socket, famous, famous-angular, generator-famous-angular, generator-polymer, jugglingdb, jugglingdb-redis, passport, pm2, redis, redis-hq-adapter, sass, web-component-tester, and yo.

App install requires about 900MB

Run:

  1. $> npm install diamonds;
  2. $> diamonds <YourAppName>
  3. $> diamonds [test|deploy|gen]

Our meta generator will start by executing 'compound-init ' script installing Compound and patching it for Diamonds. In order to co-create Angular components a new Compound app will be created called ''Diamonds'' exposing JugglingDB's ORM API, view files, along with crud controller & nested routes.

Then script 'yo-init' initialize the Angular/Famo.us and Polymer apps using custom ejs chrome and view partials while mapping Angular dependency injection to the Compound controller for realtime integrated data binding instead of Compound's basic approach. [? Additionally angular_node_bind is used to monitor Node.bind() of Polymer model activity and emit to tandem Angular apps.]

The four projects share same directory with Angular in ''aapp/'', Famo.us in 'fapp/'', Polymer in ''papp/'', with Compound in ''capp/'' keeping code & resources separate.

Diamonds Usage

$> diamonds test|deploy|(generate|remove element <name>[:type | :default | :index]);

Options

  • type = ''Date|Number|Boolean|Text|String'' (default: string)
  • default = ''default value'' (default: null)
  • index = ''true|false'' (default: false) All element names are prefixed 'Dia-' for clarity.

Example: $> diamonds generate element recordTime:Date default=Date.now index=true;

Launch and view app at http://<host>:8080/

Edges and Origin API(s)

Each Diamond has unique origin API server(s) along with list of authorized edge workers. By default Diamonds' origin will use a generic Redis store installed before or during Diamonds if missing. Diamonds' Redis will come configured for local-only, no pw, DB:2 on :6379._ but most vendors have drivers for origin storage (See JugglingDB). Origin (aka Compound) performs backyarding of lapsed TTL Redis keys to an online SQL local or network db. This ensures dormant data aren't squandering server memory yet remain speedily available via SQL.

Edge workers generally provide a rate-limited hyper-consistent cache and queuing 'dumb' API. This is done in our edge configuration via PHP & LevelDB sharded strategy for replication and isolation. In edgeless configs you can use local API queuing via Node & Redis or SQL-only if scaling isn't a concern. Their edge behavior ensures a peformance enhancing shared-nothing data architecture while serially pushing queued edge client data & queries to origin leaving it incorruptable and removed from adding to back pressure.

Or if you want to publicly expose your origin API just intending to use a single machine you can set origin equal to worker forgoing edgewise optimization altogether.

Vulcanize

Polymer's Web Component build tool ...

Closure Compiler

Angular's Production JS optimizer ...

Deploy

  1. $> grunt build; # results in < project >/dist
  2. $> diamonds deploy; # -> pm2 start server.js -i 3 --name <DimaondApp> ...

Now view app at http://<host&gt:8080/

Project Home

  • Here & Github

Source Projects

Credits

Licenses MIT, BSD