fstackx

Forge full-stack development environments from a single command.

fstackx is an npm CLI that removes repetitive project setup. Choose a complete preset or compose a custom stack, and Forge generates the project structure, service starters, environment files, API wiring, CORS configuration, development scripts, styling setup, Docker files, and Git configuration.

Quick Start

Use the published package:

npx fstackx app my-app

Choose Preset or Custom Stack when prompted. Then start the generated project:

cd my-app
npm run dev

Generate a preset without prompts:

npx fstackx app my-app --preset mern

Skip dependency installation when you only want to inspect generated files:

npx fstackx app my-app --preset pern --no-install

Presets

The preset catalog includes:

  • MERN, MEVN, MEAN, and PERN
  • Laravel + Vue + MySQL
  • Laravel + React + PostgreSQL
  • Django + React/Vue + PostgreSQL
  • FastAPI + React/Vue + PostgreSQL
  • Go + React/Vue + PostgreSQL
  • Rust + React/Vue + PostgreSQL
  • Next.js + PostgreSQL or MongoDB
  • Nuxt + PostgreSQL
  • Full-stack TypeScript
  • Full-stack JavaScript

Presets include a default styling choice, and styling can be overridden:

npx fstackx app mern-bootstrap --preset mern --styling bootstrap
npx fstackx app mern-tailwind --preset mern --styling tailwind
npx fstackx app mern-shadcn --preset mern --styling shadcn

List preset IDs:

npx fstackx --list-presets

Custom Stack

Custom Stack lets you choose the frontend, backend, database, styling system, and development tools independently.

Example:

npx fstackx app go-vue --frontend vue --backend go --database postgresql --styling tailwind --tools vite,git

Supported styling options include Tailwind CSS, Bootstrap, Material UI, Chakra UI, shadcn/ui, Bulma, Sass/SCSS, CSS Modules, Styled Components, Emotion, and Vanilla CSS.

The generated demo page uses the styling system selected by the user. Styling is not silently replaced with a generic fallback, so a missing styling dependency is visible during development.

Generated Project

A generated project may include:

my-app/
├── frontend/
│   ├── src/
│   ├── package.json
│   └── .env.example
├── backend/
│   ├── service starter files
│   ├── package.json or language manifest
│   └── .env.example
├── .forge/config.json
├── .env
├── .env.example
├── .gitignore
├── README.md
├── package.json
└── docker-compose.yml

Forge generates development-safe environment values such as FRONTEND_URL, API_URL, PORT, DATABASE_URL, REDIS_URL, and AUTH_SECRET. .env is ignored automatically, while .env.example is generated for sharing configuration shape without real secrets.

Wiring

When a frontend and backend are selected, Forge creates a frontend API client using the generated API URL. Backend starters include CORS configuration based on FRONTEND_URL and database configuration based on DATABASE_URL.

When Docker or Docker Compose is selected, Forge creates service Dockerfiles, a Compose file, and development ports for the selected services.

Forge does not create production credentials or claim that an external database is running. The generated connection values are development defaults and placeholders; the selected runtime, database, Docker, Composer, Python, Go, or Rust toolchain must be installed when that stack needs to run locally.

CLI Options

forge app [name]
forge create [name]

--preset <id>       Generate from a preset
--frontend <id>     Custom frontend
--backend <id>      Custom backend
--database <id>     Custom database
--styling <id>      Custom styling system or preset override
--tools <a,b,c>     Development tools
--no-install        Skip dependency installation
--no-git            Skip Git initialization
--force             Allow generation in a non-empty directory
--list-presets      List available presets

Local Development

Clone the repository and install Node.js 18 or newer:

git clone https://github.com/kehindetemple/my-fstackx-app.git
cd my-fstackx-app
npm test

The test suite covers configuration resolution, file generation, environment protection, every preset, every catalog selection, styling setup, and generated wiring requirements.

Run the local CLI without publishing:

npm run forge -- app local-demo --preset mern --no-install

Publishing

The package is published as fstackx:

npm login
npm test
npm publish

The package exposes the forge executable, so a global installation can be used with:

npm install --global fstackx
forge app my-app

License

MIT

Built With

Share this project:

Updates