a845b744b7a035e2d5a8a82ac6c95687831a270a
HTML files now render in an iframe served from S3 (tinqs-git-preview bucket) instead of Gitea's raw endpoint which forces text/plain. SWR flow: first request uploads blob to S3 synchronously, subsequent requests redirect to presigned S3 URL instantly. When the blob SHA changes (new commit), the stale version is served immediately while the new version uploads in the background. Security: iframe uses sandbox="allow-scripts" only (no allow-same-origin). S3 is a different origin from git.arikigame.com, so even if JS runs in the iframe it cannot access Gitea session cookies or API tokens. Config: [html_preview] section in app.ini, disabled by default. Release pipeline auto-adds config on first deploy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…
Add ability for local makefile with personal customizations that wouldnt affect remote repo (#35836)
…
…
tinqs-git
Tinqs' self-hosted Git+LFS hosting for game studios — a fork of Gitea v1.26.1.
git.tinqs.com · Go · SQLite · S3 LFS · OAuth2 SSO with platform.tinqs.com
Quick start
# Prerequisites: Go 1.26.2+, Node.js 22+, pnpm
git clone https://git.arikigame.com/tinqs-ltd/tinqs-git.git
cd tinqs-git
git checkout tinqs/main
# Build
TAGS="bindata sqlite sqlite_unlock_notify" make build
# Run (creates gitea.db automatically)
./tinqs-git web --port 4141
# Open http://localhost:4141
Dev
make watch-backend # Go hot reload
make watch-frontend # Vite HMR
make watch # both
Test
make test # everything
make test-backend # Go unit tests
make test-sqlite # SQLite integration tests
make lint # all linters
Build tags
| Tag | Purpose |
|---|---|
bindata |
Embed frontend assets into binary |
sqlite |
Compile SQLite via CGo (required) |
sqlite_unlock_notify |
SQLite perf optimization |
Repo structure
tinqs-git/
├── main.go ← entry point
├── Makefile ← build system
├── cmd/ ← CLI (web, migrate, admin, cert)
├── routers/ ← HTTP routes
├── modules/ ← business logic (auth, lfs, git, setting)
├── models/ ← DB models (NEVER modify)
├── services/ ← service layer
├── templates/ ← Go HTML templates
├── web_src/ ← frontend source (TS, Less, Vue)
├── public/ ← static assets
├── .gitea/workflows/ ← CI (Gitea Actions)
└── .cursor/ ← agent infrastructure
Branches
main— tracks upstream releases (quarterly rebase)tinqs/main— our fork with Tinqs customizations
Deployment
Runs on the Lightsail server (gitea-tinqs-v2, IP 46.51.144.31) as a systemd service on port :3000 behind tinqs-proxy.
# Build
TAGS="bindata sqlite sqlite_unlock_notify" make build
# Deploy to Lightsail
ssh -i ~/.ssh/LightsailDefaultKey-eu-west-1.pem ubuntu@46.51.144.31
sudo systemctl stop gitea
scp tinqs-git ubuntu@46.51.144.31:/usr/local/bin/gitea
sudo systemctl start gitea
sudo systemctl status gitea
DNS: git.arikigame.com → 46.51.144.31. Full infra docs: docs/ai/devops.md.
License
MIT — same as upstream Gitea.
Languages
Go
77.8%
TypeScript
8.7%
Handlebars
6.4%
JavaScript
2.5%
CSS
1.8%
Other
2.6%