Skip to content

fresh-app/factory

Repository files navigation

Fresh App Factory

Fresh App Factory automatically generates template repositories from popular open-source app frameworks.

Why?

This project aims to make it easier for developers to get started with new app frameworks. To understand how, let’s compare the different approaches:

Approach Pros and cons
Manually-maintained repos
  • ➕ Can easily create a new repo by clicking on “Use this template” button.
  • ➕ Can easily be used with tools like Codesandbox, Gitpod, or Stackblitz.
  • ➖ Can easily become out-of-date
  • ➖ Maintainers may forgot to mark repository as a template repository.
Folder in monorepo
  • ➕ Easier for maintainers to keep up-to-date.
  • ➕ Can easily be used with tools like Codesandbox, Gitpod, or Stackblitz.
  • ➖ Cannot use the “Use this template” button.
  • ➖ Requires an extra step to copy a subdirectory into a new repo.
Generator CLIs
  • ➕ Can support a lot of combinations.
  • ➕ Gives you an up-to-date app.
  • ➖ Requires installing an extra CLI tool, whose installation process may be slow.
  • ➖ Cannot easily use with Codesandbox, Gitpod, or Stackblitz.
  • ➖ Cannot use the “Use this template” button.
Fresh App Factory
  • ➕ Up-to-date as the templates are generated from generator CLIs daily.
  • ➕ Can easily create a new repo by clicking on “Use this template” button.
  • ➕ Can easily be used with tools like Codesandbox, Gitpod, or Stackblitz.
  • ➖ Supports only a few configurations.

Development

Prerequisites

  • Node.js and Corepack
  • Docker

Setup

# Install dependencies
pnpm install

# Build docker image
bin/build

# Run a generator
# Tip: when opening a generator in VS Code, you can press Cmd+Shift+B to run it
bin/run fresh-vite-app

# Run an interactive shell to inspect runner state
bin/inspect

# Run the factory on GitHub Actions
gh --repo fresh-app/factory workflow run manual.yml -f generator=fresh-vite-app