- ARCHITECTURE.md: orange → orangevps (100.79.111.61), update imrnes IP to 100.121.180.82, archlinux IP to 100.84.39.83, remove offline laptop node - README.md: update VPS table, env examples, troubleshooting IPs - CONTRIBUTING.md: fix VPS name and IP in deploy section Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4.9 KiB
Contributing to Asepharyana Hub
Table of Contents
- Prerequisites
- Local Setup
- Development Workflow
- Project Structure
- Coding Standards
- Commit Message Format
- Pull Request Process
- Adding a New Service
Prerequisites
- Git with LFS support
- Node.js >= 22.11.0 (via
.node-version) - Bun >= 1.3.11 (package manager)
- Docker and Docker Compose (for shared infrastructure)
Local Setup
1. Clone the Repository
git clone https://github.com/asepharyana/asepharyana-hub.git
cd asepharyana-hub
2. Initialize Submodules
This hub repo uses Git submodules for all application services:
git submodule update --init --recursive
This checks out all submodules at the pinned commit (not main). The submodules and their remotes are:
| Path | Remote |
|---|---|
apps/scraper |
asepharyana/asepharyana-hub-scraper |
3. Install Dependencies per Service
Install dependencies for TypeScript/Bun services:
cd apps/scraper && bun install && cd ../..
4. Start Shared Infrastructure
Start shared services (Redis) via Docker Compose:
docker compose -f infra/compose/shared.yml up -d
5. Configure Environment
Copy the example environment file and adjust as needed:
cp .env.example .env
Key variables to configure:
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection (Tailscale IP to imrnes VPS) |
GITHUB_TOKEN |
GitHub personal access token |
Development Workflow
Running Services
Refer to each service's own documentation for setup and development instructions.
API Documentation
Refer to each service's own documentation for API docs and endpoints.
Coding Standards
Linting
- Biome for TypeScript/JavaScript formatting and linting
Run linting:
# TypeScript/JavaScript
bun run check
Formatting
- Biome for TypeScript/JavaScript
- EditorConfig for general formatting (
.editorconfig)
# Format all
bun run format
Commit Message Format
This project enforces Conventional Commits for all commit messages.
Format
<type>(<scope>): <description>
[optional body]
[optional footer]
Types
| Type | Usage |
|---|---|
feat |
A new feature |
fix |
A bug fix |
chore |
Maintenance, config, tooling changes |
docs |
Documentation only changes |
refactor |
Code change that neither fixes a bug nor adds a feature |
test |
Adding or updating tests |
ci |
CI/CD configuration and scripts |
style |
Formatting, missing semicolons, etc. (no production change) |
perf |
Performance improvement |
Examples
feat(scraper): add new data source integration
chore: update biome config to v10
docs: add API endpoint documentation for scraper
ci: migrate to CodeQL v3
Scopes
Common scopes: scraper, infra, ci, deps
Pull Request Process
-
Create a branch from
mainwith a descriptive name:feat/my-featurefix/issue-descriptionchore/update-config
-
Make your changes following the coding standards above.
-
Run checks locally before pushing:
bun run check -
Push and open a PR against
main. CI will automatically run:- Lint — ESLint across changed TypeScript files
- TypeCheck — TypeScript compilation check
- Security — CodeQL analysis (weekly schedule + PRs)
-
Docker Build Pipeline triggers on pushes to
mainwhenapps/**changes:- Detects which services changed
- Builds Docker images for only those services
- Pushes to GHCR with
latestandsha-<short>tags - Updates compose manifests to use the new SHA tags
-
Deployment Pipeline triggers after a successful Docker build:
- SSHes into the VPS (
orangevps, Tailscale IP100.79.111.61) - Pulls updated Docker images
- Recreates only the changed containers
- All services share the
app-shared-netDocker network
- SSHes into the VPS (
-
Merge after CI passes and you have at least one approval (if applicable). Use squash merge to keep history clean.
Adding a New Service
See docs/add-new-app.md for the complete step-by-step guide.