GithubHelp home page GithubHelp logo

accessmod-app's Introduction

AccessMod app

This repository contains the code of the frontend application of the AccessMod project.

Docker image can be found in the Github package repository.

Architecture overview

The AccessMod application is a Next.js application. It is a frontend app designed to connect to an OpenHexa instance.

The app communicates with OpenHexa through its GraphQL API, and uses the standard OpenHexa cookie-based authentication.

Deployment

The project is meant to be deployed in a containerized environment, such as Kubernetes.

The following environment variables should be provided at build time (for the docker build or npm run build):

  • RELEASE: a release identifier, such as a Git tag (used for uploading source maps to Sentry)
  • SENTRY_AUTH_TOKEN: A valid Sentry authentication token

The following environment variables should be provided at run time:

  • GRAPHQL_ENDPOINT: the URL of the OpenHexa GraphQL API
  • SENTRY_DSN: the Sentry DSN
  • SENTRY_TRACES_SAMPLE_RATE: the Sentry sampling rate of traces
  • SENTRY_ENVIRONMENT: the Sentry environment tag

Local development

First, install the dependencies

npm install

Then, copy the sample .env.local.dist and adapt it to your needs:

cp .env.local.dist .env.local

Finally, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

NPM Scripts

  • npm run dev: Launch Nextjs in dev mode and watch files to extract graphql code and generate typescript types and hooks
  • npm run next: Launch only the Nextjs app in dev mode
  • npm run build: Build the Nextjs app
  • npm run start: Start the app from the build directory (it has to be built before)
  • npm run test: Run the tests in watch mode
  • npm run test:ci: Run all the tests in CI mode
  • npm run lint: Lint files in src/ using eslint
  • npm run format: Format files in src/ using prettier
  • npm run prepare: This script is called automatically by npm on npm install. It adds the pre-commit hook
  • npm run schema: Run an introspection query on the graphql backend and generate a schema.graphql file. This file is used to generate typescript types & for DX in the IDE
  • npm run codegen: Generate typescript types found in all the files based on schema.graphql
  • npm run i18n:extract: Extract translatable strings and write messages.json files for each language

Translations Management

To extract new strings from the src/ directory, run the extract command:

npm run i18n:extract

Translations are stored in public/locales/[lang]/[namespace].json. The default namespace is messages.

accessmod-app's People

Contributors

cheikhgwane avatar dependabot[bot] avatar pvanliefland avatar qgerome avatar yannforget avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pvanliefland

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.