Skip to content

Commands

All the main commands are found in the root ./package.json

Project

Install

Install all the development dependencies for the whole project

Terminal window
pnpm i

Web App

Run development server

Runs the nextjs development server with hot reloading.

The server starts on localhost port 3000, or the next available port if 3000 is in use.

The initial page might need time to compile, but after changes are made and the file is saved, the page will automatically be compiled again, and it’s updates are injected into the currant web view for as long as the dev server is running.

Terminal window
pnpm dev

Build

It is recommended that you create a build before you push your changes, or create a pull request, if your build fails locally, it will most likely fail to build on the server.

Terminal window
pnpm build

Preview

To preview the app locally you need to first build the app, then run the builtin nextjs server, the build output for the preview is not the same as the build in the previous step so we need to run:

Terminal window
pnpm build:local
# then
pnpm preview

You will notice that the web app starts immediately when in preview mode.

Creating a release

To create a release you need to push a git tag to the main branch with the format of v0.0.0 this project uses Semantic Versioning so it is Major, Minor and Patch.

Terminal window
git push origin tag v1.0.0
git push origin tag -a v1.0.0 -m "First stable release" # if you want to anotate it

Once the tag has been pushed to GitHub, a build is created with the following meta headers added to the DOM and a release is created.

<head>
...
<meta name="project-date" content="2024 September">
<meta name="project-version" content="v1.0.0>
<meta name="build-date" content="Fri Nov 15 2024">
...
</head>

aws-data

Fetch latest JSON data from AWS

Downloads all the JSON objects from the s3 bucket and copy them into the app store folder.

  • Directoryapp
    • Directorysrc
      • Directorystore
        • Directorydata
          • Directoryjson
            • assets-carrier-api-names.json
            • assets-deployments.json
            • assets-providers.json
Terminal window
pnpm fetch:data

Fetch the current Header/Footer from GSMA

copy the current header/footer from the GSMA website and create components for use in the app.

Terminal window
pnpm clone:components

Docs

Run the docs development server

Terminal window
pnpm docs:dev

Run the docs Preview server

Terminal window
pnpm docs:preview