Please follow common guidelines for our projects here.
- List of known issues and in case you need to create a new issue, you can do so here.
make install-dependencies
automatically installs python dependencies and pnpm
.
In case the pnpm
installation fails, follow this guide for
different installation options.
camelCase
for variable names.- Indentation: 4 Spaces.
- Regular JS functions are defined like
function someFunction()
- React components are defined using the arrow syntax.
- React Hooks style syntax is used, wherever possible, over the old Class based syntax.
- Build docker image
make build-stg
- Generate private key
openssl genrsa -des3 -out secrets/privkey.pem 2048
- Generate Certificate Signing Request
openssl req -new -key secrets/privkey.pem -out secrets/signing-request.csr
- Remove Passphrase from Key
openssl rsa -in secrets/privkey.pem -out secrets/privkey.pem
- Generate self signed certificate
openssl x509 -req -days 365 -in secrets/signing-request.csr -signkey secrets/privkey.pem -out secrets/fullchain.pem
- Start dashboard container
make run-container-stg
- Install CA (optional)
cp secrets/fullchain.pem /usr/local/share/ca-certificates/dashboard-fullchain.crt
sudo update-ca-certificates
While transpiling and packing code, Vite continuously watches all dependencies for changes. It's not uncommon to encounter a system limit on the number of files you can monitor.
Increase it with
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Other things to consider is our usage of React Router and React Query. If the component is making use of these in any way, such as useParams
from React Router, or useQuery
from React Query, we need to add those to the default export. Take CoprBuildsTable
component here which has both.
Here we need to import both withRouter
to allow us to use hooks from React Router, and use our own withQueryClient
so that React Query doesn't freak out due to not having a React Context
import React from "react";
import { CoprBuildsTable } from "./CoprBuildsTable";
export default {
title: "CoprBuildsTable",
component: CoprBuildsTable,
};
Thank you for your interest!