Skip to content

13 Development Guide

Vicky Patel edited this page Nov 18, 2026 · 1 revision

13. Local Development Guide

Setting Up Your Workstation, Running Dev Servers, and Build Workflows


πŸ› οΈ Prerequisites

To contribute to or develop GitVerse locally, install:

  • Go 1.25+: Required compiler and runtime.
  • Node.js 20+: Required for running the browser DOM test suite (node --test).
  • Git: Version control.
  • Optional: GitHub CLI (gh) for automatic token discovery.

πŸš€ Quick Setup

1. Clone the Repository

git clone https://github.com/TheVicky1/GitVerse.git
cd GitVerse

2. Verify Go Toolchain

go version
go mod tidy

πŸ’» Running the Local Development Server

GitVerse provides a dedicated local development server (cmd/gitverse-devserver) that mimics Vercel's serverless environment without requiring external emulators:

go run cmd/gitverse-devserver/main.go

By default, the server listens at http://localhost:5173.

  • Navigate to http://localhost:5173 to view the landing page.
  • Visit http://localhost:5173/check/ to test profile analysis.
  • Visit http://localhost:5173/achievements/ to review catalog cards.

πŸ”¨ Compiling the CLI Binary Locally

To compile the gitverse binary directly for your local operating system:

# Build binary into the current directory
go build -o gitverse cmd/gitverse/main.go

# Run the compiled binary
./gitverse TheVicky1

πŸ”„ Static Site Generation (gendocs)

Static informational pages in site/ (site/explore/, site/about/, site/privacy/) are compiled directly from Go template definitions. If you modify badge descriptions, thresholds, or copy in internal/catalog/ or internal/webui/:

# Regenerate all static HTML pages
go run scripts/gendocs/main.go

Note: CI pipelines enforce that static files must strictly match the output of gendocs. If drift is detected, CI tests will fail. Always run gendocs before committing content changes!


πŸ“œ Makefile Reference

GitVerse includes a root Makefile for developer convenience:

make test        # Run complete Go unit test matrix
make test-js     # Run JavaScript DOM test suite
make lint        # Run golangci-lint
make gendocs     # Regenerate static documentation and pages
make build       # Build gitverse CLI binary
make clean       # Remove build artifacts and temporary binaries

Clone this wiki locally