Code Monkey home page Code Monkey logo

gai's Introduction

This is a Next.js project bootstrapped with create-next-app.

NVM

This step is optional but it is highly suggested you to use NVM.

Instalation instructions can be found here: https://github.com/nvm-sh/nvm#installing-and-updating

Once installed run:

nvm use

Setup

Install node dependencies:

yarn install

Getting Started

First, run the development server:

yarn dev

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

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

Forking from BaseApp

After forking baseapp:

  • Run bash startup.sh to copy the templates

NextJS + MUI v5

Settings according to reference repo

Building docker images for K8s

Our current K8s stack expects 2 images built from the FE Dockerfile. We use a multi-stage Dockerfile, so you need to specify the right target for each of them:

  • Webapp image (webapp_image)
docker build --platform linux/amd64 --tag registry.tsl.io/<project>/<project>-webapp:<version> --target runner .
  • Webapp build image (webapp_build_image)
docker build --platform linux/amd64 --tag registry.tsl.io/<project>/<project>-webapp-build:<version> --target builder .

<version> can be anything you want. For example, if you wanted to deploy a baseapp feature that is still in progress just to test it out and its JIRA ID was BA-123, you could use that ID to identify your images. In this example you would run:

docker build --platform linux/amd64 --tag registry.tsl.io/baseapp/baseapp-webapp:BA-123 --target runner .

and

docker build --platform linux/amd64 --tag registry.tsl.io/baseapp/baseapp-webapp-build:BA-123 --target builder .

Storybook

Use this command to run Storybook:

yarn storybook

After that the Storybook tab should open and run on the port 6006.

The stories file should be created following this path:

...components/MyComponentFolder/stories.@(js|jsx|ts|tsx)

This is how it look a Basic Storybook stories file:

import type { Meta, StoryObj } from '@storybook/react'
import { MY_COMPONENT } from 'MY_COMPONENT_PATH'

const meta: Meta<typeof MY_COMPONENT> = {
  title: 'TITLE_OF_THE_FOLDER_SHOWN_ON_STORYBOOK',
  component: MY_COMPONENT,
}

export default meta
type Story = StoryObj<typeof MY_COMPONENT>

export const NAME_OF_COMPONENT_TO_BE_SHOWN_ON_STORYBOOK: Story = {
  args: {
    DEFAULT_PROPS_FOR_COMPONENT for example:
    label: 'My Default Label'
  },
}

gai's People

Contributors

nossila avatar ficast avatar priscilladeroode avatar anicioalexandre avatar janekk avatar whatsocks avatar pablogadhi avatar

Watchers

Chris Johnston avatar

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.