Italian-language Next.js site about AI-assisted software development, with MDX articles, companion presentations, and a small admin area for publication management.
Overview • Features • Getting Started • Configuration • Content Authoring
AI Talks is a content-driven App Router project built to publish articles about developer workflows, architecture, prompting, refactoring, and practical use of AI in software engineering.
The site reads articles from content/articles/*.mdx, renders them server-side, and can optionally attach a dedicated slide deck under each article route. Runtime publication state can come from either MDX frontmatter or Upstash Redis, so the public site and the admin area stay aligned.
Note
In development, draft articles are visible and show a draft badge. In production, visibility depends on the effective published state, with Redis overrides taking precedence when configured.
- MDX-based article publishing with typed frontmatter.
- Next.js 16 App Router with server-rendered content pages.
- Optional article presentations under
src/app/articles/[slug]/presentazione/. - Admin area with GitHub sign-in via
better-auth. - Runtime
publishedandfeaturedoverrides through Upstash Redis. - Tailwind CSS v4 styling with custom typography and shadcn/ui components.
- Narration support for presentations via generated
speech.jsonfiles.
The project is intentionally simple:
content/articles/: source of truth for article bodies and default frontmatter.src/lib/articles.ts: MDX loading, sorting, filtering, draft visibility, static params.src/lib/kv.ts: optional Redis-backed override layer forpublished,featured, and admin lists.src/app/articles/[slug]/: article pages and optional presentation routes.src/app/admin/: content management UI.src/components/presentation/: shared presentation shell, controls, and narration UI.
- Node.js 20+
pnpm
pnpm installpnpm devOpen http://localhost:3000.
pnpm lint
pnpm build
pnpm startImportant
No automated test runner is configured in this repository at the moment.
The site can run locally with only article content, but admin login and runtime state management require environment variables.
Required for GitHub admin sign-in:
| Variable | Purpose |
|---|---|
BETTER_AUTH_SECRET |
Secret used by better-auth |
BETTER_AUTH_URL |
Base URL for auth callbacks, defaults to http://localhost:3000 |
GITHUB_CLIENT_ID |
GitHub OAuth app client ID |
GITHUB_CLIENT_SECRET |
GitHub OAuth app client secret |
Optional for Redis-backed publication and featured overrides:
| Variable | Purpose |
|---|---|
KV_REST_API_URL |
Upstash Redis REST endpoint |
KV_REST_API_TOKEN |
Upstash Redis REST token |
If Redis is not configured, the app falls back to MDX frontmatter for article visibility and featured state.
| Variable | Purpose |
|---|---|
ADMIN_EMAILS |
Comma-separated list of admin emails allowed by environment configuration |
Admin authorization order is:
- Denied emails in Redis always win.
ADMIN_EMAILSgrants access if the email is not denied.- Redis admin allow-list is checked last.
Articles live in content/articles/ as .mdx files. The file name is the route slug.
Example frontmatter:
title: ""
description: ""
date: "2026-03-30T16:30:00+02:00"
author: ""
tags: []
published: false
featured: false
coverImage: "optional-slug"Authoring rules worth keeping in mind:
- Use an ISO datetime with explicit offset.
- Keep the filename slug aligned with the article route.
published: falseis the safe default for drafts.- Do not assume frontmatter is the only production source of truth for
publishedorfeatured.
An article can have a companion presentation under:
src/app/articles/[slug]/presentazione/
Typical files in that folder:
page.tsxslides.tsxslide-XX-*.tsxspeech.json
To draft narration JSON for an existing presentation:
pnpm exec tsx scripts/generate-speech-json.ts <slug>The shared presentation UI and narration controls live in src/components/presentation/.
content/articles/ MDX articles
public/images/articles/ Article images and diagrams
scripts/ Utility scripts
src/app/ App Router routes and layouts
src/app/admin/ Admin interface
src/components/ Shared UI, MDX, layout, and presentation components
src/lib/articles.ts Article loading and visibility rules
src/lib/kv.ts Redis-backed runtime state
src/lib/auth.ts better-auth configuration
src/lib/actions/ Server actions
- Use
pnpmfor package and project commands. - Tailwind CSS v4 configuration lives in
src/app/globals.cssvia@themeblocks. - MDX is compiled server-side with
next-mdx-remote/rsc. - Components are server components by default; add
"use client"only when needed. - For internal mutations, prefer server actions in
src/lib/actions/over adding new API routes.
AGENTS.md: repository-specific guidance for coding agents.CLAUDE.md: agent bootstrap reference.components.json: shadcn/ui configuration.