NC News

2026Full-stack

Reddit-style full-stack application with RESTful API. Test-driven Express backend with PostgreSQL.

A Reddit-style news API built test-first at Northcoders: topics, articles, comments, votes — and a few things the brief didn't ask for.

How it works

  • 98 Jest + Supertest tests, and a Husky pre-commit hook that runs the whole suite — nothing lands on a red build.
  • Layered Express: routes → controllers → services → models, with typed error classes and one centralised error handler mapping them to status codes.
  • Extended past the brief: emoji reactions on articles through a proper join table, and an ascii_animals table because the test data deserved better.
  • The API documents itself: a hand-built static docs site (custom cursors included) is served by the same Express app at /docs, while the JSON lives at /api.
  • Dev and test databases are env-switched and re-seeded per run, so the suite never touches real data.

Status

Backend live on Render with Supabase Postgres; React front end deployed separately on Netlify.

ReactExpressPostgreSQLJest
Live ↗GitHub (fe)GitHub (be) ↗
fullstackrest-apitdd