Prasoon Soni

All writing

Backend 5 projects roadmap: from zero to hero

· 8 min read · Projects, Backend, Roadmap

Tutorials will not teach you backend. Every bug was already fixed before you pressed play. Build these five projects instead — each one adds exactly one concept, in the order that works — and you will have a portfolio, real debugging experience and five things to put on your resume.

5projects
Topic
Backend development · Node.js · project-based learning
For
Anyone who has finished tutorials and wants real backend skills
Edition
November 2026

TL;DR

  • Five projects, each teaching one core backend concept: REST APIs, authentication, background queues, caching and WebSockets.
  • The order matters: each project solves a problem the previous one leaves behind. By the end you have built, secured, sped up and deployed a backend.
  • Tutorials hide bugs because they were already fixed before recording. You learn when your code breaks.
  • PostgreSQL is the most used database among all Stack Overflow 2025 respondents (55.6%). Docker is used by 71.1% of all respondents. Both show up in this roadmap because they are what you will actually see at work.
  • Every tool in this list is free. You can finish the entire path with Node.js, PostgreSQL, Redis, Docker and a free-tier cloud account.
5
projects, each adding one concept
55.6%
PostgreSQL usage among all respondents (Stack Overflow 2025)
71.1%
Docker usage among all respondents (Stack Overflow 2025)
$0
total cost — every tool has a free tier

Why tutorials don't work

A tutorial is a recording of code that already works. The instructor hit every bug before you pressed play, fixed it, re-recorded the take and shipped a clean version. You type along, it runs, and you feel like you learned something.

Then you open a blank file and nothing works. That is because the actual learning happened when the instructor debugged — and you were not there for it.

Following a tutorial

You type what someone else already debugged. The code runs first try. You have not solved any problem your brain will remember.

Building a project

Your code breaks. You read the error, search for it, try a fix, break something else, and eventually make it work. That loop is the learning.

The five projects below are designed so that each one forces you to solve one new kind of problem. No walkthroughs — just a clear goal, the concept to learn and the specific things to implement.

Project 1 · URL shortener

What you'll build

A service that takes a long URL, saves it with a short code, and redirects anyone who visits the short link. Three endpoints, one database table, one real problem: how do you generate a short code that is unique?

What it teaches

  • REST API design: POST to create a resource, GET to read it, proper status codes (201 Created, 301 Redirect, 404 Not Found).
  • Routing: mapping GET /:code to a database lookup and a redirect.
  • PostgreSQL: creating a table, inserting rows, querying by a column, adding a unique constraint. PostgreSQL is the most used database in the Stack Overflow 2025 survey (55.6% of all respondents).

Key things to implement

  1. POST /shorten — accepts a JSON body with the original URL, generates a short code (e.g. nanoid or base62 of a counter), stores both in a urls table and returns the short URL.
  2. GET /:code — looks up the code in the database and returns a 301 redirect to the original URL, or 404 if not found.
  3. GET /:code/stats — returns the click count (increment it on every redirect).
  4. A unique constraint on the code column so two URLs never collide.
server.js (illustrative)
const express = require('express')
const { Pool } = require('pg')

const app = express()
app.use(express.json())

const pool = new Pool({ connectionString: process.env.DATABASE_URL })

app.post('/shorten', async (req, res) => {
  const { url } = req.body
  const code = generateCode()  // e.g. nanoid(7)
  await pool.query(
    'INSERT INTO urls (code, original_url, clicks) VALUES ($1, $2, 0)',
    [code, url]
  )
  res.status(201).json({ short_url: `${req.protocol}://${req.get('host')}/${code}` })
})

app.get('/:code', async (req, res) => {
  const { rows } = await pool.query(
    'SELECT original_url FROM urls WHERE code = $1', [req.params.code]
  )
  if (!rows.length) return res.sendStatus(404)
  await pool.query('UPDATE urls SET clicks = clicks + 1 WHERE code = $1', [req.params.code])
  res.redirect(301, rows[0].original_url)
})

app.listen(3000)

Code on this page is illustrative and kept short. Check the docs for the libraries you use before running it.

Project 2 · Notes app with login

What you'll build

A notes API where users sign up, log in and see only their own notes. The URL shortener had no concept of "who is asking." This project adds it.

