No description
  • Go 64.1%
  • HTML 13.5%
  • PLpgSQL 10.2%
  • Shell 3.8%
  • Jsonnet 3.2%
  • Other 5.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nogweii 176c9a044b
All checks were successful
ci/crow/push/lint Pipeline was successful
ci/crow/push/container Pipeline was successful
ci/crow/push/e2e Pipeline was successful
ci/crow/push/deploy Pipeline was successful
ci: retry the release downloads in the e2e job
GitHub answered 504 for the dbmate asset and failed pipeline 9, which also
held up the deploy step. Both fetches pull from GitHub, so both now retry.
2026-11-09 00:48:35 -07:00
.crow ci: retry the release downloads in the e2e job 2026-11-09 00:48:35 -07:00
ai legal: consolidate licensing for machine-edited files into REUSE.toml 2026-05-02 09:55:07 -07:00
cmd/allowcraft chore: integrate go fmt checks into lint suite and CI pipeline 2026-05-04 22:12:52 -07:00
db chore: integrate go fmt checks into lint suite and CI pipeline 2026-05-04 22:12:52 -07:00
internal db: connect to postgres over TLS with CA verification 2026-11-08 23:59:54 -07:00
kubernetes kubernetes: roll the pod when a referenced secret changes 2026-11-09 00:35:17 -07:00
LICENSES ui: implement tiered identity greeting and origin logos 2026-05-02 09:41:10 -07:00
scripts kubernetes: point PGPASSWORD at the generated database secret 2026-11-08 23:01:59 -07:00
tests chore: fix Go formatting and resolve lint errors in test suites 2026-05-06 13:25:04 -07:00
.gitignore ci: Crow CI pipelines and an app-template HelmRelease 2026-11-08 15:06:43 -07:00
.gitleaks.toml chore: add gitleaks configuration to exclude cache folders 2026-05-03 09:24:40 -07:00
.golangci.yml lint: integrate golangci-lint and fix all issues 2026-04-30 23:23:44 -07:00
.htmlhintrc fix: resolve check failures by ensuring REUSE compliance and fixing lint issues 2026-05-04 21:48:25 -07:00
.semgrepignore ci: speed up SAST scan by excluding CI cache directories 2026-05-01 21:26:47 -07:00
.sops.yaml ci: Crow CI pipelines and an app-template HelmRelease 2026-11-08 15:06:43 -07:00
.stylelintrc.json fix: resolve check failures by ensuring REUSE compliance and fixing lint issues 2026-05-04 21:48:25 -07:00
docker-compose.yml legal: consolidate licensing for machine-edited files into REUSE.toml 2026-05-02 09:55:07 -07:00
Dockerfile lint: integrate golangci-lint and fix all issues 2026-04-30 23:23:44 -07:00
go.mod ci: optimize CI package installation and restore JS linting 2026-05-06 13:21:39 -07:00
go.sum ci: optimize CI package installation and restore JS linting 2026-05-06 13:21:39 -07:00
justfile kubernetes: point PGPASSWORD at the generated database secret 2026-11-08 23:01:59 -07:00
LICENSE AGPL-3.0 license and initial README 2026-04-28 18:20:34 -07:00
package-lock.json test: implement structural HTML validation and integrate NPM test plan 2026-05-04 21:14:57 -07:00
package.json test: perfect live HTML validation during E2E user flows 2026-05-04 22:17:34 -07:00
README.md ui: update landing page and readme to reflect current features and themed icons 2026-05-03 10:30:09 -07:00
REUSE.toml ci: Crow CI pipelines and an app-template HelmRelease 2026-11-08 15:06:43 -07:00
sqlc.yaml legal: consolidate licensing for machine-edited files into REUSE.toml 2026-05-02 09:55:07 -07:00

Allowcraft 🛡️

Allowcraft is a modern, Minecraft-themed SaaS application designed to manage and protect Minecraft server access using Microsoft Authentication. It bridges web-based OAuth logins with game server access control by automatically syncing approved users to a server's whitelist via RCON.

Minecraft Aesthetic Tech Stack Security

