No description
  • TypeScript 97.7%
  • HTML 0.9%
  • CSS 0.9%
  • JavaScript 0.5%
Find a file
Cullen Carstens 801e8d89eb Rebrand: ForgeKit by PrimusFabrum
- Renamed all @aio-bp scoped packages to @primusfabrum
- Updated org references, app IDs, and documentation
- Desktop app builds as com.primusfabrum.forgekit
2026-05-11 09:35:34 +02:00
packages Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
scripts Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
tools Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
.DS_Store Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
.gitignore Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
.npmrc Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
.npmrc.bak Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
bun.lock Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
bunfig.toml Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
package.json Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
README.md Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00
tsconfig.base.json Rebrand: ForgeKit by PrimusFabrum 2026-05-11 09:35:34 +02:00

All-in-One Boilerplate (forgekit)

A comprehensive monorepo boilerplate for building full-stack applications with server, CLI, web, desktop, and mobile components.

🚀 Quick Start

Using Create Command

bun create @forgekit my-app
cd my-app
bun install
bun run dev

Manual Setup

git clone https://closed-source.carstens.ltd/Apertura/forgekit.git
cd forgekit
bun install
bun run dev

📦 Packages

@forgekit/server

Express-based server with TypeScript support

import { createServer } from '@forgekit/server';
const server =createServer({ port: 3000 });
await server.start();

@forgekit/cli

Cross-platform CLI framework

bun run cli hello --name World

@forgekit/web-ui

React dashboard with Tailwind CSS

cd packages/web-ui
bun run dev

@forgekit/desktop-app

Electron desktop wrapper

cd packages/desktop-app
bun run dev

@forgekit/mobile-app

React Native mobile app

cd packages/mobile-app
bun run start

🔧 Development

Prerequisites

  • Bun >= 1.0.0
  • Node.js >= 18 (for compatibility)
  • Git

Environment Variables

Create .env in packages/server/:

PORT=3000
NODE_ENV=development
JWT_SECRET=your-secret-key
DATABASE_URL=sqlite://dev.db

Scripts

Command Description
bun run dev Run all packages in dev mode
bun run build Build all packages
bun run test Run tests
bun run server:dev Run only server
bun run web:dev Run only web UI

🏗️ Architecture

┌─────────────┐
│   Desktop   │──┐
│   (Electron)│  │
└─────────────┘  │
                 │ Embeds
┌─────────────┐  │
│   Web UI    │◄─┘
│   (React)   │
└─────────────┘
       │
       │ API Calls
       ▼
┌─────────────┐
│   Server    │
│   (Express) │
└─────────────┘
       │
       ├──► CLI
       │    (Commands)
       │
       └──► Mobile
            (React Native)

📚 Documentation

🤝 Contributing

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Push to branch
  5. Open Pull Request

📦 Monorepo Configuration, Versioning & CI/CD

{
  "scripts": {
    // Versioning
    "publish:all": "bun run scripts/publish.ts",
    "version:patch": "npm version patch --workspaces",
    "version:minor": "npm version minor --workspaces",
    "version:major": "npm version major --workspaces",
    // CI/CD - Branches
    "branch:feature": "bun run scripts/branch.ts feature",
    "branch:release": "bun run scripts/branch.ts release",
    "branch:hotfix": "bun run scripts/branch.ts hotfix",
    // CI/CD - Workflows
    "build:all": "bun run scripts/build.ts",
    "test:all": "bun run scripts/test.ts",
    "lint:all": "bun run scripts/lint.ts",
    "clean:all": "bun run scripts/clean.ts"
  }
}

Forgejo NPM Registry Configuration

Create a .forgejo/workflows/publish.yml for CI/CD:

name: Publish Packages
on:
  push:
    tags:
      - 'v*'
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Bun
        uses: oven-sh/setup-bun@v1
        
      - name: Install dependencies
        run: bun install
        
      - name: Build packages
        run: bun run build
        
      - name: Publish to Forgejo
        run: |
          echo "//git.your-domain.com/api/packages/your-org/npm/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
          bun run publish:all
        env:
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

This boilerplate provides:

  1. Monorepo structure with Bun workspaces
  2. TypeScript across all packages
  3. Server with Express, shell execution, and middleware
  4. CLI with Commander, supporting custom namespaces and commands
  5. Web UI with React, Tailwind, and React Router
  6. Desktop app using Electron with web UI embedding
  7. Mobile app using React Native (Expo)
  8. Shared configurations for ESLint, Prettier, and TypeScript
  9. CI/CD pipeline for Forgejo
  10. Create script for new projects

To start using it:

  1. Clone the repo
  2. Run bun install
  3. Run bun run dev to start all packages
  4. Use bun run create to scaffold new projects
  5. Publish with bun run publish:all

Quick Start Guide

# Clone and setup
git clone https://closed-source.carstens.ltd/Apertura/forgekit.git
cd forgekit
bun install

# Run all packages in development
bun run dev

# Or run individually
bun run server:dev    # Server on port 3000
bun run cli:dev       # CLI tool
bun run web:dev       # Web UI on port 5173
bun run desktop:dev   # Electron app
bun run mobile:dev    # React Native app

# Create a new project from boilerplate
bun run create

# Build for production
bun run build

# Publish to Forgejo registry
bun run publish:all

📄 License

MIT