While it’s straightforward to create a single file using AI, generating an entire project structure can be more challenging. For example, if you wan

Easy Way to Generate Complete Project Source Code with ChatGPT / Claude.ai

submited by
Style Pass
2024-10-27 17:00:26

While it’s straightforward to create a single file using AI, generating an entire project structure can be more challenging. For example, if you want to create a Todo list API in Go following best practices, you’ll need multiple packages, a cmd/main.go file, docker-compose configuration, and more. Creating and copying files one by one from the chat can be time-consuming and inconvenient.

Here’s a simple solution: ask the AI to generate a bash script that creates the entire project structure with all necessary files.

Create a Go 1.23 project that implements a TODO list API with PostgreSQL storage. Include all necessary files, docker-compose configuration, and environment variables. Package it as a bash script that handles the complete setup. Name the project ‘mytest’.

I tried this approach, and it worked well. The generated bash script created the project structure with multiple files. The resulting code was buildable with only minor issues to resolve.

Leave a Comment
Related Posts