NewDayKnowledge

How this AI news platform was built, and how it works

Tech Stack

For each item: what it is, why it is here, what it costs, and what the real alternatives were.

Next.js

What it is: a framework built on top of React that handles both the pages you see in the browser and small backend API endpoints, in one project.

Why here: the dashboard needed both a UI and a backend, and Next.js is the option that Vercel, its creator, hosts with zero configuration. Using a separate frontend and backend, such as React plus a standalone Express server, would have meant two deployments to manage instead of one.

Alternatives: Remix, SvelteKit, or a plain React app with a separate backend such as Express or Fastify. All are reasonable; Next.js was chosen mainly because of how seamlessly it deploys to Vercel.

Cost: free, open source. Where used: everything under app/.

TypeScript

What it is: JavaScript with an added type system, checked before the code ever runs.

Why here: this project has real money and real public posting on the line: API costs, and actually posting to social accounts. Catching a mistake like passing a number where a string was expected at write-time, instead of after it silently breaks a real feature, matters more here than in a throwaway script.

Alternatives: plain JavaScript, which is faster to write but makes certain classes of mistakes easier; or a stricter language entirely, like Rust or Go, which would add much more setup and ceremony for a project this size.

Cost: free.

Tailwind CSS + shadcn/ui

What they are: Tailwind lets you style elements with small utility classes directly in your markup instead of writing separate CSS files. shadcn/ui is a set of pre-built, accessible components built on top of Tailwind that you copy into your own project rather than install as a black-box package, so you can freely edit them.

Why here: building a usable-looking admin dashboard from scratch, including buttons, forms, tables, and dialogs, is repetitive, easy-to-get-wrong work. Using pre-built, accessible components let effort go into the actual features instead.

Alternatives: Material UI and Chakra UI are both fine, but more opinionated about visual style. Plain hand-written CSS gives full control but is much slower.

Cost: free.

Prisma

What it is: a library that lets you describe your database tables once, in one schema file, and then write normal JavaScript/TypeScript function calls instead of raw SQL to read and write data. It also generates and runs the SQL needed to change your database's structure when you update that schema file.

Why here: with two separate programs, the local agent and the dashboard, both needing to talk to the same database in the same way, having one shared, typed definition of what the data looks like prevents the two programs from silently disagreeing about the data's shape.

Alternatives: Drizzle ORM, writing raw SQL directly, or Knex.js. Drizzle is lighter weight and growing in popularity. Raw SQL gives maximum control but no protection against typos or shape mismatches. Knex.js is a lower-level query builder.

Cost: free, open source. Prisma also sells a paid hosted layer called Accelerate for connection pooling and caching, not used here.

Neon

What it is: managed Postgres, meaning someone else runs and maintains the database server.

Why here: Vercel's servers need to reach the database over the internet, and your Mac cannot act as a public-facing database server safely or reliably. Neon's free tier was enough for this project's scale.

Alternatives: Supabase, Railway, Render, or running your own Postgres server on a cloud VM. Supabase is also free-tier Postgres and adds extra features like built-in auth and file storage that are not needed here. Running a cloud VM would mean much more setup and maintenance with no clear benefit at this scale.

Cost: free at this project's scale. Neon's free tier includes autosuspend after inactivity, which affected the agent and is covered in the architecture page.

NextAuth / Auth.js

What it is: a library that handles the mechanics of logging in and staying logged in, including sessions, cookies, and password checking.

Why here: the dashboard needed to be private. Only you should see article drafts and be able to publish from your accounts. Authentication is one of the areas where writing it yourself is genuinely risky. A single hard-coded admin email plus a bcrypt-hashed password, checked via NextAuth's Credentials provider, was enough for a single-user tool.

Alternatives: Clerk or Auth0, which are hosted and paid above a free tier, or rolling your own session and cookie logic, which is not recommended even for small projects.

Cost: free, open source.

bcryptjs

What it is: a library that turns a plain password into a scrambled, one-way string, a hash, that can be checked against later without ever storing the real password anywhere.

Why here: NextAuth's Credentials provider needs something to check the entered password against, and storing a plain password in an environment variable would mean anyone who ever saw that value would have your actual login password.

Cost: free.

Ollama

What it is: a program that downloads and runs open-source AI language models directly on your own computer, with no internet connection or API key required to use them.

Why here: you wanted the news agent's AI features, classifying articles and writing social posts, to be free since a cloud AI API charges per request. Ollama makes that possible by running the model locally.

Alternatives: OpenAI's API, Anthropic's API, or other cloud providers, which all cost money per request but require no local compute and are usually higher quality per request; or LM Studio, a similar local-model runner with a graphical interface instead of a command line.

Cost: free, but uses your Mac's CPU and memory while running, and only works while your Mac is on.

OpenAI API

What it is: a paid cloud API for the same kind of classification and text-generation tasks Ollama does locally.

