Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Bug Report
description: Report a bug in scaffold
labels: ['bug']
body:
- type: textarea
id: description
attributes:
label: Bug Description
description: A clear description of the bug
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
value: |
1. Run `scaffold create ...`
2. Select ...
3. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen
validations:
required: true
- type: input
id: version
attributes:
label: scaffold version
description: Output of `scaffold --version`
validations:
required: true
- type: input
id: node-version
attributes:
label: Node.js version
description: Output of `node --version`
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
options:
- macOS
- Windows
- Linux
validations:
required: true
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Feature Request
description: Suggest a new feature for scaffold
labels: ['enhancement']
body:
- type: textarea
id: description
attributes:
label: Feature Description
description: A clear description of the feature you'd like
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why would this feature be useful?
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Any alternative solutions you've considered
validations:
required: false
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/new_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: New Template Request
description: Request a new framework template
labels: ['new-template']
body:
- type: input
id: framework
attributes:
label: Framework Name
description: 'e.g., Vue.js, Svelte, Fastify'
validations:
required: true
- type: dropdown
id: type
attributes:
label: Project Type
options:
- Frontend
- Backend
- Full-Stack
validations:
required: true
- type: textarea
id: description
attributes:
label: Template Description
description: What should the template include?
validations:
required: true
- type: textarea
id: references
attributes:
label: References
description: Links to the framework docs or similar scaffolding tools
validations:
required: false
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Description

<!-- What does this PR do? -->

## Type of Change

- [ ] Bug fix
- [ ] New feature
- [ ] New template
- [ ] Documentation update
- [ ] Refactoring
- [ ] Other (describe)

## Checklist

- [ ] My code follows the project's code style
- [ ] I have run `npm run lint` and `npm run format`
- [ ] I have added tests that prove my fix/feature works
- [ ] All existing tests pass (`npm test`)
- [ ] I have updated documentation if needed

## Testing

<!-- How did you test these changes? -->
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20, 22]

steps:
- uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Typecheck
run: npm run typecheck

- name: Lint
run: npm run lint

- name: Format check
run: npm run format:check

- name: Build
run: npm run build

- name: Test
run: npm test
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm test

- name: Publish to npm
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
48 changes: 48 additions & 0 deletions .github/workflows/template-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Template Test

on:
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 6am UTC
workflow_dispatch:

jobs:
test-templates:
runs-on: ubuntu-latest

strategy:
matrix:
template: [react, nextjs, angular, express, fastapi]

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build CLI
run: npm run build

- name: Generate ${{ matrix.template }} project
run: node dist/index.js create test-${{ matrix.template }} --${{ matrix.template }} --yes

- name: Verify generated files exist
run: |
ls -la test-${{ matrix.template }}
test -f test-${{ matrix.template }}/package.json || test -f test-${{ matrix.template }}/pyproject.toml

- name: Install generated project dependencies
if: matrix.template != 'fastapi'
run: |
cd test-${{ matrix.template }}
npm install

- name: Build generated project
if: matrix.template != 'fastapi' && matrix.template != 'angular'
run: |
cd test-${{ matrix.template }}
npm run build
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
coverage
*.hbs
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2
}
68 changes: 67 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,67 @@
# scaffold
# scaffold

[![CI](https://github.com/CodeCanvasCollective/scaffold/actions/workflows/ci.yml/badge.svg)](https://github.com/CodeCanvasCollective/scaffold/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/@codecanvascollective/scaffold)](https://www.npmjs.com/package/@codecanvascollective/scaffold)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> Interactive CLI tool for scaffolding modern full-stack projects.

Generate production-ready project structures for React, Next.js, Angular, Express, and FastAPI — with TypeScript, ESLint, Prettier, testing, and CI/CD pre-configured.

## Quick Start

```bash
npx @codecanvascollective/scaffold create my-app
```

Or use quick mode to skip prompts:

```bash
npx @codecanvascollective/scaffold create my-app --react
npx @codecanvascollective/scaffold create my-app --nextjs
npx @codecanvascollective/scaffold create my-app --express
```

## Supported Frameworks

| Framework | Type | Variants |
| -------------------- | -------- | ------------------------- |
| React + Vite | Frontend | Base, Tailwind, shadcn/ui |
| Next.js (App Router) | Frontend | Base, NextAuth, Prisma |
| Angular 18 | Frontend | Base |
| Express.js | Backend | Base, Prisma |
| FastAPI | Backend | Base |

## Features

- **Interactive prompts** — guided project setup with framework, features, and config selection
- **Quick mode** — skip prompts with `--react`, `--nextjs`, `--express` flags
- **Template variants** — choose between base setup and pre-configured add-ons
- **Feature selection** — ESLint, Prettier, Tailwind, testing, Docker, GitHub Actions, and more
- **Plugin system** — extend with custom templates and hooks
- **Multiple package managers** — npm, yarn, or pnpm

## Commands

```bash
scaffold create <name> # Interactive project creation
scaffold create <name> --react # Quick mode (skip prompts)
scaffold create <name> -y # Use all defaults
scaffold create <name> --from config.json # From config file
scaffold list # List available templates
scaffold doctor # Check system dependencies
scaffold --version # Show version
scaffold --help # Show help
```

## Contributing

See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for development setup and contribution guidelines.

## Plugin System

Extend scaffold with custom plugins. See [docs/PLUGIN_GUIDE.md](docs/PLUGIN_GUIDE.md).

## License

MIT — [CodeCanvas Collective](https://codecanvascollective.com)
Loading
Loading