Web Platform Components
This is the base platform for serving Meetup web apps including the public website and admin. It provides a Hapi webserver and a set of conventions for composing applications with React + Redux.
In general, application-specific code will live outside of this package.
- App configuration
- Auth plugin
- Rendering in consumer applications
- Routing module
- Language plugin for Hapi
- API proxy plugin for Hapi
- Click and Activity tracking
- API State module
- 'Query': structuring data requests - GET/POST/PATCH/PUT/DELETE requests to REST API
- Redux store modules - browser and server
- Security Policy headers
This package uses semver versioning to tag releases, although the patch version
is determined exclusively by the Travis build number for pushes to
Major and minor versions are hard-coded into the Makefile.
Manual pushes to
master and PR merges to master will be built by Travis, and
will kick off the yarn publish routine. The currently-published version of the
package is shown on the repo homepage on GitHub in a badge at the top of the
When developing a consumer application that requires changes to the platform code, you can release a beta version of the platform on npm by opening a PR in the meetup-web-platform repo. When it builds successfully, a new beta version will be added to the list of available npm versions. The generated version number is in the Travis build logs, which you can navigate to by clicking on 'Show all checks' in the box that says 'All checks have passed', and then getting the 'Details' of the Travis build.
At the bottom of the build log, there is a line that
If you click the disclosure arrow, the version number will be displayed, e.g.
You can then install this beta version into your consumer application with
> yarn add -W \ mwp-api-state@<version tag> \ mwp-app-render@<version tag> \ mwp-app-server@<version tag> \ mwp-config@<version tag> \ mwp-core@<version tag> \ mwp-i18n@<version tag> \ mwp-router@<version tag> \ mwp-store@<version tag> \ mwp-toaster@<version tag>
Each time you push a change to your
meetup-web-platform PR, you'll need to
re-install it with the new tag in your consumer application code.
The overall workflow is:
- Open a PR for your
- Wait for Travis to successfully build your branch (this can take 5+ minutes)
- Get the version string from the build logs under
- Update the
mwp-cli) on your consumer application and test the changes
- (if needed) Push changes to your
- Repeat steps 2-3
Adding a new package
- Create a new mwp-* directory in
- Add a new
package.jsonfile in the new package
- Add a line to
before_installto create a
.npmrcfile that will enable NPM publishing
- Increment the version number (a point release is usually okay since a new package is not a breaking change of existing packages)
- Add a line to the
If other MWP packages will depend on the new package, you'll need to first publish the package without updating dependencies in other packages, and then make a new release that updates the other packages with the new dependency - the dependency must exist in NPM before it can be specified as a dependency.