Skip to content

JavaScript Implementation

The JavaScript layer is Superloom's reference implementation: Node.js 24+, Express on Docker and AWS Lambda for the server, GitHub Packages for module distribution, and the built-in Node.js test runner throughout. Every document in this layer is complete on its own; a JavaScript developer works from here without needing the principles layer.

These documents dictate the JavaScript way. The reasoning behind each rule lives in principles/; each document below implements one or more principles documents, per the mapping table.

Reading Path

For a developer new to the framework, in order:

  1. Project Structure - the directory layout and repository conventions
  2. Code Formatting - spacing, banners, comments, naming, JSDoc
  3. Module Structure - loaders, companions, patterns, and every archetype skeleton
  4. Module Classes - the class taxonomy and where every module belongs
  5. Error Handling - envelopes, catalogs, throw versus return in JavaScript
  6. Testing Strategy and Unit Test Authoring
  7. Client Architecture - the RNW/Expo stack, project layout, and bundler-agnostic rule (entry point to the client/ section)

Document Map

DocumentImplements
project-structure.mdEngineering Philosophy
code-formatting.mdCode Readability
module-structure.mdModule Design, File Archetypes
factory-vs-singleton.mdModule Design
module-classes.mdModule Design
dependencies.mdModule Design
error-handling.mdError Handling
validation.mdValidation
testing-strategy.md, unit-test-authoring.md, module-testing.md, integration-testing.mdTesting
module-docs.md, module-docs-complex.md, module-thoughts-file.mdModule Design, Documentation Authoring
publishing.md, versioning/Versioning and Releases
dto-philosophy.md, server/Server Architecture
client/Client-side architecture: stack, loader, theming, fonts, components, super-app shapes, module taxonomy
catalog-core.md, catalog-server.md, catalog-client.mdThe published module catalog per tier
pitfalls-migration.mdPitfall journal for module migration work

Module Repositories

Repository roleContents
JS implementation repositoryAll helper modules: src/helper-modules-core/, src/helper-modules-server/, src/helper-modules-client/, and the publish pipeline
JS reference applicationThe working demo application: models, server layers, ops runbook

Repository names and the full multi-repo layout: org-structure.md.

Naming Forms (Two-Form Rule)

A JavaScript module's name exists in exactly two forms:

FormExampleWhere it may appear
Published identity@superloomdev/js-helper-utilspackage.json only (name, dependency targets, repository field)
Alias short-namehelper-utilsEverywhere else: documentation prose, titles, code comments, JSDoc, error prefixes, banners, ROBOTS.md

The bare package name (js-helper-utils) is a directory-layout identifier, acceptable only in URLs that address a real repository path. There is no third form. The alias derivation rule (strip js- and the server/client tier word, keep the rest) lives in code-formatting.md.

This is what keeps the ecosystem forkable: a consumer who renames the scope edits package.json files and nothing else.

Released under the MIT License.