No description
- Go 64.1%
- HTML 13.5%
- PLpgSQL 10.2%
- Shell 3.8%
- Jsonnet 3.2%
- Other 5.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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. |
||
| .crow | ||
| ai | ||
| cmd/allowcraft | ||
| db | ||
| internal | ||
| kubernetes | ||
| LICENSES | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .golangci.yml | ||
| .htmlhintrc | ||
| .semgrepignore | ||
| .sops.yaml | ||
| .stylelintrc.json | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| justfile | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| REUSE.toml | ||
| sqlc.yaml | ||
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.
✨ 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-chifor routing. - Database: PostgreSQL with
pgx,dbmate, andsqlc. - Frontend: HTMX, Go templates, and the
VT323pixel font. - Background Jobs:
riverfor reliable asynchronous tasks (Status fetching, Whitelist sync). - Rendering:
mineatar-io/skin-renderfor 3D body renders. - Obfuscation:
sqidsfor short, unique server and invite IDs. - CLI:
cobraandviperfor 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:
- Go to the Azure Portal > App registrations.
- Create a new registration.
- 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.
- Under API permissions:
- Ensure
openid,profile, andemail(from Microsoft Graph) are present.
- Ensure
- Copy your Application (client) ID.
2. Local Setup
- Clone the repository:
git clone code.nogweii.net/aethernet/allowcraft cd allowcraft - Create a
.envfile:
Generate a key:ALLOWCRAFT_MICROSOFT_CLIENT_ID=your-client-id-here ALLOWCRAFT_ENCRYPTION_KEY=64-character-hex-key-hereopenssl rand -hex 32 - Start the database:
just db-up - Fetch front-end assets:
just fetch-assets - 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