Skip to content

Commit 95b39b7

Browse files
authored
Merge pull request #1 from khaykingleb/backbone
Backbone
2 parents 495eed1 + aaba95b commit 95b39b7

36 files changed

+8865
-0
lines changed

.github/workflows/quality.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Code Quality
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
name: Check all files with pre-commit
12+
timeout-minutes: 30
13+
steps:
14+
- name: Checkout code so that it is available to use in the executing runner
15+
uses: actions/[email protected]
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 21.7.3
23+
24+
- name: Setup pnmp and install dependencies
25+
uses: pnpm/[email protected]
26+
with:
27+
version: 9.1.1
28+
run_install: true
29+
30+
- name: Check all files with pre-commit
31+
uses: pre-commit/[email protected]

.github/workflows/release.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
name: Run release
13+
steps:
14+
- name: Checkout code so that it is available to use in the executing runner
15+
uses: actions/[email protected]
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 21.7.3
23+
24+
- name: Install Semantic Release and plugins
25+
run: npm install -g semantic-release @semantic-release/git @semantic-release/exec
26+
27+
- name: Semantic Release
28+
run: npx semantic-release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
3+
/.cache
4+
/build
5+
.env

.pre-commit-config.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: check-toml
6+
- id: check-yaml
7+
args:
8+
- "--allow-multiple-documents"
9+
- id: check-json
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
exclude: .*\.tsv|.*\.md
13+
- id: check-executables-have-shebangs
14+
- id: check-shebang-scripts-are-executable
15+
- id: check-added-large-files
16+
args:
17+
- "--maxkb=10000"
18+
- id: no-commit-to-branch
19+
args:
20+
- "--branch=master"
21+
- id: debug-statements
22+
- id: name-tests-test
23+
24+
- repo: https://github.com/Yelp/detect-secrets
25+
rev: v1.4.0
26+
hooks:
27+
- id: detect-secrets
28+
args: ["--baseline", ".secrets.baseline"]
29+
30+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
31+
rev: v9.16.0
32+
hooks:
33+
- id: commitlint
34+
stages: [commit-msg]
35+
additional_dependencies:
36+
- "@commitlint/config-conventional"
37+
38+
- repo: https://github.com/pre-commit/mirrors-eslint
39+
rev: v8.56.0
40+
hooks:
41+
- id: eslint
42+
43+
- repo: https://github.com/pre-commit/mirrors-prettier
44+
rev: v3.1.0
45+
hooks:
46+
- id: prettier
47+
stages: [commit]
48+
additional_dependencies:
49+
50+
51+
52+
- repo: https://github.com/streetsidesoftware/cspell-cli
53+
rev: v8.8.0
54+
hooks:
55+
- id: cspell
56+
57+
- repo: https://github.com/antonbabenko/pre-commit-terraform
58+
rev: v1.89.1
59+
hooks:
60+
- id: terraform_validate
61+
- id: terraform_fmt
62+
- id: terraform_tflint
63+
args:
64+
- "--args=--config=__GIT_WORKING_DIR__/infra/.tflint.hcl"

.prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
build
3+
.github
4+
.pre-commit-config.yaml
5+
package.json
6+
pnpm-lock.yaml
7+
README.md

.secrets.baseline

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"version": "1.4.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "HexHighEntropyString",
31+
"limit": 3.0
32+
},
33+
{
34+
"name": "IbmCloudIamDetector"
35+
},
36+
{
37+
"name": "IbmCosHmacDetector"
38+
},
39+
{
40+
"name": "JwtTokenDetector"
41+
},
42+
{
43+
"name": "KeywordDetector",
44+
"keyword_exclude": ""
45+
},
46+
{
47+
"name": "MailchimpDetector"
48+
},
49+
{
50+
"name": "NpmDetector"
51+
},
52+
{
53+
"name": "PrivateKeyDetector"
54+
},
55+
{
56+
"name": "SendGridDetector"
57+
},
58+
{
59+
"name": "SlackDetector"
60+
},
61+
{
62+
"name": "SoftlayerDetector"
63+
},
64+
{
65+
"name": "SquareOAuthDetector"
66+
},
67+
{
68+
"name": "StripeDetector"
69+
},
70+
{
71+
"name": "TwilioKeyDetector"
72+
}
73+
],
74+
"filters_used": [
75+
{
76+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
77+
},
78+
{
79+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
80+
"min_level": 2
81+
},
82+
{
83+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
84+
},
85+
{
86+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
87+
},
88+
{
89+
"path": "detect_secrets.filters.heuristic.is_lock_file"
90+
},
91+
{
92+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
93+
},
94+
{
95+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
108+
},
109+
{
110+
"path": "detect_secrets.filters.regex.should_exclude_file",
111+
"pattern": [
112+
"pnpm-lock.yaml"
113+
]
114+
}
115+
],
116+
"results": {},
117+
"generated_at": "2024-05-05T09:35:04Z"
118+
}

