No description
- TypeScript 97.7%
- HTML 0.9%
- CSS 0.9%
- JavaScript 0.5%
- Renamed all @aio-bp scoped packages to @primusfabrum - Updated org references, app IDs, and documentation - Desktop app builds as com.primusfabrum.forgekit |
||
|---|---|---|
| packages | ||
| scripts | ||
| tools | ||
| .DS_Store | ||
| .gitignore | ||
| .npmrc | ||
| .npmrc.bak | ||
| bun.lock | ||
| bunfig.toml | ||
| package.json | ||
| README.md | ||
| tsconfig.base.json | ||
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
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- 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:
- Monorepo structure with Bun workspaces
- TypeScript across all packages
- Server with Express, shell execution, and middleware
- CLI with Commander, supporting custom namespaces and commands
- Web UI with React, Tailwind, and React Router
- Desktop app using Electron with web UI embedding
- Mobile app using React Native (Expo)
- Shared configurations for ESLint, Prettier, and TypeScript
- CI/CD pipeline for Forgejo
- Create script for new projects
To start using it:
- Clone the repo
- Run
bun install - Run
bun run devto start all packages - Use
bun run createto scaffold new projects - 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