Skip to content
/ jarocki.me Public template

πŸš€ Personal website / blog / portfolio built using TypeScript, Next.js, Tailwind CSS and Notion API

License

Notifications You must be signed in to change notification settings

BartoszJarocki/jarocki.me

Repository files navigation

Bartosz Jarocki - Personal Website

Deploy with Vercel

MIT License Next.js TypeScript

A modern, performant personal website built with Next.js and Notion as a headless CMS

🌐 Live Demo | πŸ“š Documentation

Screenshot


Table of Contents


Features

✨ 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

Tech Stack

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

Getting Started

Prerequisites

  • Node.js 18+ and yarn
  • A Notion account and workspace
  • Git

Quick Start

  1. Clone the repository

    git clone https://github.com/BartoszJarocki/web-jarocki-me.git
    cd web-jarocki-me
  2. Install dependencies

    yarn install
  3. Set up environment variables

    cp .env.example .env.local
    # Edit .env.local with your values
  4. Configure your Notion database (see Notion setup)

  5. Start development server

    yarn dev
  6. Open http://localhost:3000 in your browser


Environment Setup

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

Getting Notion Credentials

  1. Create a Notion Integration

  2. Get Database ID

    • Open your Notion database
    • Copy the ID from the URL: notion.so/username/DATABASE_ID?v=...
  3. Connect Integration to Database

    • In your Notion database, click "..." β†’ "Connections" β†’ Add your integration

Notion Database Configuration

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

Database Template

Here's how your Notion database should look:

Notion Database Setup

Need help? Check out our detailed Notion setup guide.


Development

Available Scripts

# 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)

Project Structure

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

Deployment

Deploy to Vercel (Recommended)

Deploy with Vercel

  1. Click the deploy button above
  2. Configure environment variables in Vercel dashboard
  3. Your site will be automatically deployed on every push to main

Other Platforms

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

OG Image Generation

The application automatically generates Open Graph images for social media sharing using Vercel's Edge Functions.

Examples

Homepage Homepage OG

Blog Post Blog Post OG

Customization

Edit src/pages/api/og.tsx to customize:

  • Font styles and sizes
  • Color schemes
  • Layout and positioning
  • Dynamic elements

Contributing

We welcome contributions! Here's how you can help:

Ways to Contribute

  • πŸ› 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

Development Workflow

  1. Fork the repository

  2. Create a feature branch

    git checkout -b feature/amazing-feature
  3. Make your changes

    # Make sure tests pass and code is formatted
    yarn lint
    yarn typecheck
    yarn format
  4. Commit your changes

    git commit -m 'Add amazing feature'
  5. Push to your fork

    git push origin feature/amazing-feature
  6. Create a Pull Request

Code Standards

  • 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

Troubleshooting

Common Issues

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

Performance Issues

  • 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

Need More Help?


License

This project is licensed under the MIT License - see the LICENSE file for details.

What This Means

βœ… 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!


⬆ Back to Top

Made with ❀️ by Bartosz Jarocki

About

πŸš€ Personal website / blog / portfolio built using TypeScript, Next.js, Tailwind CSS and Notion API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •