NewDayKnowledge

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

Glossary

API (Application Programming Interface)
A defined way for two pieces of software to talk to each other. When this project's dashboard fetches articles, it is calling an API. When the agent posts to X, it is calling X's API.
API route
In Next.js, a backend endpoint, a small piece of server code, that lives at a specific URL like /api/articles and returns data instead of a visible page.
Cron job
A scheduled task that runs automatically at set times. launchd is macOS's version of this. Vercel Cron is the cloud equivalent.
Endpoint
A specific URL that an API responds to.
Environment variable
A named value, like a database password or API key, that lives outside your code, usually in a .env file locally or in your hosting provider's settings when deployed, so secrets are never hard-coded into files that get shared or committed to git.
Hash (as in password hash)
A one-way scrambled version of a value. You can check whether a guess matches the original, but you cannot reverse a hash back into the original value. Used so a password's real value is never stored anywhere, even by the app itself.
Migration
A recorded, repeatable set of changes to a database's structure, like adding a new column to a table, so the change can be applied consistently to every copy of the database: your local one, a teammate's, and the production one.
OAuth
A standard way for one app to be granted permission to act on your behalf on another service, like posting to your LinkedIn, without ever seeing your actual password for that service.
ORM (Object-Relational Mapper)
A tool, like Prisma, that lets you interact with a database using your programming language's normal objects and function calls instead of writing raw SQL by hand.
Postgres (PostgreSQL)
A specific, widely used, open-source database system. This project's data, including articles, generated posts, and settings, all live in a Postgres database.
Prisma Client
The code Prisma automatically generates, based on your schema file, that your application actually imports and calls to read and write data.
Prisma schema
The one file, prisma/schema.prisma, that defines every table and column in your database, in one place, shared by every part of the app.
Serverless function
A small piece of backend code that only runs when called, and is not a permanently-running server. Vercel hosts this project's API routes this way. This is why Vercel cannot run something like Ollama, which needs to stay loaded in memory continuously.
Session
The mechanism that keeps you logged in across multiple page loads, usually via a small signed piece of data stored in your browser's cookies.
TypeScript
JavaScript with an added system for declaring what type of value something is expected to be, such as a number, a piece of text, or a specific shaped object, checked before the code runs to catch a category of mistakes earlier.
URN (Uniform Resource Name)
A way of identifying something in the LinkedIn API ecosystem, formatted like urn:li:person:XXXXX, similar in spirit to a web URL but used to name an entity inside their system rather than a page to visit.