Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d02c8ec
chore: add forum state logging
battlesquid May 29, 2025
986384f
Merge branch 'master' into dev
battlesquid May 15, 2026
b2e1380
wip: move to infisical
battlesquid May 15, 2026
075cdd8
Merge branch 'master' into dev
battlesquid May 15, 2026
5b428bb
wip: add oxc, package upgrades
battlesquid May 16, 2026
3382a7e
chore: fmt, lint
battlesquid May 16, 2026
8518b12
fix: prefer npm infisical cli
battlesquid May 16, 2026
c3aac4a
fix: update workspace settings for deploy
battlesquid May 16, 2026
f4bdd61
wip: more docker fixes
battlesquid May 16, 2026
609c50c
wip: more docker fixes for infisical
battlesquid May 16, 2026
e81d641
wip: more infisical changes, misc cleanup, remove failure check in fa…
battlesquid May 17, 2026
49379c7
wip: fix season questions query, misc docker fixes
battlesquid May 17, 2026
dcf9659
fix: put NODE_ENV next to ARG
battlesquid May 20, 2026
af2e056
fix: fix start.sh perms for bot
battlesquid May 24, 2026
5ef9b0f
fix: prefer infisical sdk so distroless imgs can still be used
battlesquid May 24, 2026
5ba3e19
chore: update compose, add mise toml
battlesquid May 25, 2026
b8fd516
chore: rename compose
battlesquid May 25, 2026
5622dea
fix: fix bot cmd
battlesquid May 25, 2026
90848bc
fix: also push all questions to storage
battlesquid May 25, 2026
6e11270
refactor: slim down updater dockerfile
battlesquid May 25, 2026
a82592f
fix: copy from right stage
battlesquid May 25, 2026
334268d
fix: drop debug tag for updater
battlesquid May 25, 2026
62a1a4b
fix: only update forum status if not empty
battlesquid May 25, 2026
a833754
chore: neat
battlesquid May 26, 2026
a1f7340
refactor: merge pr checks into one action
battlesquid May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ dist
node_modules
README.md
tsconfig.tsbuildinfo
.env*
*.env*
.flaskenv*
!.env.project
!.env.vault
.turbo
.idea
.devcontainer
Expand Down
6 changes: 0 additions & 6 deletions .env.template

This file was deleted.

25 changes: 0 additions & 25 deletions .env.vault

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
20 changes: 11 additions & 9 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ qnaplus is a project with the purpose of improving the quality of life for the V

