Skip to content

Commit 27a7167

Browse files
committed
Merge branch 'maintenance/modernization'
2 parents 957ad97 + 28df9ec commit 27a7167

43 files changed

Lines changed: 2227 additions & 7637 deletions

Some content is hidden

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

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.git
2+
.github
3+
.sisyphus
4+
store/
5+
web/landing-page/node_modules/
6+
web/landing-page/.next/
7+
*.test
8+
*.out
9+
README.md
10+
LICENSE

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
'on':
4+
pull_request:
5+
branches:
6+
- main
7+
- master
8+
push:
9+
branches:
10+
- main
11+
- master
12+
13+
jobs:
14+
go-checks:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: '1.25.x'
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
28+
- name: Install frontend dependencies
29+
working-directory: web/landing-page
30+
run: bun install --frozen-lockfile
31+
32+
- name: Build frontend assets for embed
33+
working-directory: web/landing-page
34+
run: bun run build
35+
36+
- name: Run go vet
37+
run: go vet ./...
38+
39+
- name: Run go tests
40+
run: go test -race ./...
41+
42+
- name: Build Go binary
43+
run: go build ./cmd/main.go
44+
45+
frontend-checks:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
51+
- name: Setup Bun
52+
uses: oven-sh/setup-bun@v2
53+
54+
- name: Install frontend dependencies
55+
working-directory: web/landing-page
56+
run: bun install --frozen-lockfile
57+
58+
- name: Run frontend lint
59+
working-directory: web/landing-page
60+
run: bun run lint
61+
62+
- name: Build frontend
63+
working-directory: web/landing-page
64+
run: bun run build

.github/workflows/docker.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Docker Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
docker-build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Build Docker image
17+
run: docker build -t gitignore-lol .

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ go.work
2626

2727
# End of https://www.toptal.com/developers/gitignore/api/go
2828
store/
29+
.devenv/
30+
.sisyphus/evidence/
31+
gitignore-server
32+
main

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Build the landing page
2-
FROM oven/bun:1 as landing-builder
2+
FROM oven/bun:1 AS landing-builder
33
WORKDIR /app/web/landing-page
44
COPY web/landing-page/package.json web/landing-page/bun.lock ./
55
RUN bun install --frozen-lockfile
66
COPY web/landing-page .
77
RUN bun run build
88

99
# Build the Go application
10-
FROM golang:1.23-alpine AS builder
10+
FROM golang:1.25-alpine AS builder
1111
WORKDIR /app
1212
COPY go.mod go.sum ./
1313
RUN go mod download
@@ -16,9 +16,9 @@ COPY --from=landing-builder /app/web/landing-page/dist ./web/landing-page/dist
1616
RUN CGO_ENABLED=0 GOOS=linux go build -o /gitignore-lol ./cmd/main.go
1717

1818
# Final stage
19-
FROM alpine:latest
19+
FROM alpine:3.21
2020
RUN apk --no-cache add ca-certificates git
2121
WORKDIR /root/
2222
COPY --from=builder /gitignore-lol ./
2323
EXPOSE 4444
24-
ENTRYPOINT ["./gitignore-lol"]
24+
ENTRYPOINT ["./gitignore-lol"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025-2026 Valerius Mattfeld
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ curl https://gitignore.lol/api/go,node
3737

3838
Requirements:
3939

40-
- Go 1.21.6 or later
40+
- Go 1.25 or later
4141
- Git
4242

4343
```bash
@@ -49,10 +49,10 @@ cd gitignore.lol
4949
go mod download
5050

5151
# Build
52-
go build -o gitignore-server ./cmd/gitignore_server.go
52+
go build -o gitignore-lol ./cmd/main.go
5353

5454
# Run
55-
./gitignore-server
55+
./gitignore-lol
5656
```
5757

5858
## API Documentation
@@ -72,7 +72,8 @@ The API is documented using OpenAPI/Swagger. You can access the documentation at
7272

7373
### Prerequisites
7474

75-
- Go 1.21.6 or later
75+
- Go 1.25 or later
76+
- Bun (for frontend)
7677
- Docker (optional)
7778
- Git
7879

@@ -97,15 +98,15 @@ go mod download
9798
go test ./...
9899
```
99100

100-
4. Generate Swagger documentation
101+
4. Generate documentation
101102

102103
```bash
103-
./scripts/generate-swagger.sh
104+
./scripts/generate_docs.sh
104105
```
105106

106107
### Environment Variables
107108

108-
- `PORT` - Server port (default: 3000)
109+
- `PORT` - Server port (default: 4444)
109110
- `LOG_LEVEL` - Logging level (default: warn)
110111

111112
### Rate Limiting
@@ -120,10 +121,10 @@ The service includes a high-performance moving window rate limiter optimized for
120121
Example usage:
121122
```bash
122123
# Custom rate limiting (50 requests per 30 seconds)
123-
./gitignore-server --rate-limit 50 --rate-window 30
124+
./gitignore-lol --rate-limit 50 --rate-window 30
124125

125126
# Disable rate limiting
126-
./gitignore-server --enable-rate-limit=false
127+
./gitignore-lol --enable-rate-limit=false
127128
```
128129

129130
### Running the server

cmd/docs/docs.go

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

cmd/docs/swagger.json

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

cmd/docs/swagger.yaml

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

0 commit comments

Comments
 (0)