Why here: it is built as a drop-in alternative, with the same code interface as the Ollama provider, so you are not locked into local-only AI forever. It is currently implemented but not yet tested against a real account.

Alternatives: continuing with Ollama locally, Anthropic's API, or other cloud model providers.

Cost: pay-per-use based on how much text is sent and generated. Cheap relative to the value for occasional use, but it adds up at high volume.

rss-parser

What it is: a small library that turns a website's RSS feed, an XML file listing recent articles, into a normal JavaScript array of objects.

Why here: RSS is the actual mechanism news sites use to publish machine-readable lists of their latest articles, and parsing XML by hand is tedious and error-prone. This library handles messy edge cases like slightly malformed feeds and differently shaped fields across sites.

Cost: free, open source.

tsx

What it is: a tool that lets you run a .ts file directly with a single command, such as npx tsx somefile.ts, instead of first compiling it to plain JavaScript yourself.

Why here: the local news agent is a standalone script, not part of the Next.js build, so it needed its own simple way to run. tsx was the lightest-weight option for that.

A real gotcha: tsx does not automatically load a .env file the way Next.js does. This caused a real bug where a script could not see environment variables that were clearly present in .env.

Cost: free.

Docker

What it is: a way to run software, in this case Postgres, in an isolated, self-contained environment without installing it directly onto your Mac.

Why here: it was used early in development to run a local Postgres database for fast testing without needing an internet connection or a Neon account. Once real deployment was needed, the project switched to Neon for the actual shared database, since Docker Postgres running on your Mac is not reachable from Vercel.

Alternative: install Postgres directly or use a managed host from the start. The docker-compose.yml file is still in the repo and still works for local-only testing.

Cost: free.

oauth-1.0a

What it is: a small library that implements OAuth 1.0a, an older but still widely used authentication scheme that requires cryptographically signing each request rather than just attaching a token.

Why here: X's API for posting still requires OAuth 1.0a signing, using HMAC-SHA1, and implementing that signing algorithm correctly by hand is easy to get subtly wrong. Using a small, well-tested library for just this one piece was safer than reimplementing cryptographic signing from scratch.

Cost: free, open source.

vercel and gh CLIs

What they are: command-line tools for deploying to Vercel and managing GitHub from the terminal, instead of only through their websites.

Why here: they let this whole project be driven from scripted commands, what Claude used throughout this build, instead of requiring manual clicking through web dashboards for every deploy or repo change.

Cost: free, though Vercel and GitHub may have their own separate service costs or limits.

Playwright

What it is: a tool that drives a real, actual web browser (the same way a person would) to click buttons, fill forms, and read what appears on screen, so tests check the app the way a real user experiences it.

Why here: this project's own API-level tests had a real blind spot, they always reused an already-valid login session, so they never once tested what happens to someone who is not yet logged in. A real, literal browser test caught a genuine production bug that months of API testing had missed.

A real gotcha worth knowing: every test in this project is deliberately read-only from the app's perspective, it loads pages and switches tabs, but never clicks Approve, Reject, or Publish, since this project shares one real database between local development and production.

Cost: free, open source.

GitHub Actions

What it is: a service, built into GitHub, that automatically runs commands, like a test suite, every time code is pushed, on GitHub's own temporary computers rather than your own.

Why here: so the Playwright test suite runs on every push automatically, catching a regression before it reaches production. The workflow uses its own separate, empty Postgres database, created fresh for every run, so automated testing never touches the real Neon database or its real data.

Cost: free for public repositories and for a generous monthly amount of usage on private ones.

Framer Motion

What it is: a library for adding smooth, physics-based animations to a React app, things like fading in, sliding, or a subtle press-down effect on a button click.

Why here: to make routine actions feel deliberate and polished rather than instant and jarring, without needing to hand-write animation timing code.

Cost: free, open source.

Zernio

What it is: a service that already holds LinkedIn's own approval to post to Company Pages on other people's behalf, and exposes that ability through its own, much simpler API.

Why here: LinkedIn's own approval process for Company Page posting turned out to have a hard rule this project's existing developer app could not satisfy. Rather than wait an unknown amount of time on a second application, Zernio provides the same real result today, for free, since this project only needs one connected account and Zernio's first two connected accounts are free with no card required.

Cost: free at this project's scale, one connected account.

A note on iterating with an AI coding agent

No new tool was added in Milestones 14 or 15; those changes were mostly configuration, layout, and design work. The palette itself went through several real rounds of feedback and correction: first black/white/grey, then navy/blue-grey, and finally this softer pastel version using Medium's real green accent.

That back-and-forth is a normal part of working with an AI coding agent. The builder can edit code quickly, but it cannot see the rendered result the way a human reviewer can. The fix is always the same: describe the problem concretely, verify the fix independently instead of only trusting the builder's report, and keep iterating until the actual screen matches the intended result.