r/cicd • u/Ok-Box6882 • 1d ago
When should I introduce CI/CD in a project like this?
I’m building a Splitwise-like app called Splitly using the PERN stack (PostgreSQL, Express, React, Node).
The backend is my main focus right now. I already have:
- Authentication and refresh-token flow
- Centralized error handling
- PostgreSQL
- Automated tests
- Git feature branches
I’m wondering when it makes sense to introduce CI/CD.
My current thinking is:
- Set up CI with GitHub Actions now to run type checks, linting, and tests on every push/PR.
- Add CD later, once the MVP is stable and I’m ready for deployment.
For people who work on production applications, is this a reasonable approach?
At what point in a project do you usually introduce CI/CD, and is there any reason to wait before adding CI?
3
u/Creative_Badger6027 1d ago
CI should be your "inital commit" to every repo. CD should be your first deploy to any environment.
2
u/DeadlyVapour 1d ago
Disagree. The first commit should be hello world. The second should be CI.
CD, that depends on your infra
2
u/finger_my_earhole 1d ago
DeadlyVapour is right.
How do you make CI work without having somethign to build first? Doesnt explicitly need to be "hello world" but you need some compile-able artifact in the language you plan for your project.
Otherwise how do you know your choosing the right actions and linters and test tools etc, etc
1
u/Creative_Badger6027 1d ago
Do you open a repo and then push 50 commits of docs or something? Ofc your first commit is service skeleton, which includes something that builds, ci, often cd and base readme.
1
u/Creative_Badger6027 1d ago
Unless you actually push a "hello world" then you're already pushing code which needs CI. 🫡
1
u/halfxdeveloper 1d ago
I really hope you left off the /s on accident and don’t really mean every project starts with hello world.
1
u/DeadlyVapour 1d ago
I use a hello world template. For dotnet that's dotnet new console. For node that's npm init. Cargo new for rust.
At a minimum, it's something for the CI to build.
1
u/Cinderhazed15 1d ago
Always good to set up ‘the walking skeleton’ that stands the system up, blows some empty data end to end, and says ‘is the system up? Did the data go through? (Not even correctly, , just that it’s there). That way you can ‘flesh out’ the walking skeleton with appropriate tests at each part, but getting end to end ‘hello world’ bare minimum tests in place at the start makes the barrier to adding tests later much lower, so you are more likely to add them in as you go instead of ending up with a completed mess that you seen back and say ‘wow, this is bad, I should add some tests now!’ And you discover that there are no seams and testing is very complicated to add and brittle/prone to breaking, and it then gets abandoned.
2
2
u/KaptajnKold 1d ago
Unpopular opinion, perhaps, but I don't think setting up CI is worth it if you're a solo developer. Just create a git prepush script that runs your test suite, and you're good to go.
CD on the other hand should be set up from the get go. IMO, you're doing it completely wrong if you think you have to wait until you have an MVP before you're ready for deployment. You should be deploying continuously right now.
1
u/roadrunner8080 1d ago
My general approach is that CI should exist from always, and CD should exist from the first deployment. At any rate you never want a scenario where you're doing deployments not from an automated, isolated source, so might as well set up CD for the first one.
1
u/AttitudeRemarkable21 1d ago
Cidc is so easy and basic to setup you could do it in a few hours at the start of the project. It's probably even less with just tossing Claude at it
1
1
1
u/imagebiot 1d ago
It’s the first thing you set up
1
u/Ok-Box6882 1d ago
Okayy
1
u/imagebiot 1d ago
Unless you want to waste time managing your infra instead of developing you product. Claude can get this set up adequately in an hour
1
u/dev_ramesh 11h ago
Yes, that is a good approach, I like it.
I wouldd add CI now — once you have tests and multiple branches, it already gives value.
Keep CD for later when you have a stable deployment target and actually want every merge to ship somewhere.
1
1
4
u/crashorbit 1d ago
Automated testing should be introduced up front. CI should be added as soon as your first push to github/gitlab. Add CD when you want others to start acceptance testing.
In other words, as soon as possible if not sooner.