Skip to content

disclearing/SigmaGit-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

145 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sigmagit

A modern GitHub-like git hosting platform built with TypeScript, Bun, React, and more.

Overview

Sigmagit is a fully-featured git hosting platform that allows you to host and manage your code with ease.

πŸš€ Quick Start

Prerequisites

  • Bun 1.3+: JavaScript runtime and package manager
  • Node.js 20+: For certain dependencies
  • PostgreSQL 14+: Database
  • Redis (optional): For caching
  • S3-compatible storage or local filesystem: For git objects

Installation

# Clone repository
git clone <repository-url>
cd sigmagit

# Install dependencies
bun install

# Set up environment
cp .env.example .env
# Edit .env with your configuration

# Run database migrations
bun run db:push

# Start web app + API server
bun run dev:web

# Start mobile app + API server (optional)
bun run dev:mobile

# Start Discord bot only (optional)
bun run dev:discord

πŸ“ Project Structure

sigmagitv2/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ api/              # Hono API server (Bun)
β”‚   β”œβ”€β”€ web/              # TanStack Start web application
β”‚   β”œβ”€β”€ mobile/           # Expo React Native mobile app
β”‚   β”œβ”€β”€ docs-vitepress/   # VitePress documentation site
β”‚   β”œβ”€β”€ discord-bot/      # Discord integration bot
β”‚   └── runner/           # Go-based CI runner agent
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ db/               # Drizzle ORM schema + migrations
β”‚   β”œβ”€β”€ lib/              # Shared utilities + API client
β”‚   └── hooks/            # Shared React Query hooks/types
β”œβ”€β”€ docs/                 # Markdown technical docs
β”œβ”€β”€ turbo.json            # Turbo monorepo pipeline config
└── .env.example          # Environment variables template

πŸ“š Documentation

Getting Started

Technical Documentation

🐳 Container Registry

Sigmagit includes an OCI Distribution (Docker Registry) v2–compatible API for hosting container images. Use your API host as the registry:

docker login <API_HOST>   # username + password or username + API key
docker push <API_HOST>/<owner>/<image>:<tag>
docker pull <API_HOST>/<owner>/<image>:<tag>

Images are stored in the same S3 or local storage backend as git objects, under the registry/ prefix. Access follows Sigmagit identities: push/pull is allowed for the namespace owner (user or org) and org members.

πŸ›  Tech Stack

Core Technologies

  • Runtime: Bun 1.3.5+
  • Language: TypeScript
  • Frontend: React 19, TanStack Start, TailwindCSS
  • Backend: Hono, Bun
  • Mobile: React Native, Expo
  • Database: PostgreSQL, Drizzle ORM
  • Caching: Redis (optional)
  • Storage: S3-compatible or local filesystem
  • Authentication: better-auth

Key Libraries

  • UI: shadcn/ui, lucide-react, tanstack-theme-kit
  • State Management: TanStack Query, TanStack Store
  • Forms: react-hook-form
  • Routing: TanStack Router (file-based)
  • Git: isomorphic-git
  • Email: Resend or Nodemailer (SMTP)
  • Database: Drizzle ORM, postgres

πŸ”’ Configuration

Required Environment Variables

See Environment Variables section below) for required configuration.

Optional Features

  • Redis: Enable for caching and rate limiting
  • S3: Configure for git object storage (alternatively use local)
  • SMTP: Configure for email sending (alternatively use Resend)

πŸ”— API

The API server provides REST endpoints for all Sigmagit functionality.

🌐 Web App

Modern React-based web application with file-based routing.

  • Base URL: http://localhost:3000 (configurable)
  • Documentation: Web App

πŸ“± Mobile App

React Native mobile application built with Expo.

πŸ€– Discord Bot

Discord integration for notifications and repository management.

πŸ” Architecture

System architecture and data flow.

πŸ›  Development

Development setup, workflow, and best practices.

🚒 Deployment

Production deployment guides for various platforms.

πŸ” Features

Detailed feature documentation.

πŸ”’ Security

Security best practices and guidelines.

πŸ“ž Environment Variables

Required

DATABASE_URL="postgresql://user:password@localhost:5432/sigmagit"
BETTER_AUTH_SECRET="your-super-secret-key-here"

Optional

# Storage
STORAGE_TYPE="s3"  # Options: s3, local
S3_ENDPOINT="https://your-s3-endpoint.com"
S3_REGION="auto"
S3_ACCESS_KEY_ID="your-access-key-id"
S3_SECRET_ACCESS_KEY="your-secret-access-key"
S3_BUCKET_NAME="your-bucket-name"
STORAGE_LOCAL_PATH="./data/repos"  # Only if STORAGE_TYPE=local

# Redis (recommended)
REDIS_URL="redis://localhost:6379"

# Email
EMAIL_PROVIDER="resend"  # Options: resend, smtp
RESEND_API_KEY="resend-api-key-here"
SMTP_HOST="smtp.example.com"
SMTP_PORT="587"
SMTP_SECURE="false"
SMTP_USER="your-username"
SMTP_PASS="your-password"
EMAIL_FROM="Sigmagit <noreply@sigmagit.dev>"

# API
API_URL="http://localhost:3001"
WEB_URL="http://localhost:3000"

# Discord Bot
DISCORD_BOT_TOKEN="your-bot-token-here"
DISCORD_CLIENT_ID="your-client-id-here"
DISCORD_GUILD_ID="your-server-id-here"

# Discord Webhooks (for API to send notifications to Discord)
DISCORD_WEBHOOK_URL="https://your-discord-webhook-url.com"
WEBHOOK_SECRET="your-webhook-secret-here"
PUBLIC_WEBHOOK_URL="http://your-domain.com/api/webhooks/discord"

🀝 Contributing

We welcome contributions! Please read our Contributing Guide for details.

πŸ“„ License

License - See LICENSE file for details.

πŸ†˜ Support

For support, please open an issue on GitHub Issues.


Made with ❀️ using Bun, TypeScript, React and TanStack