hxgit-server is a minimalist Git server written in Haxe, designed for cloning, exploring, and managing repositories via HTTP, with authentication, user profiles, and a modern web interface.
- Git Smart HTTP: Supports clone, fetch, and push over HTTP.
- Frontend SPA: Responsive web interface with file explorer, commits, profiles, and admin panel.
- JWT Authentication: Register, login, and profile editing with secure tokens.
- Private/Public Repos: Visibility control, only the owner can change it.
- Admin Panel: Ban/unban users, manage accounts.
- Avatars: Upload and view profile images.
- Internationalization: Multi-language support (es/en/pt).
- SQLite: Integrated database for users, repos, and bans.
- File Explorer: View blobs, images, audio, video, and text with syntax highlighting.
- REST API: Endpoints for users, repos, blobs, commits, branches, etc.
src/— Haxe source code (backend)Main.hx— Entry point, loads config and starts the server.SimpleHttpServer.hx— Basic HTTP server.git/— Git logic, handlers, API, utilities.
public/web/— Frontend SPA (HTML, CSS, JS)repos/— Bare Git repositories folder..env— Sensitive config (port, paths, secrets).build.hxml/run.hxml— Build and run scripts.
-
Configure
.env:PORT— Server port (default: 8080)REPO_PATH— Repo folder (default: ./repos)DB_PATH— SQLite database pathAPP_PEPPERandJWT_SECRET— Long secrets for security
-
Build and run:
haxe build.hxml neko server.n
-
Access the frontend:
- Go to
http://localhost:8080to use the web interface.
- Go to
- Auth:
/api/auth/register,/api/auth/login,/api/auth/logout - Users:
/api/users,/api/users/:u/profile,/api/users/:u/repos,/api/users/:u/avatar - Repos:
/repos/:u/:r(create),/repos/:u/:r/privacy(visibility) - View:
/api/repos/:u/:r/info,/branches,/commits,/tree,/blob - Admin:
/api/admin/ban,/api/admin/unban - Git:
/info/refs,/git-upload-pack,/git-receive-pack - Avatars:
/public/users/:u.png - SPA:
/(explore),/~user,/~user/repo, etc.
- Haxe 4.x
- Neko VM
- Git installed on the system
- Register and log in.
- Create a repo from the frontend.
- Clone the repo:
git clone http://localhost:8080/repos/your_user/your_repo.git
- Push, explore files, review commits, and manage your profile.
- Passwords hashed with salt and pepper.
- JWT for sessions.
- Bans and admin control.
- Private repos only visible to the owner.
This project is experimental and comes with no warranty. Use at your own risk.