A modern, performant personal website built with Next.js and Notion as a headless CMS
π Live Demo | π Documentation
- Bartosz Jarocki - Personal Website
β¨ Core Features
- π Blazing Fast - Built with Next.js 14 and optimized for performance
- π Notion CMS Integration - Seamless content management through Notion
- π Dark/Light Mode - Automatic theme switching with system preference detection
- π± Fully Responsive - Mobile-first design that works on all devices
- π SEO Optimized - Built-in SEO with NextSEO and automatic sitemap generation
π¨ Design & UX
- β‘ Lightning-fast Loading - Static generation with Incremental Static Regeneration
- πΌοΈ Dynamic OG Images - Auto-generated Open Graph images for social sharing
- π·οΈ Smart Tagging System - Organize and filter content with tags
- π Analytics Ready - Vercel Analytics integration
- π― Accessibility First - WCAG compliant design
π οΈ Developer Experience
- π§ TypeScript - Full type safety throughout the application
- π¨ Tailwind CSS - Utility-first styling with custom design system
- π¦ Modern Tooling - ESLint, Prettier, and automated workflows
- π Hot Reload - Instant feedback during development
- π Performance Monitoring - Built-in performance tracking
This project leverages modern web technologies for optimal performance and developer experience:
Technology | Purpose | Why This Choice |
---|---|---|
Next.js 14 | React Framework | App Router, SSG/ISR, built-in optimizations |
TypeScript | Type Safety | Enhanced DX, fewer runtime errors |
Notion API | Headless CMS | Non-technical content management |
Tailwind CSS | Styling | Rapid development, consistent design |
Next Themes | Theme Management | Seamless dark/light mode switching |
Vercel OG | OG Images | Dynamic social media previews |
NextSEO | SEO Optimization | Better search engine visibility |
Framer Motion | Animations | Smooth, performant animations |
- Node.js 18+ and yarn
- A Notion account and workspace
- Git
-
Clone the repository
git clone https://github.com/BartoszJarocki/web-jarocki-me.git cd web-jarocki-me
-
Install dependencies
yarn install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your values
-
Configure your Notion database (see Notion setup)
-
Start development server
yarn dev
-
Open http://localhost:3000 in your browser
Create a .env.local
file in the root directory with the following variables:
# Required: Base URL for canonical links and OG images
NEXT_PUBLIC_URL=https://yourdomain.com
# Required: Notion API integration token
NOTION_TOKEN=your_notion_integration_token
# Required: Your Notion database ID
NOTION_DATABASE_ID=your_database_id
-
Create a Notion Integration
- Go to Notion Developers
- Create a new integration and copy the token
-
Get Database ID
- Open your Notion database
- Copy the ID from the URL:
notion.so/username/DATABASE_ID?v=...
-
Connect Integration to Database
- In your Notion database, click "..." β "Connections" β Add your integration
Your Notion database must include these properties for the application to work correctly:
Property | Type | Required | Description |
---|---|---|---|
title |
Title | β | Post title (primary property) |
slug |
Rich Text | β | URL slug (e.g., "hello-world") |
description |
Rich Text | β | Post excerpt/description |
published |
Checkbox | β | Whether post is published |
publishedAt |
Date | β | Publication date |
hashtags |
Multi-select | β | Post tags/categories |
inProgress |
Checkbox | β | Shows "Work in Progress" badge |
cover |
Files & Media | β | Post cover image |
Here's how your Notion database should look:
Need help? Check out our detailed Notion setup guide.
# Development
yarn dev # Start development server
yarn build # Build for production
yarn start # Start production server
# Code Quality
yarn lint # Run ESLint
yarn typecheck # Run TypeScript checks
yarn format # Format code with Prettier
# Utilities
yarn postbuild # Generate sitemap (runs after build)
src/
βββ components/ # Reusable React components
β βββ icons/ # SVG icon components
β βββ notes/ # Blog/notes specific components
β βββ notion/ # Notion integration components
βββ data/ # Static data and content
βββ images/ # Static images (logos, travel photos)
βββ lib/ # Utility functions and API clients
βββ pages/ # Next.js pages (file-based routing)
β βββ api/ # API routes (OG images, RSS)
β βββ notes/ # Blog post pages
β βββ tags/ # Tag filtering pages
βββ styles/ # Global styles and Prism themes
- Click the deploy button above
- Configure environment variables in Vercel dashboard
- Your site will be automatically deployed on every push to main
This is a standard Next.js application and can be deployed to:
- Netlify - Add build command:
yarn build && yarn export
- Railway - Auto-deploys from Git with zero config
- DigitalOcean App Platform - Full-stack hosting
- AWS Amplify - Serverless hosting with CI/CD
The application automatically generates Open Graph images for social media sharing using Vercel's Edge Functions.
Edit src/pages/api/og.tsx
to customize:
- Font styles and sizes
- Color schemes
- Layout and positioning
- Dynamic elements
We welcome contributions! Here's how you can help:
- π Bug Reports - Found an issue? Open a bug report
- π‘ Feature Requests - Have an idea? Suggest a feature
- π§ Code Contributions - Submit a pull request
- π Documentation - Improve docs and guides
- π¨ Design - UI/UX improvements
-
Fork the repository
-
Create a feature branch
git checkout -b feature/amazing-feature
-
Make your changes
# Make sure tests pass and code is formatted yarn lint yarn typecheck yarn format
-
Commit your changes
git commit -m 'Add amazing feature'
-
Push to your fork
git push origin feature/amazing-feature
-
Create a Pull Request
- TypeScript - All new code should be typed
- ESLint/Prettier - Code must pass linting and formatting
- Components - Follow existing patterns and naming conventions
- Commits - Use conventional commit messages
Build Errors
# Clear Next.js cache
rm -rf .next
yarn build
# Clear all caches
rm -rf .next node_modules yarn.lock
yarn install
Notion API Issues
- Verify your
NOTION_TOKEN
is correct - Ensure the integration has access to your database
- Check that all required database properties exist
Environment Variables
- Ensure
.env.local
exists and contains all required variables - Restart your development server after changing env vars
- Check that
NEXT_PUBLIC_URL
matches your deployment URL
TypeScript Errors
# Check for type errors
yarn typecheck
# Regenerate TypeScript cache
rm -rf .next/types
yarn dev
- Slow builds? Check if you have too many images in
/public
- Slow loading? Verify your Notion database isn't too large
- Memory issues? Increase Node.js memory:
NODE_OPTIONS="--max-old-space-size=4096" yarn build
- π Next.js Documentation
- π Notion API Docs
- π¬ Open an Issue
This project is licensed under the MIT License - see the LICENSE file for details.
β You can:
- Use this code for personal or commercial projects
- Modify and distribute the code
- Create derivative works
β You cannot:
- Remove copyright notices
- Use our trademarks or branding
Attribution appreciated but not required!
Made with β€οΈ by Bartosz Jarocki