A modern, responsive blog and writing portfolio website built with Next.js, featuring dynamic content management through Hygraph CMS.
- Modern Stack: Built with Next.js 16 (App Router), React 19, and TypeScript
- Headless CMS: Content managed through Hygraph (GraphQL)
- Beautiful UI: Styled with Tailwind CSS 4
- Smooth Animations: Powered by Framer Motion
- Responsive Design: Mobile-first approach with optimized layouts
- Blog System: Full-featured blog with search, filtering, and pagination
- SEO Optimized: Server-side rendering and optimized metadata
- Theme Support: Dark/light theme toggle functionality
- Node.js 18+ or Bun
- A Hygraph project with configured schema
- Clone the repository:
git clone <repository-url>
cd saanj-writes- Install dependencies:
bun install
# or
npm install- Set up environment variables:
Create a
.env.localfile in the root directory:
NEXT_PUBLIC_HYGRAPH_ENDPOINT=your_hygraph_endpoint_url
HYGRAPH_TOKEN=your_hygraph_token
SITE_CONFIG_HYGRAPH_ID=your_site_config_id- Run the development server:
bun dev
# or
npm run dev- Open http://localhost:3000 in your browser.
saanj-writes/
├── app/ # Next.js App Router pages
│ └── (site)/ # Site routes
│ ├── blogs/ # Blog listing and detail pages
│ ├── layout.tsx # Site layout
│ └── page.tsx # Home page
├── components/ # React components
│ ├── blog/ # Blog-related components
│ ├── layout/ # Layout components (Navbar, Footer, etc.)
│ ├── sections/ # Page sections (Hero, About, etc.)
│ └── ui/ # Reusable UI components
├── hooks/ # Custom React hooks
├── lib/ # Utilities and configurations
│ ├── hygraph/ # Hygraph CMS integration
│ ├── constants.ts # App constants
│ └── utils.ts # Helper functions
└── public/ # Static assets
- Framework: Next.js 16
- Language: TypeScript
- Styling: Tailwind CSS 4
- CMS: Hygraph
- Animations: Framer Motion
- Icons: Lucide React
- Package Manager: Bun
bun dev- Start development serverbun build- Build for productionbun start- Start production serverbun lint- Run ESLint
This project requires a Hygraph project with the following content models:
- Site Configuration
- Blog Posts
- Author Information
Refer to the GraphQL queries in lib/hygraph/queries.ts for the expected schema structure.
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_HYGRAPH_ENDPOINT |
Your Hygraph GraphQL endpoint URL | Yes |
HYGRAPH_TOKEN |
Hygraph API token (for authenticated requests) | Optional |
SITE_CONFIG_HYGRAPH_ID |
The ID of your Site Configuration entry in Hygraph | Yes |
This project is private and proprietary.
This is a personal project. Contributions are welcome but please open an issue first to discuss any changes.
Built with ❤️ using Next.js and Hygraph