A modern blog application built with Next.js, featuring server-side rendering, static site generation, and a clean, responsive design.
- Server-side rendered blog posts
- Static site generation with ISR (Incremental Static Regeneration)
- Responsive grid layout for posts
- Light/dark theme toggle
- Reading time estimation
- Next.js - Server-side rendering
- TypeScript - Type safety
- SCSS modules - Component-scoped styling
json-server- Mock API backend- Jotai - State management
- ESLint - Code linting
- Prettier - Code formatting
- Node.js v23.x
- Yarn v1.x
-
Install dependencies:
yarn
-
Run mock API server:
yarn server
-
Run development server:
yarn dev
After running the scripts above, the application is available at http://localhost:3000.
components- React componentspages- Next.js pagesstyles- SCSS modules, variables, and global stylestypes- TypeScript type definitionsutils- Helper functions and utilities
db.json- The data served by the mock API withjson-serverstore.ts- Jotai store configuration
API_URL- The base URL for the API endpoint serving the blog postsREVALIDATE_TIME- The time interval (in seconds) for Next.js to revalidate static pages using ISR (Incremental Static Regeneration)
Important
Make sure to run server before running dev, build, or start.
server- Run mock APIdev- Run development serverbuild- Build for productionstart- Run production serverlint- Lint code with ESLintformatting:check- Check code formatting with Prettierformatting:apply- Format code with Prettier
Design based on: The Blog - A Web Personal Blog