What are some personal features you add to your template starter project?
Posted by Punk_Saint@reddit | ExperiencedDevs | View on Reddit | 13 comments
I have spent the last week working on my template starter, making it better in many ways: Security, Optimizations, Better Coding Standards, Data Integrity...
This is the engine from which I'm going to start the next few projects I have with clients, and some of my hobby projects as well.
Before I finish working on it though, I wanted to see if any of you have any interesting "tooling" or "features" you have added to your template projects that made it better to work on, or made something easier, cleaner... I don't know Improved it in some way.
originalchronoguy@reddit
I typically with with microservices, so I can git pull different pre-existing services into a new project and just add plumbing. You don't need to re-do Oauth flow every time and/or you don't need to do SSO from scratch when it can be confiured with a yaml file.
Some common ones:
Authorization, Authentication Layer. E.G. Front end JWT Oauth flow to authorize ability to talk to backend for write operations.
Queue Module with dashboard. So if there are jobs, they use a unified dashboard that shows ongoing jobs you can kill, restart, clear.
---
I also run a bunch of side cars:
Security CVE scan, it checks all dependencies and versions.
Performance module to stress test APIs.
Data flow analyzer based off the Swagger Spec. It will run a tool that simulates a payload and go through the entire data-flow; create a visual diagram and details potential edge case issues.
Documentation layer like CompoDoc that diagrams, documents on a git checkin and build
Service Discovery, TLS, Ingress bootstrap. Fill out a helm chart. App can generate, request DNS, get SSL cert and provide routing to app.
UI/UX validation. Pulls style guides, ensures UI confirms with standards.
I always create a Makefile for reroduceable things to have short-cuts like rebuild service, regenerate TLS certs.
But I really like my service discovery/automatic ingress routing. It can take a fresh project, deploy it to AWS or any VPC and withiin 15 minutes have a full domain, SSL certs, with routing. I can route to 30-40 micro-services under one ingress. Even from my iPhone via SSH, I can deploy a whole app, customize it to a domain on the spot.
SolidDeveloper@reddit
I used to have templates, but I have largely abandoned that practice. Every project I make has way too different features, to the point that almost every time I start the project from scratch. Also, by the time I get to start a new project for which I already have a template, the template is way too out of date – old versions of packages, old style startup and project structure – and so again I will start the project from scratch. Keeping templates updated was too much work for me.
mhaydii@reddit
The biggest thing I've added over the years isn't a feature, it's guardrails. CI checks from day one, structured logging, health check endpoints, basic observability/monitoring...
MissinqLink@reddit
Are we talking work or side projects? Yes to both but very different. At work I try to bake these things into the tooling so everyone can use them. I added a formatter and dependency scanner to our deployment pipeline and then formatter to the pre-commit hook. Linting will probably be next. I also pushed the first edition of the commons library that has standard errors, logging, auth, middleware, etc.
My side projects work very differently. Since I need them to run mostly unattended, I have harnesses that handle catastrophic failures and attempt graceful degradation.
Saki-Sun@reddit
I don't do templates, every new project needs room to iterate and improve and adjust to the requirements.
But I'm not a 'tool builder' type dev. IMHO that approach is too restrictive and limits growth.
Punk_Saint@reddit (OP)
I think it depends on what kind of developer you are, if you have clients that are all asking for different products with the same base. you're going to need a template, It gets quite tedious when you have to build a printing system for example every time you start a new project, or an auth system every project.
For game development or specialized software, you get to start fresh which is always nice.
08148694@reddit
Hey Claude bootstrap a new service. Use the service as a template
Punk_Saint@reddit (OP)
yeah I get this, but I mean the structure of the project itself before you start creating the actual project. i.e the base building blocks, do you have any specialized features for yourself?
jambalaya004@reddit
Access control providers. It’s quite tedious, so a common interface / established convention + any generic code is always nice to have when stating a new project.
Punk_Saint@reddit (OP)
I'm sorry can you elaborate a bit more? Are you talking about granular permissions for users
SpiderHack@reddit
.gitignore and . gitattributes files, every repo forgets the attributes file I've found. Really helps you from having THAT consultant (me, I'm the problem, lol) that uses (or did at one point) windows for development on a project that had all linux or mac machines for the devs before, or vice versa...
I've been hired to basically parachute in, use my own hardware to quickly get onboarded and bypassing Fortune 100 corp. Policies to use my own machine to fix issues that VPs approved me skipping all the onboarding BS so I could fix their production/integration issues (what they needed fixed would have passed the delivery date if I had to wait on getting a machine and account from them).
Knowing that I've been the exception, I know others might be too, so I always add stupid amounts to my git ignore and attributes files, to prevent headaches later.
mikolv2@reddit
My template project is a full production ready CRUD app, along with ci/cd pipelines. Essentially everything boils down to CRUD
Big_Bed_7240@reddit
Very few things should be modeled as simple CRUD though. That’s how you get bad APIs.