WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a3e0220

Browse files
committed
Remove spring backend and management frontend, port github token route to typescript
1 parent 93e974a commit a3e0220

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+94
-2035
lines changed

.github/workflows/deploy.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
name: Build with Java 21
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
- name: Setup Bun
15+
uses: oven-sh/setup-bun@v2
16+
- name: Install frontend dependencies
17+
run: cd web && bun install
18+
- name: Build frontend
19+
run: cd web && bun run build
20+
- name: "Deploy to Cloudflare Pages"
21+
uses: "AdrianGonz97/refined-cf-pages-action@v1"
22+
with:
23+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
24+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
25+
githubToken: ${{ secrets.GITHUB_TOKEN }}
26+
projectName: "patch-roulette"
27+
directory: "web/.svelte-kit/cloudflare"

.github/workflows/publish.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,13 @@ on:
66
pull_request:
77

88
jobs:
9-
build:
9+
test:
1010
# Only run on PRs if the source branch is on someone else's repo
1111
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout Repository
1515
uses: actions/checkout@v4
16-
- name: Set up JDK 21
17-
uses: actions/setup-java@v4
18-
with:
19-
distribution: 'temurin'
20-
java-version: 21
21-
check-latest: true
22-
- name: Setup Gradle
23-
uses: gradle/actions/setup-gradle@v4
24-
- name: Build with Gradle
25-
run: ./gradlew test --stacktrace
2616
- uses: oven-sh/setup-bun@v2
2717
- run: cd web && bun install
2818
- run: cd web && bun run lint

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ database.mv.db
1111
database.trace.db
1212
db/
1313
.DS_Store
14+
15+
node_modules
16+
# TODO: figure out proper monorepo setup, installing / fixes intellij not recognizing the project for now
17+
/bun.lock

README.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
1-
# Patch Roulette
2-
3-
REST API and web interface for managing Paper updates and dealing with patches.
4-
5-
> [!NOTE]
6-
> This project is intended for internal use and does not guarantee stability, compatibility, support, or follow semantic versioning. External users will likely only find the diff viewer useful.
1+
# [Diff Viewer](https://diffs.dev)
2+
Featureful and performant web-based diff viewer.
73

84
## Overview
95

10-
### REST API
11-
12-
Powered by Spring Boot, backend for the web interface and `paperweight`. Routes are under `/api`.
13-
14-
### paperweight
15-
16-
`paperweight` has tasks to interface with the REST API during the update process.
17-
18-
### Web Interface
6+
### Routes
197

20-
SvelteKit frontend using tailwindcss for styling. Hosted as static files by the Spring Boot server.
8+
- [`/`](https://diffs.dev): Multi-file concise diff viewer
219

22-
#### Public Pages
10+
### Tech Stack
2311

24-
- [`/`](https://patch-roulette.papermc.io): Multi-file concise diff viewer
25-
26-
#### Authenticated Pages
27-
28-
- `/roulette/login`: Login page
29-
- `/roulette`: Management dashboard
12+
SvelteKit frontend using tailwindcss for styling, deployed to Cloudflare Pages via GitHub Actions.
3013

3114
### Web Extension
3215

@@ -36,23 +19,15 @@ Web extension that streamlines opening diffs in the viewer.
3619

3720
## Development
3821

39-
Note that Bun can be substituted with the package manager of your choice.
40-
4122
### Setup
4223

4324
- Install [Bun](https://bun.sh/) and execute `bun install` in `/web` to install the required dependencies for the frontend.
4425
- Install a JVM 21 or newer for the Gradle runtime (prefer a JDK to avoid extra downloads for a compiler).
4526

4627
### Testing
4728

48-
- The frontend can be tested with `bun run devLocalServer` or `bun run devProdServer` in `/web`. `devLocalServer` will use localhost as the API, `devProdServer` will use the production API at https://patch-roulette.papermc.io/api.
49-
- The backend can be tested with `./gradlew bootRun` in the project root.
29+
- The frontend can be tested with `bun run dev` in `/web`.
5030

5131
### Code Style
5232

5333
- The frontend uses ESLint and Prettier for code style. Run `bun run format` to reformat and `bun run lint` to check style.
54-
- The backend simply has a `.editorconfig` file for code style.
55-
56-
### Deployment
57-
58-
- Published to the GitHub Container Registry on each commit through the `publish` actions workflow.

build.gradle.kts

Lines changed: 0 additions & 92 deletions
This file was deleted.

gradle.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

gradle/libs.versions.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

gradle/wrapper/gradle-wrapper.jar

-42.7 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)