Skip to content

MONEI/docs

Repository files navigation

MONEI Documentation

This repository contains the documentation website for MONEI, built using Docusaurus 3, a modern static website generator.

Development

Prerequisites

  • Node.js version 22.0 or above
  • Yarn version 4.7.0 or above

Installation

yarn

Local Development

yarn start

This command starts a local development server and opens a browser window. Most changes are reflected live without having to restart the server.

Generate API references

REST

yarn genapi:rest

This command generates REST API documentation from the openapi.json file and outputs it as MDX files in the docs/apis/rest folder.

During production builds, the latest version of the OpenAPI file is downloaded with the following command:

aws s3 cp s3://$JS_BUCKET/api/v1/openapi.json ./openapi.json

GraphQL

yarn genapi:graphql

This command generates GraphQL API documentation from the schema.graphql file and outputs it as MDX files in the docs/apis/graphql folder.

During production builds, the latest version of the GraphQL schema is downloaded with the following command:

yarn rover graph introspect https://graphql.monei.com/ --output schema.graphql

Build

yarn build

This command generates static content into the build directory and can be served using any static content hosting service.

Deployment

yarn deploy

This command builds the website and deploys it according to the configuration in your docusaurus.config.js file.

Code Quality

Prettier

This project uses Prettier for code formatting. The formatting is automatically applied to staged files before each commit using lint-staged and husky.

To manually format all files:

npx prettier --write .

Pre-commit Hooks

Pre-commit hooks are set up using husky and lint-staged to ensure code quality:

  • All staged files are automatically formatted with Prettier before each commit

License

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