Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "bun"
- package-ecosystem: "npm"
directory: "/frontend"
groups:
minor-patch:
Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: ./frontend/package.json
Comment thread
steveiliop56 marked this conversation as resolved.

- name: Setup go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
Expand All @@ -27,27 +29,22 @@ jobs:
run: go mod download

- name: Install frontend dependencies
run: |
cd frontend
bun install --frozen-lockfile
working-directory: ./frontend
run: pnpm ci

- name: Set version
run: |
echo testing > internal/assets/version
run: echo testing > internal/assets/version

- name: Lint frontend
run: |
cd frontend
bun run lint
working-directory: ./frontend
run: pnpm run lint

- name: Build frontend
run: |
cd frontend
bun run build
working-directory: ./frontend
run: pnpm run build

- name: Copy frontend
run: |
cp -r frontend/dist internal/assets/dist
run: cp -r frontend/dist internal/assets/dist

- name: Run tests
run: go test -coverprofile=coverage.txt -v ./...
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,26 @@ jobs:
with:
ref: nightly

- name: Install bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: ./frontend/package.json

- name: Install go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: "^1.26.0"

- name: Install frontend dependencies
run: |
cd frontend
bun install --frozen-lockfile
working-directory: ./frontend
run: pnpm ci

- name: Install backend dependencies
run: |
go mod download
run: go mod download

- name: Build frontend
run: |
cd frontend
bun run build
working-directory: ./frontend
run: pnpm run build

- name: Build
run: |
Expand All @@ -105,27 +104,26 @@ jobs:
with:
ref: nightly

- name: Install bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: ./frontend/package.json

- name: Install go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: "^1.26.0"

- name: Install frontend dependencies
run: |
cd frontend
bun install --frozen-lockfile
working-directory: ./frontend
run: pnpm ci

- name: Install backend dependencies
run: |
go mod download
run: go mod download

- name: Build frontend
run: |
cd frontend
bun run build
working-directory: ./frontend
run: pnpm run build

- name: Build
run: |
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,26 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: ./frontend/package.json

- name: Install go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: "^1.26.0"

- name: Install frontend dependencies
run: |
cd frontend
bun install --frozen-lockfile
working-directory: ./frontend
run: pnpm ci

- name: Install backend dependencies
run: |
go mod download
run: go mod download

- name: Build frontend
run: |
cd frontend
bun run build
working-directory: ./frontend
run: pnpm run build

- name: Build
run: |
Expand All @@ -78,27 +77,26 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
package_json_file: ./frontend/package.json

- name: Install go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: "^1.26.0"

- name: Install frontend dependencies
run: |
cd frontend
bun install --frozen-lockfile
working-directory: ./frontend
run: pnpm ci

- name: Install backend dependencies
run: |
go mod download
run: go mod download

- name: Build frontend
run: |
cd frontend
bun run build
working-directory: ./frontend
run: pnpm run build

- name: Build
run: |
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Contributing to Tinyauth is straightforward. Follow the steps below to set up a
## Requirements

- Bun
- pnpm
- Golang v1.24.0 or later
- Git
- Docker
Expand All @@ -34,7 +34,7 @@ Frontend dependencies can be installed as follows:

```sh
cd frontend/
bun install
pnpm ci
```

## Create the `.env` file
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Site builder
FROM oven/bun:1.3.13-alpine AS frontend-builder
FROM node:26.1-alpine3.23 AS frontend-builder

WORKDIR /frontend

RUN npm install -g pnpm@11.1.2

COPY ./frontend/package.json ./
COPY ./frontend/bun.lock ./
COPY ./frontend/pnpm-lock.yaml ./

RUN bun install --frozen-lockfile
RUN pnpm ci

COPY ./frontend/public ./public
COPY ./frontend/src ./src
Expand All @@ -17,7 +19,7 @@ COPY ./frontend/tsconfig.app.json ./
COPY ./frontend/tsconfig.node.json ./
COPY ./frontend/vite.config.ts ./

RUN bun run build
RUN pnpm run build

# Builder
FROM golang:1.26-alpine3.23 AS builder
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY go.sum ./
RUN go mod download

RUN go install github.com/air-verse/air@v1.61.7
RUN go install github.com/go-delve/delve/cmd/dlv@latest
RUN go install github.com/go-delve/delve/cmd/dlv@v1.26.3

COPY ./cmd ./cmd
COPY ./internal ./internal
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile.distroless
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Site builder
FROM oven/bun:1.3.13-alpine AS frontend-builder
FROM node:26.1-alpine3.23 AS frontend-builder

WORKDIR /frontend

RUN npm install -g pnpm@11.1.2

COPY ./frontend/package.json ./
COPY ./frontend/bun.lock ./
COPY ./frontend/pnpm-lock.yaml ./

RUN bun install --frozen-lockfile
RUN pnpm ci

COPY ./frontend/public ./public
COPY ./frontend/src ./src
Expand All @@ -17,7 +19,7 @@ COPY ./frontend/tsconfig.app.json ./
COPY ./frontend/tsconfig.node.json ./
COPY ./frontend/vite.config.ts ./

RUN bun run build
RUN pnpm run build

# Builder
FROM golang:1.26-alpine3.23 AS builder
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PROD_COMPOSE := $(shell test -f "docker-compose.test.prod.yml" && echo "docker-c

# Deps
deps:
bun install --frozen-lockfile --cwd frontend
cd frontend && pnpm ci
go mod download

# Clean data
Expand All @@ -31,7 +31,7 @@ clean-webui:

# Build the web UI
webui: clean-webui
bun run --cwd frontend build
cd frontend && pnpm run build
cp -r frontend/dist internal/assets

# Build the binary
Expand Down
6 changes: 0 additions & 6 deletions frontend/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion frontend/.prettierrc

This file was deleted.

10 changes: 6 additions & 4 deletions frontend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM oven/bun:1.2.16-alpine
FROM node:26.1-alpine3.23

RUN npm install -g pnpm@11.1.2

WORKDIR /frontend

COPY ./frontend/package.json ./
COPY ./frontend/bun.lock ./
COPY ./frontend/pnpm-lock.yaml ./

RUN bun install --frozen-lockfile
RUN pnpm ci

COPY ./frontend/public ./public
COPY ./frontend/src ./src
Expand All @@ -19,4 +21,4 @@ COPY ./frontend/vite.config.ts ./

EXPOSE 5173

ENTRYPOINT ["bun", "run", "dev"]
ENTRYPOINT ["pnpm", "run", "dev"]
Loading