This project uses [PNPM Workspaces](https://pnpm.io/workspaces) to manage structure and builds.

- `packages`: Internal packages that are used by services.
- `dotenv`: Type-safe library for accessing environment variables.
- `store`: Supabase-related abstractions.
- `logger`: For creating service-unique loggers.
- `typescript-config`: Shared config for all packages/services.
- `utils`: Library for shared utility functions.
- `services`: Applications that tie together the functionality in `packages`
- `updater`: Service for continuously watching for updates on the Q&A.
- `bot`: Discord Bot for announcing new answers.
| Path | Description |
|------|-------------|
| `packages/` | Internal packages used by services |
| `packages/dotenv` | Type-safe library for accessing environment variables |
| `packages/store` | Supabase-related abstractions |
| `packages/logger` | For creating service-unique loggers |
| `packages/typescript-config` | Shared config for all packages/services |
| `packages/utils` | Library for shared utility functions |
| `services/` | Applications that tie together the functionality in `packages` |
| `services/updater` | Service for continuously watching for updates on the Q&A |
| `services/bot` | Discord Bot for announcing new answers |

## Features and Bugs

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/bot_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
- '!services/updater/**'
- services/bot/**
- packages/**
- .env.vault
- package.json
- turbo.json
- pnpm-lock.yaml
Expand Down Expand Up @@ -69,11 +68,22 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set NODE_ENV
id: node_env
run: |
if [[ "${{ github.ref_name }}" == "master" ]]; then
echo "value=production" >> $GITHUB_OUTPUT
else
echo "value=development" >> $GITHUB_OUTPUT
fi
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: services/bot/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NODE_ENV=${{ steps.node_env.outputs.value }}
22 changes: 0 additions & 22 deletions .github/workflows/check_build.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/neat.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: PR Checks

on:
pull_request:
types: [opened, reopened, edited, synchronize]
branches:
- master

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v4
- run: pnpm i --frozen-lockfile
- run: pnpm neat
- run: pnpm build
14 changes: 12 additions & 2 deletions .github/workflows/updater_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
- '!services/bot/**'
- services/updater/**
- packages/**
- .env.vault
- package.json
- turbo.json
- pnpm-lock.yaml
Expand Down Expand Up @@ -69,11 +68,22 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set NODE_ENV
id: node_env
run: |
if [[ "${{ github.ref_name }}" == "master" ]]; then
echo "value=production" >> $GITHUB_OUTPUT
else
echo "value=development" >> $GITHUB_OUTPUT
fi
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
file: services/updater/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
NODE_ENV=${{ steps.node_env.outputs.value }}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ dist
# API keys and secrets
.env*
.flaskenv*
!.env.project
!.env.vault
!.env.template

.turbo

out/
out/

*.env
5 changes: 5 additions & 0 deletions .infisical.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"workspaceId": "1e4a9be2-aaf8-4e0b-be53-185dac145515",
"defaultEnvironment": "",
"gitBranchToEnvironmentMapping": null
}
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
registry=https://registry.npmjs.org/
sync-injected-deps-after-scripts[]=build
inject-workspace-packages=true
9 changes: 9 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": [
"src/oc/build/**",
"src/vite-env.d.ts"
],
"tabWidth": 4,
"useTabs": true
}
16 changes: 16 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"typescript",
"unicorn",
"oxc",
"import"
],
"categories": {
"correctness": "error"
},
"rules": {},
"env": {
"builtin": true
}
}
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"oxc.oxc-vscode"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
"js/ts.tsdk.path": "node_modules/typescript/lib"
}
30 changes: 0 additions & 30 deletions biome.json

This file was deleted.

24 changes: 24 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: qnaplus

services:
bot:
image: battlesquid0101/qnaplus-bot:${QNAPLUS_TAG:-latest}
restart: unless-stopped
environment:
NODE_ENV: ${NODE_ENV:-production}
INFISICAL_MACHINE_CLIENT_ID: ${INFISICAL_MACHINE_CLIENT_ID}
INFISICAL_MACHINE_CLIENT_SECRET: ${INFISICAL_MACHINE_CLIENT_SECRET}
INFISICAL_SECRET_ENV: ${INFISICAL_SECRET_ENV:-prod}
labels:
dockhand.order: "1"

updater:
image: battlesquid0101/qnaplus-updater:${QNAPLUS_TAG:-latest}
restart: unless-stopped
environment:
NODE_ENV: ${NODE_ENV:-production}
INFISICAL_MACHINE_CLIENT_ID: ${INFISICAL_MACHINE_CLIENT_ID}
INFISICAL_MACHINE_CLIENT_SECRET: ${INFISICAL_MACHINE_CLIENT_SECRET}
INFISICAL_SECRET_ENV: ${INFISICAL_SECRET_ENV:-prod}
labels:
dockhand.order: "2"
11 changes: 0 additions & 11 deletions docker-compose.yml

This file was deleted.

3 changes: 3 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
node = "26.2.0"
pnpm = "11.3.0"
36 changes: 16 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,30 @@
"author": "battlesqui_d",
"license": "GPL-3.0",
"devDependencies": {
"@biomejs/biome": "1.9.4",
"dotenv-vault": "^1.26.2",
"rimraf": "^6.0.1",
"syncpack": "^13.0.2",
"tsx": "^4.19.3",
"typescript": "^5.8.2"
"@types/node": "^25.8.0",
"oxfmt": "^0.49.0",
"oxlint": "^1.64.0",
"tsx": "^4.22.0",
"typescript": "^6.0.3"
},
"scripts": {
"build": "tsc --build",
"check-types": "pnpm -r check-types",
"clean": "pnpm -r clean",
"clean:full": "pnpm -r clean:full",
"neat": "biome check .",
"neat:fix": "biome check . --write",
"lint": "pnpm -r lint",
"lint:fix": "pnpm -r lint:fix",
"fmt": "pnpm -r fmt",
"fmt:fix": "pnpm -r fmt:fix",
"neat": "pnpm lint && pnpm fmt",
"neat:fix": "pnpm lint:fix && pnpm fmt:fix",
"bot": "pnpm --filter=@qnaplus/bot run start",
"bot:dev": "pnpm --filter=@qnaplus/bot run dev",
"updater": "pnpm --filter=@qnaplus/updater run start",
"updater:dev": "pnpm --filter=@qnaplus/updater run dev",
"updater:storage": "pnpm --filter=@qnaplus/updater run update_storage",
"store:populate": "pnpm --filter=@qnaplus/store run populate",
"store:populate-metadata": "pnpm --filter=@qnaplus/store run populate_metadata",
"vault:remove-previous": "rimraf .env.previous .env.production.previous",
"vault:pull": "dotenv-vault pull && dotenv-vault pull production && pnpm vault:remove-previous",
"vault:push": "dotenv-vault push && dotenv-vault push production && pnpm vault:pull"
"store:init": "pnpm --filter=@qnaplus/store run populate",
"store:init-meta": "pnpm --filter=@qnaplus/store run populate_metadata",
"docker:build-updater": "docker build --rm -t battlesquid0101/qnaplus-updater -f ./services/updater/Dockerfile .",
"docker:build-bot": "docker build --rm -t battlesquid0101/qnaplus-bot -f ./services/bot/Dockerfile ."
},
"volta": {
"pnpm": "10.7.0",
"node": "22.14.0"
},
"packageManager": "pnpm@10.6.5"
"packageManager": "pnpm@11.3.0"
}
Loading
Loading