What it teaches

  • Password hashing: why you never store a password in plain text and how bcrypt works.
  • JWT (JSON Web Token): a signed token the server issues on login, and the client sends back on every request. The server checks the signature, not a session database.
  • Middleware: an auth check that runs before protected routes.

Key things to implement

  1. POST /signup — hash the password with bcrypt (cost factor 10+), store the user.
  2. POST /login — compare the hash, return a signed JWT with the user's ID.
  3. An auth middleware that reads the Authorization: Bearer <token> header, verifies the JWT and attaches the user ID to the request.
  4. CRUD routes for notes (/notes), all behind the auth middleware, filtered by the logged-in user's ID.
auth middleware (illustrative)
const jwt = require('jsonwebtoken')

function auth(req, res, next) {
  const token = req.headers.authorization?.split(' ')[1]
  if (!token) return res.sendStatus(401)
  try {
    const payload = jwt.verify(token, process.env.JWT_SECRET)
    req.userId = payload.userId
    next()
  } catch {
    res.sendStatus(403)
  }
}

// Protected route
app.get('/notes', auth, async (req, res) => {
  const { rows } = await pool.query(
    'SELECT * FROM notes WHERE user_id = $1 ORDER BY created_at DESC',
    [req.userId]
  )
  res.json(rows)
})

Project 3 · Video processing service

What you'll build

A service where a user uploads a video (or an image to process). The API accepts the upload, puts a job on a queue and returns immediately — the user does not wait ten seconds staring at a spinner. A separate worker picks up the job, processes the file and updates the status.

What it teaches

  • The problem: a request takes ten seconds (video transcode, PDF generation, image resize). What does the user do — wait? A queue decouples "accept the request" from "do the work."
  • Message queues: BullMQ (backed by Redis) or a simple database-backed queue. The API enqueues, the worker dequeues.
  • Job status: pending → processing → done/failed. The client can poll or you can push via a webhook.

Key things to implement

  1. POST /jobs — accept a file upload, save it to disk (or S3), create a job record with status "pending", add it to the queue, return 202 Accepted with the job ID.
  2. A worker process that listens to the queue, processes the file (e.g. generate a thumbnail with ffmpeg or sharp), updates the status to "done" and stores the result path.
  3. GET /jobs/:id — returns the current status and, when done, the result URL.
  4. Retry logic: if the worker crashes, the job goes back on the queue.
queue with BullMQ (illustrative)
const { Queue, Worker } = require('bullmq')

const videoQueue = new Queue('video-processing', {
  connection: { host: 'localhost', port: 6379 }
})

// API: enqueue and respond immediately
app.post('/jobs', upload.single('video'), async (req, res) => {
  const job = await videoQueue.add('transcode', {
    filePath: req.file.path,
    userId: req.userId,
  })
  await pool.query(
    'INSERT INTO jobs (id, status) VALUES ($1, $2)', [job.id, 'pending']
  )
  res.status(202).json({ jobId: job.id, status: 'pending' })
})

// Worker: runs in a separate process
const worker = new Worker('video-processing', async (job) => {
  await pool.query('UPDATE jobs SET status = $1 WHERE id = $2', ['processing', job.id])
  await transcodeVideo(job.data.filePath)  // the slow part
  await pool.query('UPDATE jobs SET status = $1 WHERE id = $2', ['done', job.id])
}, { connection: { host: 'localhost', port: 6379 } })

Project 4 · Same app + Redis caching

What you'll build

Take one of your earlier projects (the URL shortener is a great choice) and add a Redis cache in front of the database. When the same short code is looked up ten times a second, the database should not run the same query ten times.

What it teaches

  • Cache-aside pattern: check the cache first; on a miss, query the database, store the result in the cache and return it.
  • TTL (time-to-live): how long a cached value stays valid before it expires.
  • Cache invalidation: when the data changes (a URL is updated or deleted), the cache must be cleared or updated. This is the hard part.

Key things to implement

  1. Install Redis locally or use a free cloud instance (Upstash, Railway or Redis Cloud free tier).
  2. On GET /:code, check Redis first. On a hit, redirect immediately. On a miss, query PostgreSQL, store the result in Redis with a TTL (e.g. 60 seconds) and then redirect.
  3. On DELETE /:code or an update, delete the Redis key so stale data is never served.
  4. Log cache hits and misses so you can see the difference.
cache-aside pattern (illustrative)
const Redis = require('ioredis')
const redis = new Redis(process.env.REDIS_URL)