✨ Features

  • 🏷️ Secure Identity: Leverage Microsoft and Xbox Live authentication to ensure every player on your server is verified and unique.
  • 🗃️ Auto-Sync: No more manual /whitelist add. Allowcraft syncs approved users to your server automatically via RCON.
  • 💎 Smart Invites: Generate time-limited invite links with secure, obfuscated URLs to manage community growth.
  • 🎨 3D Skins: Show off your identity with pixel-perfect 3D body renders, automatically fetched from Mojang's official servers.
  • 🌌 Private Servers: All servers are private by default, restricted to invited members for a safe and controlled environment.
  • 💬 Live Status: Monitor server health, MOTD, and player counts in real-time from your Minecraft-themed dashboard.
  • 🔍 Smart Connection: Full support for Minecraft DNS SRV records. The UI clearly displays resolved addresses if they differ from your input.
  • ⚡ Snappy UX: Powered by HTMX for dynamic partial page updates.
  • 📦 Self-Contained: All assets (HTML, CSS, JS, pixel fonts) and migrations are embedded in a single Go binary.

🚀 Tech Stack

  • Backend: Go (Golang) with go-chi for routing.
  • Database: PostgreSQL with pgx, dbmate, and sqlc.
  • Frontend: HTMX, Go templates, and the VT323 pixel font.
  • Background Jobs: river for reliable asynchronous tasks (Status fetching, Whitelist sync).
  • Rendering: mineatar-io/skin-render for 3D body renders.
  • Obfuscation: sqids for short, unique server and invite IDs.
  • CLI: cobra and viper for robust configuration.

🛠️ Getting Started

Prerequisites

  • Go 1.26+
  • Docker & Docker Compose (for local database)
  • Just (command runner)

1. Azure App Registration (The "Gotcha")

To support secret-less PKCE authentication, you must register your application as a Public Client:

  1. Go to the Azure Portal > App registrations.
  2. Create a new registration.
  3. Under Authentication:
    • Add a platform: Mobile and desktop applications.
    • Redirect URI: http://localhost:8080/callback (or your production URL).
    • Enable Public Client Flows: Set "Treat application as a public client" to Yes.
  4. Under API permissions:
    • Ensure openid, profile, and email (from Microsoft Graph) are present.
  5. Copy your Application (client) ID.

2. Local Setup

  1. Clone the repository:
    git clone code.nogweii.net/aethernet/allowcraft
    cd allowcraft
    
  2. Create a .env file:
    ALLOWCRAFT_MICROSOFT_CLIENT_ID=your-client-id-here
    ALLOWCRAFT_ENCRYPTION_KEY=64-character-hex-key-here
    
    Generate a key: openssl rand -hex 32
  3. Start the database:
    just db-up
    
  4. Fetch front-end assets:
    just fetch-assets
    
  5. Run the application:
    just run
    

🛠️ Development Utilities

The justfile includes several helpers for local testing:

  • just psql: Jump into an interactive PostgreSQL shell.
  • just seed: Reset the database with robust, ID-independent test data (Alice, Bob, and Charlie).
  • just list-users: See all registered users and their IDs.
  • just link-user <email>: Associate your real logged-in Microsoft account with the local dev server.

⚙️ Configuration

Flag Env Variable Default Description
--addr ALLOWCRAFT_ADDR :8080 Bind address
--hostname ALLOWCRAFT_HOSTNAME localhost Allowed request hostname
(none) PGHOST localhost PostgreSQL host
(none) PGPORT 5432 PostgreSQL port
(none) PGUSER postgres PostgreSQL user
(none) PGPASSWORD (none) PostgreSQL password
(none) PGDATABASE postgres PostgreSQL database name
--microsoft-client-id ALLOWCRAFT_MICROSOFT_CLIENT_ID REQUIRED Client ID
--encryption-key ALLOWCRAFT_ENCRYPTION_KEY REQUIRED 64-char hex key
--riverui-password ALLOWCRAFT_RIVERUI_PASSWORD REQUIRED Background job UI password

🏗️ Project Structure

  • cmd/allowcraft: Application entry point & CLI setup.
  • db/: Schema migrations & embedding logic.
  • internal/:
    • auth/: OAuth2 PKCE flow & Minecraft profile logic.
    • config/: Viper/Cobra configuration system.
    • db/: Generated SQL models.
    • handlers/: HTTP router & controllers.
    • minecraft/: RCON, Status Ping, & Background Workers.
    • ui/: HTML templates & embedded static assets.
  • scripts/: Automation scripts (asset fetching).

📄 License

AGPL-3.0