diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index c02243c..fb467e8 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -33,4 +33,7 @@ jobs: with: registry: git.hashdot.co username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Website + uses: bun docker:website \ No newline at end of file diff --git a/apps/.gitkeep b/apps/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/website/.gitignore b/apps/website/.gitignore new file mode 100644 index 0000000..6240da8 --- /dev/null +++ b/apps/website/.gitignore @@ -0,0 +1,21 @@ +# build output +dist/ +# generated types +.astro/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/apps/website/.vscode/extensions.json b/apps/website/.vscode/extensions.json new file mode 100644 index 0000000..22a1505 --- /dev/null +++ b/apps/website/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode"], + "unwantedRecommendations": [] +} diff --git a/apps/website/.vscode/launch.json b/apps/website/.vscode/launch.json new file mode 100644 index 0000000..d642209 --- /dev/null +++ b/apps/website/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/apps/website/README.md b/apps/website/README.md new file mode 100644 index 0000000..ad9d066 --- /dev/null +++ b/apps/website/README.md @@ -0,0 +1 @@ +# boring.tools - Website \ No newline at end of file diff --git a/apps/website/astro.config.mjs b/apps/website/astro.config.mjs new file mode 100644 index 0000000..a841613 --- /dev/null +++ b/apps/website/astro.config.mjs @@ -0,0 +1,27 @@ +import starlight from '@astrojs/starlight' +// @ts-check +import { defineConfig } from 'astro/config' + +// https://astro.build/config +export default defineConfig({ + outDir: '../../build/website', + integrations: [ + starlight({ + title: 'boring.tools', + social: { + github: 'https://github.com/boring-tools/boring.tools', + }, + favicon: '/public/favicon.svg', + sidebar: [ + { + label: 'Guides', + items: [{ label: 'Getting started', slug: 'guides/getting-started' }], + }, + // { + // label: 'Reference', + // autogenerate: { directory: 'reference' }, + // }, + ], + }), + ], +}) diff --git a/apps/website/package.json b/apps/website/package.json new file mode 100644 index 0000000..60a689b --- /dev/null +++ b/apps/website/package.json @@ -0,0 +1,19 @@ +{ + "name": "website", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/starlight": "^0.28.2", + "astro": "^4.15.3", + "sharp": "^0.32.5", + "@astrojs/check": "^0.9.3", + "typescript": "^5.6.2" + } +} diff --git a/apps/website/public/favicon.svg b/apps/website/public/favicon.svg new file mode 100644 index 0000000..e1ffddf --- /dev/null +++ b/apps/website/public/favicon.svg @@ -0,0 +1,3 @@ +<svg width="99" height="73" viewBox="0 0 99 73" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M37.792 51.552C37.792 58.08 36.16 63.296 32.896 67.2C29.632 71.04 24.864 72.96 18.592 72.96C12.64 72.96 6.72 71.392 0.832001 68.256V0.959999H6.592V31.68C9.408 29.056 12.096 27.168 14.656 26.016C17.28 24.864 19.936 24.288 22.624 24.288C27.552 24.288 31.296 26.176 33.856 29.952C36.48 33.664 37.792 38.944 37.792 45.792V51.552ZM21.472 29.76C19.424 29.76 17.28 30.272 15.04 31.296C12.864 32.256 10.048 34.336 6.592 37.536V64.992C10.56 66.784 14.464 67.68 18.304 67.68C23.104 67.68 26.528 66.24 28.576 63.36C30.688 60.48 31.744 56.544 31.744 51.552V45.792C31.744 40.288 30.912 36.256 29.248 33.696C27.584 31.072 24.992 29.76 21.472 29.76ZM56.6898 72H49.7778V64.992H56.6898V72ZM98.7078 70.368C97.0438 71.136 95.1238 71.744 92.9478 72.192C90.7718 72.704 88.5638 72.96 86.3238 72.96C82.6118 72.96 79.6358 72.192 77.3958 70.656C75.1558 69.12 73.5238 66.976 72.4998 64.224C71.5398 61.472 71.0598 58.336 71.0598 54.816V32.928H63.1878V23.328H71.0598V10.656H82.0998V23.328H97.2678V32.928H82.0998V54.816C82.0998 57.76 82.6438 59.808 83.7318 60.96C84.8838 62.048 86.5158 62.592 88.6278 62.592C89.6518 62.592 90.7398 62.496 91.8918 62.304C93.1078 62.048 94.4518 61.632 95.9238 61.056L98.7078 70.368Z" fill="white"/> +</svg> diff --git a/apps/website/src/assets/boring.tools.svg b/apps/website/src/assets/boring.tools.svg new file mode 100644 index 0000000..9149480 --- /dev/null +++ b/apps/website/src/assets/boring.tools.svg @@ -0,0 +1,3 @@ +<svg width="486" height="94" viewBox="0 0 486 94" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M37.792 51.552C37.792 58.08 36.16 63.296 32.896 67.2C29.632 71.04 24.864 72.96 18.592 72.96C12.64 72.96 6.72 71.392 0.832001 68.256V0.959999H6.592V31.68C9.408 29.056 12.096 27.168 14.656 26.016C17.28 24.864 19.936 24.288 22.624 24.288C27.552 24.288 31.296 26.176 33.856 29.952C36.48 33.664 37.792 38.944 37.792 45.792V51.552ZM21.472 29.76C19.424 29.76 17.28 30.272 15.04 31.296C12.864 32.256 10.048 34.336 6.592 37.536V64.992C10.56 66.784 14.464 67.68 18.304 67.68C23.104 67.68 26.528 66.24 28.576 63.36C30.688 60.48 31.744 56.544 31.744 51.552V45.792C31.744 40.288 30.912 36.256 29.248 33.696C27.584 31.072 24.992 29.76 21.472 29.76ZM89.9058 45.696V51.456C89.9058 58.24 88.2098 63.52 84.8178 67.296C81.4258 71.072 76.6578 72.96 70.5138 72.96C64.3058 72.96 59.5058 71.072 56.1138 67.296C52.7858 63.52 51.1218 58.24 51.1218 51.456V45.696C51.1218 39.168 52.7858 33.984 56.1138 30.144C59.5058 26.24 64.3058 24.288 70.5138 24.288C76.7218 24.288 81.4898 26.24 84.8178 30.144C88.2098 33.984 89.9058 39.168 89.9058 45.696ZM83.8578 45.696C83.8578 40.576 82.7058 36.608 80.4018 33.792C78.0978 30.976 74.8018 29.568 70.5138 29.568C66.2258 29.568 62.9298 30.976 60.6258 33.792C58.3218 36.608 57.1698 40.576 57.1698 45.696V51.456C57.1698 56.768 58.3218 60.8 60.6258 63.552C62.9298 66.304 66.2258 67.68 70.5138 67.68C74.8018 67.68 78.0978 66.304 80.4018 63.552C82.7058 60.8 83.8578 56.768 83.8578 51.456V45.696ZM128.79 30.048C126.102 30.048 123.414 30.56 120.726 31.584C118.038 32.608 114.902 34.88 111.318 38.4V72H105.558V25.248H111.03V33.024C114.294 29.632 117.334 27.328 120.15 26.112C122.966 24.896 125.846 24.288 128.79 24.288V30.048ZM145.831 11.904H138.919V4.89599H145.831V11.904ZM145.255 72H139.495V25.248H145.255V72ZM185.671 29.76C183.687 29.76 181.415 30.24 178.855 31.2C176.295 32.16 173.095 34.208 169.255 37.344V72H163.495V25.248H168.967V31.968C172.679 28.896 175.943 26.848 178.759 25.824C181.575 24.8 184.199 24.288 186.631 24.288C190.919 24.288 194.183 25.6 196.423 28.224C198.663 30.848 199.783 34.624 199.783 39.552V72H194.023V40.608C194.023 36.832 193.319 34.08 191.911 32.352C190.567 30.624 188.487 29.76 185.671 29.76ZM253.973 78.72C253.973 83.136 252.149 86.688 248.501 89.376C244.853 92.064 239.893 93.408 233.621 93.408C230.293 93.408 226.901 92.928 223.445 91.968C219.989 91.008 216.661 89.472 213.461 87.36L215.765 82.944C219.029 84.992 222.133 86.368 225.077 87.072C228.085 87.84 230.965 88.224 233.717 88.224C238.261 88.224 241.781 87.392 244.277 85.728C246.837 84.128 248.117 81.952 248.117 79.2C248.117 77.216 247.413 75.68 246.005 74.592C244.661 73.504 242.421 72.96 239.285 72.96H228.629C224.725 72.96 221.909 72.064 220.181 70.272C218.453 68.416 217.589 66.4 217.589 64.224C217.589 61.024 219.093 57.728 222.101 54.336C219.861 53.056 218.069 51.264 216.725 48.96C215.381 46.592 214.709 43.776 214.709 40.512C214.709 36.864 215.445 33.856 216.917 31.488C218.453 29.056 220.501 27.264 223.061 26.112C225.685 24.896 228.565 24.288 231.701 24.288H233.333C235.381 24.288 237.237 24.608 238.901 25.248H255.605V30.528L244.853 29.28C246.389 30.496 247.669 32.032 248.693 33.888C249.717 35.68 250.229 37.888 250.229 40.512C250.229 44.032 249.461 47.008 247.925 49.44C246.389 51.808 244.341 53.632 241.781 54.912C239.285 56.128 236.469 56.736 233.333 56.736H231.701C229.717 56.736 227.925 56.512 226.325 56.064C225.173 57.344 224.341 58.592 223.829 59.808C223.317 60.96 223.061 62.048 223.061 63.072C223.061 65.888 225.077 67.296 229.109 67.296H239.189C243.925 67.296 247.573 68.256 250.133 70.176C252.693 72.096 253.973 74.944 253.973 78.72ZM233.333 51.456C236.213 51.456 238.741 50.56 240.917 48.768C243.093 46.976 244.181 44.224 244.181 40.512C244.181 36.8 243.093 34.048 240.917 32.256C238.741 30.464 236.213 29.568 233.333 29.568H231.701C228.757 29.568 226.197 30.464 224.021 32.256C221.845 34.048 220.757 36.8 220.757 40.512C220.757 44.224 221.845 46.976 224.021 48.768C226.197 50.56 228.757 51.456 231.701 51.456H233.333ZM271.413 72H262.581V63.264H271.413V72ZM313.114 70.368C311.45 71.136 309.53 71.744 307.354 72.192C305.178 72.704 302.97 72.96 300.73 72.96C297.018 72.96 294.042 72.192 291.802 70.656C289.562 69.12 287.93 66.976 286.906 64.224C285.946 61.472 285.466 58.336 285.466 54.816V32.928H277.594V23.328H285.466V10.656H296.506V23.328H311.674V32.928H296.506V54.816C296.506 57.76 297.05 59.808 298.138 60.96C299.29 62.048 300.922 62.592 303.034 62.592C304.058 62.592 305.146 62.496 306.298 62.304C307.514 62.048 308.858 61.632 310.33 61.056L313.114 70.368ZM361.83 44.736V50.496C361.83 57.28 359.974 62.72 356.262 66.816C352.55 70.912 347.302 72.96 340.518 72.96C333.734 72.96 328.486 70.912 324.774 66.816C321.062 62.72 319.206 57.28 319.206 50.496V44.736C319.206 37.952 321.03 32.544 324.678 28.512C328.39 24.416 333.67 22.368 340.518 22.368C347.366 22.368 352.614 24.416 356.262 28.512C359.974 32.544 361.83 37.952 361.83 44.736ZM350.502 44.736C350.502 40.832 349.638 37.792 347.91 35.616C346.182 33.376 343.718 32.256 340.518 32.256C337.318 32.256 334.854 33.376 333.126 35.616C331.398 37.792 330.534 40.832 330.534 44.736V50.496C330.534 54.4 331.398 57.472 333.126 59.712C334.854 61.952 337.318 63.072 340.518 63.072C343.718 63.072 346.182 61.952 347.91 59.712C349.638 57.472 350.502 54.4 350.502 50.496V44.736ZM414.049 44.736V50.496C414.049 57.28 412.193 62.72 408.481 66.816C404.769 70.912 399.521 72.96 392.737 72.96C385.953 72.96 380.705 70.912 376.993 66.816C373.281 62.72 371.425 57.28 371.425 50.496V44.736C371.425 37.952 373.249 32.544 376.897 28.512C380.609 24.416 385.889 22.368 392.737 22.368C399.585 22.368 404.833 24.416 408.481 28.512C412.193 32.544 414.049 37.952 414.049 44.736ZM402.721 44.736C402.721 40.832 401.857 37.792 400.129 35.616C398.401 33.376 395.937 32.256 392.737 32.256C389.537 32.256 387.073 33.376 385.345 35.616C383.617 37.792 382.753 40.832 382.753 44.736V50.496C382.753 54.4 383.617 57.472 385.345 59.712C387.073 61.952 389.537 63.072 392.737 63.072C395.937 63.072 398.401 61.952 400.129 59.712C401.857 57.472 402.721 54.4 402.721 50.496V44.736ZM426.14 58.272V0.959999H437.18V58.272C437.18 59.232 437.404 60.16 437.852 61.056C438.364 61.888 439.324 62.304 440.732 62.304H442.268V72.48H439.58C435.932 72.48 433.148 71.776 431.228 70.368C429.308 68.96 427.964 67.168 427.196 64.992C426.492 62.816 426.14 60.576 426.14 58.272ZM466.591 63.36C468.959 63.36 470.911 62.976 472.447 62.208C473.983 61.376 474.751 60.16 474.751 58.56C474.751 57.152 474.239 56.064 473.215 55.296C472.255 54.464 470.495 53.728 467.935 53.088L462.463 51.648C458.239 50.56 455.103 48.736 453.055 46.176C451.071 43.616 450.079 40.576 450.079 37.056C450.079 32.896 451.519 29.408 454.399 26.592C457.279 23.776 461.727 22.368 467.743 22.368C470.175 22.368 472.735 22.656 475.423 23.232C478.111 23.808 480.927 24.736 483.871 26.016L480.703 35.424C478.015 34.144 475.583 33.248 473.407 32.736C471.231 32.224 469.311 31.968 467.647 31.968C463.103 31.968 460.831 33.504 460.831 36.576C460.831 37.792 461.215 38.752 461.983 39.456C462.815 40.16 464.319 40.8 466.495 41.376L471.967 42.816C476.639 44.032 480.031 45.888 482.143 48.384C484.319 50.88 485.407 54.016 485.407 57.792C485.407 62.272 483.871 65.92 480.799 68.736C477.791 71.552 473.023 72.96 466.495 72.96C460.927 72.96 455.071 71.68 448.927 69.12L451.903 60C454.911 61.216 457.631 62.08 460.063 62.592C462.495 63.104 464.671 63.36 466.591 63.36Z" fill="white"/> +</svg> diff --git a/apps/website/src/content/config.ts b/apps/website/src/content/config.ts new file mode 100644 index 0000000..90ad769 --- /dev/null +++ b/apps/website/src/content/config.ts @@ -0,0 +1,6 @@ +import { defineCollection } from 'astro:content' +import { docsSchema } from '@astrojs/starlight/schema' + +export const collections = { + docs: defineCollection({ schema: docsSchema() }), +} diff --git a/apps/website/src/content/docs/guides/getting-started.md b/apps/website/src/content/docs/guides/getting-started.md new file mode 100644 index 0000000..dbb8aab --- /dev/null +++ b/apps/website/src/content/docs/guides/getting-started.md @@ -0,0 +1,9 @@ +--- +title: Getting started +description: A guide to start with boring tools +--- + +Thanks for stopping by. Unfortunately there's not much going on here at the moment. But the first tool is already in the starting blocks and will be here soon. There will also be more information about the whole project here. + +So check back soon. + diff --git a/apps/website/src/content/docs/index.mdx b/apps/website/src/content/docs/index.mdx new file mode 100644 index 0000000..852deed --- /dev/null +++ b/apps/website/src/content/docs/index.mdx @@ -0,0 +1,13 @@ +--- +title: boring.tools +description: Your tools for the boring stuff +template: splash +hero: + tagline: Your tools for the boring stuff +# image: +# file: ../../assets/boring.tools.svg + actions: + - text: Getting started + link: /guides/getting-started/ + icon: right-arrow +--- diff --git a/apps/website/src/env.d.ts b/apps/website/src/env.d.ts new file mode 100644 index 0000000..acef35f --- /dev/null +++ b/apps/website/src/env.d.ts @@ -0,0 +1,2 @@ +/// <reference path="../.astro/types.d.ts" /> +/// <reference types="astro/client" /> diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json new file mode 100644 index 0000000..77da9dd --- /dev/null +++ b/apps/website/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "astro/tsconfigs/strict" +} \ No newline at end of file diff --git a/ci/docker/website/Dockerfile b/ci/docker/website/Dockerfile new file mode 100644 index 0000000..4f0d58f --- /dev/null +++ b/ci/docker/website/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:alpine AS runtime +COPY ./ci/docker/website/nginx.conf /etc/nginx/nginx.conf +COPY ./build/website /usr/share/nginx/html +EXPOSE 80 \ No newline at end of file diff --git a/ci/docker/website/nginx.conf b/ci/docker/website/nginx.conf new file mode 100644 index 0000000..7eb11e5 --- /dev/null +++ b/ci/docker/website/nginx.conf @@ -0,0 +1,31 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html index.htm; + include /etc/nginx/mime.types; + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + error_page 404 /404.html; + location = /404.html { + root /usr/share/nginx/html; + internal; + } + + location / { + try_files $uri $uri/index.html =404; + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index dee45fc..365a74c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,10 @@ "check:apps": "bunx biome check --write --config-path ./biome.json ./apps", "check:packages": "bunx biome check --write --config-path ./biome.json ./packages", "dev": "bun --filter '*' dev", - "build": "bun --filter '*' build" + "build": "bun --filter '*' build", + "docker:website:build": "docker build -t git.hashdot.co/boring.tools/boring.tools/website -f ci/docker/website/Dockerfile .", + "docker:website:push": "docker push git.hashdot.co/boring.tools/boring.tools/website", + "docker:website": "bun docker:website:build && bun docker:website:push" }, "packageManager": "bun@1.1.29", "workspaces": [