.tool-versions

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nodejs 21.7.3
2+
pnpm 9.1.1
3+
terraform 1.5.4
4+
pre-commit 3.7.0

.version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.0

Makefile

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
SHELL := /bin/bash
2+
.DEFAULT_GOAL = help
3+
4+
##@ Repo Initialization
5+
6+
prerequisite: ## Install prerequisite tools
7+
@echo "Checking and installing required plugins."
8+
@plugins=( \
9+
"terraform https://github.com/asdf-community/asdf-hashicorp.git" \
10+
"pnpm https://github.com/jonathanmorley/asdf-pnpm.git" \
11+
"nodejs https://github.com/asdf-vm/asdf-nodejs.git" \
12+
"pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git" \
13+
); \
14+
for info in "$${plugins[@]}"; do \
15+
read plugin url <<< "$$info"; \
16+
if asdf plugin-list | grep -q $$plugin; then \
17+
echo "Plugin '$$plugin' is already installed."; \
18+
else \
19+
echo "Adding plugin '$$plugin'."; \
20+
asdf plugin-add $$plugin $$url; \
21+
fi; \
22+
done;
23+
@echo "Installing specified versions."
24+
asdf install
25+
@echo "Currently installed versions:"
26+
asdf current
27+
.PHONY: prerequisite
28+
29+
deps: ## Install repo dependencies
30+
@echo "Installing dependencies."
31+
pnpm install
32+
.PHONY: deps
33+
34+
pre-commit: ## Install pre-commit hooks
35+
@echo "Installing pre-commit hooks."
36+
pre-commit install -t pre-commit -t commit-msg
37+
38+
local-init: prerequisite deps pre-commit ## Initialize local environment for development
39+
.PHONY: local-init
40+
41+
##@ Scripts
42+
43+
build: ## Build project
44+
@echo "Building project."
45+
pnpm run build
46+
.PHONY: build
47+
48+
run-dev: ## Run development server
49+
@echo "Running development server."
50+
pnpm run dev
51+
.PHONY: run-dev
52+
53+
run: build ## Run production server
54+
@echo "Starting server."
55+
pnpm run start
56+
.PHONY: run
57+
58+
lint: ## Lint project
59+
@echo "Linting project."
60+
pnpm run lint
61+
.PHONY: lint
62+
63+
format: ## Format project
64+
@echo "Formatting project."
65+
pnpm run format
66+
.PHONY: format
67+
68+
##@ Miscullaneous
69+
70+
create-secrets-baseline: ## Create secrets baseline file
71+
detect-secrets scan > .secrets.baseline
72+
.PHONY: create-secrets-baseline
73+
74+
audit-secrets-baseline: ## Check updated .secrets.baseline file
75+
detect-secrets audit .secrets.baseline
76+
git commit .secrets.baseline --no-verify -m "build(security): update secrets.baseline"
77+
.PHONY: audit-secrets-baseline
78+
79+
clean: ## Clean project
80+
@echo "Cleaning project."
81+
rm -rf node_modules build
82+
.PHONY: clean
83+
84+
##@ Helper
85+
86+
help: ## Display help
87+
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage: \033[36m\033[0m\n"} /^[a-zA-Z\.\%-]+:.*?##/ { printf " \033[36m%-24s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
88+
.PHONY: help

app/components/atoms/Avatar.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export const Avatar = () => {
2+
return (
3+
<div className="flex items-center justify-center p-6">
4+
<div className="h-40 w-40 overflow-hidden rounded-full sm:h-44 sm:w-44 md:h-48 md:w-48 lg:h-52 lg:w-52 xl:h-56 xl:w-56 2xl:h-64 2xl:w-64">
5+
<img
6+
src="/avatar.jpg"
7+
alt="Avatar"
8+
className="h-full w-full object-cover"
9+
/>
10+
</div>
11+
</div>
12+
);
13+
};

app/components/atoms/Copyright.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export const Copyright = () => {
2+
return (
3+
<div className="text-center">
4+
<p>© 2024 Gleb Khaykin</p>
5+
</div>
6+
);
7+
};

0 commit comments

Comments
 (0)