Logo

dev-resources.site

for different kinds of informations.

Anvil: An attempt of saving time

Published at
8/14/2024
Categories
codegeneration
nocode
standards
Author
henriqueleite42
Categories
3 categories in total
codegeneration
open
nocode
open
standards
open
Author
15 person written this
henriqueleite42
open
Anvil: An attempt of saving time

When I'm creating a new project, I always have the same problem: In order to follow best practices and make the code maintainable, the codebase becomes extremely verbose.

It always takes my motivation from me to have to write a bunch of stuff only to make some CRUDs. It's boring, repetitive and takes all my joy off coding.

Why I don't use Template Repositories?

  • It's a terrible experience to have to keep updating dependencies.

  • I always forgot to change example values, like the README

  • The changes that I do on the template aren't applied to the previous projects, so if I want to add a new thing like graceful shutdown, I have to do it one by one, and I have it.

  • This one doesn't affect it so much, but I don't like to have commits from the template repository on a new repository, and it's an extra thing to have to delete the .git folder

This leads me to think about the things that I hate, and I discovered that I hate many things:

  • Lack of documentation in a project

  • Lack o standards between multiple projects

  • Lack of a way to track where a piece of data is used

  • Lack o standards between multiple projects

  • Lack of a way to track the flow of events and communication between services

  • Lack o standards between multiple projects

Did I mention that I hate Lack o standards between multiple projects? Because I hate it. A lot.

And all these frustrations gave me an idea: What If I tried to create a specification to creating APIs?

Most APIs follow the same pattern, have the same things, and we all agree in a couple of standards and best practices for web development.

And from this, Anvil was born.

Anvil is my attempt to create something that's a mix of three things:

  • OpenAPI/Swagger specs

  • No-Code solutions

  • Frameworks

So, from a schema file (similar to OpenAPI specs), a code generator that can be fully customized by anyone, will generate a repository with all the standards and best practices that you want, without making you dependent on it like a Framework would.

The best part is that it can update your project for you, so it's not used only on the project creation. The schema file will always be the starting point for any feature.

I'm already working on the schema definition, it's hard to make it work with all the features that HTTP has, it ends up being too much flexible (WE NEED MORE STANDARDS!!!!), but nothing that a couple of days to define if a property should be called ResHeaders or ResponseHeader, am I right?

Please, give a look at the repository, the json schema definition and the examples to see what you think about it. I'm open to any suggestions, the more edge cases that we can predict, the less breaking changes we have.

If you have any options that you wanna share, please, leave it in the comments or create an issue in the repository and let's talk about it. Thanks for reading.

codegeneration Article's
30 articles in total
Favicon
Anvil: An attempt of saving time
Favicon
Spending Less Time on Boilerplate with Blackbird
Favicon
Boost Your Coding: Easy AI Code Generation Tricks
Favicon
How to Use AI Code Generation to Enhance Developer Productivity
Favicon
Understanding Abstract Syntax Trees
Favicon
Component Generation with Figma API: Bridging the Gap Between Development and Design
Favicon
How to Perform Code Generation with LLM Models
Favicon
Get rid of Copy/Paste with Plop Js!
Favicon
ABP Suite: Best CRUD Page Generation Tool for .NET
Favicon
Generating TypeScript Code for a Dynamic Country Flag React Component
Favicon
Top Free Code Generation tools, APIs, and Open Source models
Favicon
Introduction to Code Generation in Rust
Favicon
Best Code Generation APIs in 2023
Favicon
Crafting Prompt Templates for Code Generation
Favicon
NEW: Code Generation APIs available on Eden AI
Favicon
Declarative code generation in Unity
Favicon
Build a WebAssembly Language for Fun and Profit: Code Generation
Favicon
Using EDMX file and T4 in .NET Core to Generate Code (Entities, DTO, API, Services etc.)
Favicon
Freezed Kullanarak Flutter'da JSON Nasıl Ayrıştırılır? 💫 🌌 ✨
Favicon
Dotnet code generation overview by example
Favicon
Sparky's Tool Tips: NimbleText
Favicon
Coding the code versus coding the code that codes
Favicon
Build an entire React application in one command
Favicon
Ensure auto-generated code is always up-to-date with compile-time assertions in Go
Favicon
Sitecore Code Generation with Unicorn in 2020
Favicon
gosli: a little attempt to bring a bit of LINQ to Golang
Favicon
How to make a code generator in 5 minutes (or less)
Favicon
Adding Contexts via Go AST (Code Instrumentation)
Favicon
How to Add Generated HttpClient to ASP.NET Core Dependency Injection (Right Way)
Favicon
Using code generation to survive without generics in Go

Featured ones: