Skip to content

Commit

Permalink
init project
Browse files Browse the repository at this point in the history
  • Loading branch information
napalmpapalam committed Dec 7, 2023
1 parent 0eb8150 commit 48e4ece
Show file tree
Hide file tree
Showing 131 changed files with 18,816 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.git
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/*.js
index.html
*.md
static/env.js
91 changes: 91 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
module.exports = {
root: true,
env: {browser: true, es2021: true},
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:react-i18n/recommended',
'prettier',
],
overrides: [
{
files: ['**/*.ts?(x)'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
},
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
plugins: ['simple-import-sort', 'prettier', '@typescript-eslint', 'react-i18n'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: '.',
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
react: {
version: 'detect',
},
},
rules: {
'prettier/prettier': ['error', {}, {usePrettierrc: true}],
'arrow-parens': 0,
'no-debugger': 1,
'no-warning-comments': [
1,
{
terms: ['hardcoded'],
location: 'anywhere',
},
],
'no-return-await': 0,
'object-curly-spacing': ['error', 'always'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'no-var': 'error',
'comma-dangle': [1, 'always-multiline'],
'linebreak-style': ['error', 'unix'],
'max-len': [
1,
{
code: 100,
comments: 100,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
'no-console': [
1,
{
allow: ['warn', 'error'],
},
],
'react-i18n/no-dynamic-translation-keys': 'error',
'react-i18n/no-missing-interpolation-keys': 'error',
// disable unnecessary rules from recommendations
'react/display-name': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
}
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Set the default behavior, in case devs don't have core.autocrlf set.
* text=auto

# Declare files that will always have LF line endings on checkout.
*.* text eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.webp binary
*.otf binary
*.ttf binary
*.woff binary
*.woff2 binary
*.wasm binary
*.zkey binary
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- 'main'

jobs:
converge:
name: Converge
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install werf
uses: werf/actions/[email protected]

- name: Log in to registry
# This is where you will update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Run echo
run: |
werf version
docker version
echo $GITHUB_REPOSITORY
echo $GITHUB_SHA
- name: Run Build
run: |
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA
35 changes: 35 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
converge:
name: Converge
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install werf
uses: werf/actions/[email protected]

- name: Log in to registry
# This is where you will update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Run echo
run: |
werf version
docker version
echo $GITHUB_REPOSITORY
echo $GITHUB_REF_NAME
- name: Run Build
run: |
. $(werf ci-env github --as-file)
werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# dependencies
/node_modules
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
package-lock.json

# build
dist/

# tests
test/unit/coverage

# os
.DS_Store

# linters
.eslintcache

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
selenium-debug.log
stats.html

# typescript
*.tsbuildinfo

# editor directories and files
.vscode/*
!.vscode/settings.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env.analyze
.env.development
.env.production

# Sentry Auth Token
.env.sentry-build-plugin
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
dist
coverage
.eslintcache
yarn.lock
scripts/*.js
index.html
stats.html
*.md
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "avoid",
"trailingComma": "all"
}
6 changes: 6 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/styles/_reset.scss
src/styles/_colors.scss
static
dist
stats.html
{**/*,*}.{js,ts,jsx,tsx,html}
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarnPath: .yarn/releases/yarn-4.0.2.cjs
nodeLinker: node-modules
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [Unreleased]

## [0.1.0] - 2023-12-07
### Changed
- Initiated project

[Unreleased]: https://github.com/rarimo/dashboard-rarime/compare/0.1.0...HEAD
[0.1.0]: https://github.com/rarimo/dashboard-rarime/releases/tag/0.1.0

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:18-alpine as builder
RUN apk --no-cache --update --virtual build-dependencies add \
python \
make \
g++

ARG BUILD_VERSION
WORKDIR /app
COPY package*.json ./
COPY yarn*.lock ./
RUN yarn install
COPY . .
RUN VITE_APP_BUILD_VERSION="$BUILD_VERSION" yarn build

FROM nginx:1.20.2-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /build/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Zero Block Global Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 48e4ece

Please sign in to comment.