DEV Community

Duck
Duck

Posted on

After Setting Up JWT, Redis, Docker, Swagger, and CI for the 20th Time, I Built ArchGen

I Built ArchGen: A Backend Project Generator Powered by GitHub Copilot

This is a submission for the GitHub Copilot Challenge.

What I Built

As a backend developer, I kept running into the same problem.

Every new project started with hours of repetitive setup:

  • Configure TypeScript
  • Set up Fastify or FastAPI
  • Configure database connections
  • Add authentication
  • Configure logging
  • Add Docker support
  • Create CI pipelines
  • Set up validation and error handling

None of these tasks were difficult.

They were just repetitive.

After creating multiple backend services, I realized I was spending more time configuring projects than actually building features.

So I built ArchGen, a CLI tool that generates production-ready backend projects in seconds.

Instead of spending hours wiring infrastructure together, developers can run:

archgen create my-app
Enter fullscreen mode Exit fullscreen mode

Answer a few prompts and get a complete backend project ready to run.


Why I Built It

I wanted a developer experience similar to:

create-next-app
Enter fullscreen mode Exit fullscreen mode

but for backend applications.

Most backend generators either:

  • create very minimal projects
  • generate outdated code
  • focus on only one framework
  • don't support upgrading generated projects

I wanted something opinionated, modern, and practical.

The generated projects include real-world essentials such as:

  • Authentication
  • Validation
  • Logging
  • Error handling
  • Redis integration
  • Docker support
  • CI workflows
  • API documentation
  • Email services
  • S3-compatible storage

These are things I add to almost every backend project.


How GitHub Copilot Helped

GitHub Copilot was heavily involved throughout development.

Generating Boilerplate Faster

ArchGen itself generates boilerplate, but building the generator required writing a lot of repetitive code.

Copilot helped accelerate:

  • CLI command implementations
  • Interactive prompt flows
  • Template generation logic
  • File system operations
  • Validation helpers

Refactoring Large Template Systems

As the project grew, I had to reorganize templates into reusable modules.

Copilot was useful for:

  • Refactoring duplicated logic
  • Extracting reusable utilities
  • Updating imports across files
  • Generating repetitive template mappings

Building Addon Support

One of ArchGen's core features is addon injection:

archgen add docker
archgen add websocket
archgen add oauth
archgen add email
archgen add s3
Enter fullscreen mode Exit fullscreen mode

Copilot helped scaffold many of the repetitive integration points required to support multiple addons consistently.


Features

Generate a Full Backend Project

archgen create my-app
Enter fullscreen mode Exit fullscreen mode

Generates a production-ready backend structure.

Multiple Language Support

Node.js stack:

  • TypeScript
  • Fastify
  • Prisma
  • Redis
  • JWT
  • Zod
  • Pino

Python stack:

  • FastAPI
  • SQLAlchemy 2.0
  • PostgreSQL
  • Redis
  • APScheduler
  • Pydantic v2

Add Features Later

archgen add websocket
archgen add oauth
archgen add api-docs
archgen add email
archgen add s3
Enter fullscreen mode Exit fullscreen mode

No need to regenerate the entire project.

Upgrade Existing Projects

archgen upgrade
Enter fullscreen mode Exit fullscreen mode

ArchGen tracks project metadata and can re-apply updated templates later.


Example

Creating a complete backend project:

archgen create ecommerce-api \
  --language node \
  --docker \
  --testing \
  --ci \
  --oauth \
  --api-docs
Enter fullscreen mode Exit fullscreen mode

This generates:

  • Fastify application
  • Prisma setup
  • Docker configuration
  • GitHub Actions workflow
  • OAuth integration
  • API documentation
  • Testing configuration

in under a second.


Demo & Screenshots

Here's a quick look at the ArchGen workflow, from project creation to the final generated codebase.

Interactive CLI Experience

ArchGen guides developers through project creation using interactive prompts. Instead of memorizing dozens of flags, you can simply answer a few questions and generate a fully configured backend project.

This is cli terminal


Supported Languages and Addons

The CLI allows developers to choose between Node.js and Python stacks, along with optional addons such as Docker, Testing, CI/CD, WebSocket support, OAuth, Email, S3 storage, and AI agent integrations.

language and addons


Detailed Stack Information

Before generating a project, developers can inspect the complete technology stack. This helps teams understand exactly what will be included in the generated application.

Detail of stack


Project Generation in Action

Creating a production-ready backend takes only a few seconds. ArchGen automatically configures the selected stack, dependencies, and project structure.

Test create by archgen


Generated Production-Ready Structure

The generated project includes a clean and opinionated architecture with modules, middleware, configuration, shared utilities, database integration, and other production essentials already wired together.

Code space after genenerate by archgen

What I Learned

Building ArchGen taught me that developer productivity isn't only about writing application code.

A huge amount of engineering time is spent creating the same infrastructure repeatedly.

By automating that setup process, developers can spend more time solving actual business problems.

GitHub Copilot helped me move much faster, especially when implementing repetitive scaffolding logic and maintaining consistency across templates.


Links

GitHub Repository:

https://github.com/Kidkender/archgen

NPM Package:

https://www.npmjs.com/package/@kidkender/archgen

Thanks for reading!

Top comments (0)