app.get('/:code', async (req, res) => {
  const { code } = req.params

  // 1. Check the cache
  const cached = await redis.get(`url:${code}`)
  if (cached) {
    console.log('cache hit')
    return res.redirect(301, cached)
  }

  // 2. Cache miss — query the database
  const { rows } = await pool.query(
    'SELECT original_url FROM urls WHERE code = $1', [code]
  )
  if (!rows.length) return res.sendStatus(404)

  // 3. Store in cache with a 60-second TTL
  await redis.set(`url:${code}`, rows[0].original_url, 'EX', 60)
  console.log('cache miss — stored')

  res.redirect(301, rows[0].original_url)
})

Project 5 · Real-time chat app

What you'll build

A chat application where messages appear instantly without refreshing the page. Then put the whole thing in a Docker container and deploy it so other people can actually use it. This project answers the question: "It works on my laptop — how do others use it?"

What it teaches

  • WebSockets: a persistent connection where the server pushes data to the client the moment it arrives, instead of the client polling.
  • Docker: package your app, its dependencies and its database into containers that run the same everywhere. Docker is used by 71.1% of all Stack Overflow 2025 respondents.
  • Cloud deployment: push a container to a cloud platform (Railway, Render, Fly.io — all have free tiers) and get a public URL.

Key things to implement

  1. A WebSocket server with Socket.IO: on connection, join a room; on message, broadcast to the room; on disconnect, clean up.
  2. Persist messages in PostgreSQL so a user who joins late sees the history.
  3. A Dockerfile and docker-compose.yml that start the app, PostgreSQL and Redis together with one command.
  4. Deploy to a free-tier cloud and share the link.
WebSocket server with Socket.IO (illustrative)
const { Server } = require('socket.io')
const io = new Server(httpServer, { cors: { origin: '*' } })

io.on('connection', (socket) => {
  console.log('user connected:', socket.id)

  socket.on('join', (room) => {
    socket.join(room)
    socket.to(room).emit('system', `A user joined ${room}`)
  })

  socket.on('message', async ({ room, text, user }) => {
    // Save to database
    await pool.query(
      'INSERT INTO messages (room, username, text) VALUES ($1, $2, $3)',
      [room, user, text]
    )
    // Broadcast to everyone in the room
    io.to(room).emit('message', { user, text, time: new Date() })
  })

  socket.on('disconnect', () => console.log('user left:', socket.id))
})
Dockerfile (illustrative)
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
docker-compose.yml (illustrative)
services:
  app:
    build: .
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgres://user:pass@db:5432/chat
      REDIS_URL: redis://redis:6379
    depends_on: [db, redis]
  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: chat
  redis:
    image: redis:7-alpine

The order matters

Each project solves a problem the previous one leaves behind. Skip one and the next project will not make sense.

ProjectWhat it gives youThe problem it leaves
P1 · URL shortenerA working API that stores and retrieves dataAnyone can use it — there is no login
P2 · Notes with loginUsers and protected routesSlow requests block the whole server
P3 · Video queueLong work runs in the backgroundPopular endpoints hammer the database
P4 · Redis cacheFast reads, fewer database queriesIt only works on your laptop
P5 · Chat + deployReal-time communication and a live URL anyone can visitNow keep building

What each project adds to your resume

A project on your resume is only as good as the one-line description next to it. Here is what each project lets you write — concrete, specific, the kind of line a reviewer reads and thinks "this person built something real."

ProjectResume line
URL shortenerBuilt a REST API with Express and PostgreSQL — short-link generation, redirect and click tracking.
Notes appImplemented JWT-based auth with bcrypt hashing and protected CRUD routes.
Video processorDecoupled file processing from the API using BullMQ (Redis-backed queue) with automatic retries.
Redis cacheAdded cache-aside layer with Redis and TTL-based expiry, reducing database queries on hot paths.
Chat appBuilt a real-time chat server with Socket.IO and WebSockets, containerised with Docker and deployed to the cloud.

These are examples. Rewrite them in your own words and add numbers where you can (response time before and after caching, for example).

Free tools and resources

