A modern full-stack blog application built with React, TypeScript, and Vite. Features markdown-based posts with YAML front matter, automatic RSS feed generation, paginated post listing, and comprehensive testing with Playwright and Vitest.
- Markdown Blog Posts — Write posts in Markdown with YAML front matter (title, date)
- RSS Feed Generation — Automatically generates
rss.xmlfrom all posts - Paginated Listing — Home page displays 10 most recent posts per page
- Individual Post Pages — Clean rendering of each markdown post with syntax highlighting
- Component Testing — Playwright component tests for UI reliability
- Fast Development — Vite with SWC for instant HMR and fast builds
- Type Safe — Full TypeScript support for confidence in refactoring
- Code Quality — oxlint and oxfmt for linting and formatting
├── src/ # React application source
│ ├── pages/ # Page components (Home)
│ ├── routes/ # Route components (Post page, health check)
│ ├── components/ # Reusable React components
│ ├── utils/ # Utilities (front matter parsing, post loading)
│ ├── main.tsx # React entry point
│ └── global.css # Global styles
├── posts/ # Blog post markdown files
│ └── YYYY-MM-DD-*.md # Named by date; includes YAML front matter
├── posts-test/ # Test fixtures for post parsing
├── scripts/
│ └── generate-rss.ts # Reads posts and generates RSS feed
├── public/
│ ├── rss.xml # Generated RSS feed
│ └── images/ # Static images
├── playwright/ # Component test setup
├── vite.config.ts # Vite build configuration
├── playwright-ct.config.ts # Playwright component test configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies and scripts
- Frontend: React 19, React Router 7, TypeScript 5.9
- Build: Vite with SWC (Fast Refresh)
- Markdown Processing: remark, remark-html, remark-frontmatter, remark-extract-frontmatter
- RSS Generation: feed package
- Testing: Playwright (component & E2E), Vitest
- Code Quality: oxlint, oxfmt
- Package Manager: pnpm
- Node.js 22+
- pnpm 10+
pnpm installpnpm run devThis runs the Vite dev server with HMR at http://localhost:5173.
The dev script automatically runs prebuild before starting, which generates the RSS feed.
To create a new post:
- Create a markdown file in
posts/namedYYYY-MM-DD-slug.md - Add YAML front matter at the top:
--- title: Your Post Title date: 2025-01-28 ---
- Write your markdown content
Posts are automatically:
- Indexed on the home page (paginated, 10 per page)
- Included in the generated RSS feed
- Accessible at
/posts/YYYY-MM-DD-slug
Run pnpm run prebuild after adding posts to regenerate the RSS feed.
pnpm run dev— Start development server with HMRpnpm run build— Build for production (TypeScript check + Vite build)pnpm run prebuild— Generate RSS feed from postspnpm run preview— Preview production build locallypnpm run lint— Run oxlintpnpm run fmt— Auto-format with oxfmtpnpm run test— Run unit tests with Vitestpnpm run test:ct— Run component tests with Playwrightpnpm run test:e2e— Run E2E tests with Playwright
Located in src/**/*.ct.spec.tsx. Run with:
pnpm run test:ctLocated in src/**/*.spec.ts(x). Run with:
pnpm run test