0.0.4-demo • Published 2 years ago

demo-al-core-pkg v0.0.4-demo

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Introduction

  • 100 Phlex Pro User Portal React
  • version 1.0.0

react badge tailwind css badge next js badge typescript badge

Index

About

Next.js frontend for Phlex Pro User Portal Using MobX state management

Installation

  • Commands to setup project
  1. Install node packages
$ npm install

Commands

  • Commands to start the project.
  1. Start local server
$ npm run dev
  1. Build project
$ npm run build
  1. Serve project from build - make sure you run npm run build first
$ npm run start

Pre-Requisites

List all the pre-requisites the system needs to develop this project.

  • Node v16

Development Environment

Write about setting up the working environment for your project.

  • Clone the repository.
  • Make sure you are using node v16+
  • Install the node modules using npm install
  • Open the project using visual studio code and setup Sonarlint

Setting up SonarCloud lint configuration

  1. Install Sonarlint VS code extension
  2. Add the following entries into settings.json file
    "sonarlint.pathToNodeExecutable": "<<PATH>>",
    "sonarlint.connectedMode.connections.sonarcloud": [
        {
            "organizationKey": "<<ORG-KEY>>",
            "token": "<<TOKEN>>"
        },
    ],
    "sonarlint.connectedMode.project": {
        "projectKey": "<<PROJECT-KEY>>"
    },

How to find Organisation key and project key

  1. Go to Sonar Cloud
  2. Sign in if required (use bitbucket authentication)
  3. Naviagte to on Profile > My Organisations > Atlas Labs
  4. Find project name and navigate into it
  5. Navigate to information on the left slide in navigation
  6. Copy Org and Project key on right side of the page.

How to generate token

  1. Go to Sonar Cloud
  2. Sign in if required (use bitbucket authentication)
  3. Navigate to on Profile > ORGANISATION_NAME
  4. Navigate to Security
  5. Generate Token

Checking Sonar Cloud Output

  1. Open VS code commands dropdown CMD + SHIFT + P
  2. Select SonarLint: Show SonarLint Output

File Structure

Add a file structure here with the basic details about files, below is an example.

NoFile NameDetails
1pages/_app.tsxEntry point
2components/Component Souce Code
3interfaces/Interfaces
4interfaces/index.tsUse to group exports
5stores/State management Source Code
6stores/GenericStore.tsGeneric Type Store to be extended for specific type stores
7api/Network request Source Code
8api/GenericRepository.tsGeneric type Repository to be extended for specific repositories

Build

  • Build project
$ npm run build
  • Build project to run on Docker
$ docker build -t client . && docker run --name CLIENT_CONTAINER -p 0.0.0.0:3000:3000 client