ProjectTool / ResourceWhat for
P1Node.js + ExpressAPI framework
P1PostgreSQLDatabase
P1Neon or SupabaseFree hosted Postgres
P2bcrypt / bcryptjsPassword hashing
P2jsonwebtokenJWT signing and verification
P3BullMQRedis-backed job queue
P3ffmpegVideo/image processing CLI
P4RedisIn-memory data store / cache
P4UpstashFree serverless Redis
P5Socket.IOWebSocket library
P5DockerContainerisation
P5Railway / Render / Fly.ioFree-tier cloud deploy

All tools listed are free to use or have a free tier at the time of writing. Some platforms also have paid plans.

Try it yourself — start with P1 today

You do not need to plan all five projects before you start. Open a terminal and begin the URL shortener right now.

  1. 1

    Set up the project

    Run mkdir url-shortener && cd url-shortener && npm init -y. Install Express and the PostgreSQL client: npm install express pg.

  2. 2

    Start a database

    Install PostgreSQL locally, or sign up for a free database on Neon or Supabase. Create a urls table with columns id, code (unique), original_url and clicks.

  3. 3

    Write the three endpoints

    POST /shorten, GET /:code and GET /:code/stats. Start the server and test with curl or Postman.

  4. 4

    Break it, then fix it

    What happens when the code already exists? When the URL is invalid? When the database is down? Find the bugs yourself — that is the point.

  5. 5

    Push it to GitHub

    Write a README with setup instructions. Your first backend project is done. Move on to P2.

Caveats

  • This is a recommended project sequence, not a course. There is no certificate and no instructor. The learning comes from building and debugging on your own.
  • The examples use Node.js and Express, but the concepts (REST, auth, queues, caching, WebSockets, Docker) apply to any language and framework.
  • PostgreSQL 55.6% and Docker 71.1% are "all respondents" figures from the Stack Overflow Developer Survey 2025. They include professional developers, students and hobbyists.
  • Code on this page is illustrative and kept short. It omits error handling, input validation and security hardening. Check the official docs before running it.
  • The free tiers of cloud platforms have limits (RAM, hours, bandwidth). They are enough for a portfolio project, not for production traffic.

FAQ

How long does each project take?
It depends on your starting point. If you can write basic JavaScript, expect one to two weeks per project working a couple of hours a day. The first project takes the longest because you are setting up everything from scratch.
What if I get stuck?
Read the error message — all of it. Search for the exact error text. Check the library's documentation and GitHub issues. Ask in a community (Stack Overflow, Discord servers for Node.js or the framework you use). Getting stuck and unstuck is the skill you are building.
Can I use MySQL instead of PostgreSQL?
Yes. The concepts (tables, queries, constraints) are the same. PostgreSQL is recommended because it is the most widely used database in recent surveys and because pgvector (for embeddings) is a useful add-on later.
Can I use Python / Go / Java instead of Node.js?
Yes. Replace Express with FastAPI (Python), Gin (Go) or Spring Boot (Java). The five concepts do not change.
Do I need all five projects?
The first three give you the basics: API design, auth and async work. Projects four and five (caching and deployment) are what separate a project from a product. Build all five if you want a strong portfolio.
Should I build a frontend too?
Optional. A simple HTML page or Postman collection is enough to show the API works. If you want to practise full-stack, add a React or plain HTML frontend for the chat app (P5).
Can I put these on my resume if I followed a tutorial for parts of them?
If you wrote the code, debugged it and can explain every line in an interview, yes. If you copy-pasted and cannot explain it, an interviewer will know in two minutes.

Glossary

REST API
An API that uses HTTP methods (GET, POST, PUT, DELETE) and URLs to represent resources and actions.
PostgreSQL
An open-source relational database. Tables, rows, SQL queries, constraints.
JWT (JSON Web Token)
A signed token the server issues on login. The client sends it with every request to prove who it is.
Bcrypt
A password-hashing algorithm. Slow on purpose, so that brute-forcing a stolen hash takes impractically long.
Message queue
A system where one process adds jobs and another picks them up. Decouples the sender from the worker.
Redis
An in-memory data store, used here as a cache and as the backing store for BullMQ job queues.
Cache-aside
A caching pattern: check the cache first, on a miss query the database and store the result in the cache.
TTL (time-to-live)
How long a cached value remains valid before it is automatically deleted.
WebSocket
A persistent, two-way connection between a client and server. The server can push data the moment it arrives, with no polling.
Docker container
A lightweight, isolated package of your app and its dependencies that runs the same on any machine.
docker-compose
A tool that defines and runs multiple Docker containers (app, database, cache) together with one command.

Sources