Step 1 — Project Setup & Repo Structure

What This Step Is About

Before writing a single line of application code, you need a foundation: a version-controlled codebase with a clear folder structure, the right dependencies installed, and a way to run both the frontend and backend simultaneously during development. This step is the equivalent of setting up a construction site before building anything. Getting it right here prevents confusion and rework later.


Concepts and Tools

Git and Version Control

Git is the industry-standard tool for tracking changes to code over time. Every meaningful unit of work gets saved as a "commit" — a snapshot of the project at that moment. This lets you review history, undo mistakes, and collaborate with others.

When you run git init, you create a new Git repository in the current folder. When you run git commit, you save the current state. Before your first commit, you must create a .gitignore file that tells Git which files to never track — primarily node_modules (installed packages, which are massive and regenerable) and .env (your secrets).

Resources:

Monorepo

A monorepo is a single Git repository that contains multiple distinct projects — in this case, a server folder (backend) and a client folder (frontend). The alternative is to maintain two separate repositories.

For a project of this scale, a monorepo is simpler: one place to look at all the code, one Git history, and shared configuration. You do not need a complex tool like Turborepo or Nx. A plain folder structure with two subdirectories is sufficient.

Resources:

Node.js and npm

Node.js is a runtime that lets you execute JavaScript outside of a browser — on a server, in a terminal, wherever. Before Node.js, JavaScript could only run in web browsers. npm (Node Package Manager) ships with Node and lets you install third-party libraries (called packages) and define scripts for running your project.

When you run npm init -y, it creates a package.json file — the manifest of your project. It records which packages your project depends on, which version of Node you are targeting, and the scripts you can invoke with npm run.

Resources: