Launch your professional blog in minutes, not days. A production-ready, SEO-optimized blog platform with rich content support, multimedia embedding, and powerful API.
π Live Demo | π Full API Docs | π Report Bug | β¨ Request Feature
Building a professional blog from scratch takes weeks of development time. Your Professional Blog gives you everything you need to start publishing content immediately:
- β Production-ready in 5 minutes - Clone, install, and start writing
- β SEO optimized out of the box - Rank higher on Google from day one
- β No configuration required - Sensible defaults that just work
- β Professional design - Clean, modern UI with smooth animations
- β Powerful API - Programmatic content creation for automation
- β Free for personal use - Start your blog journey today
Perfect for developers, startups, indie hackers, content creators, and anyone who wants a modern, fast, SEO-friendly blog without the complexity.
- Modern Tech Stack - Next.js 14+ with App Router, TypeScript, Tailwind CSS
- Rich Content Support - Full Markdown and HTML support with syntax highlighting
- 13 Blog Categories - Organized content (Technology, Business, Education, Entertainment, etc.)
- Turso Database - Serverless SQLite database, perfect for edge deployment
- Mobile-First Design - Responsive and beautiful on all devices
- Lightning Fast - Server-side rendering, image optimization, code splitting
- Video Embedding - YouTube, Vimeo, and direct video files (.mp4, .webm, .ogg)
- Audio Support - Embed podcasts and audio files (.mp3, .wav, .ogg, .m4a)
- Flexible Layouts - Position media inline, left, right, or full-width
- Image Optimization - Automatic image compression and lazy loading
- Table of Contents - Auto-generated from post headings
- Code Highlighting - Beautiful syntax highlighting for technical posts
- SEO-Optimized - Dynamic meta tags, Open Graph, Twitter Cards
- JSON-LD Structured Data - Rich search results with article schema
- Automatic Sitemap - Generated sitemap.xml for search engines
- Robots.txt - Proper search engine indexing configuration
- 90+ Lighthouse Score - Optimized for Core Web Vitals
- Clean URLs - SEO-friendly slugs and canonical URLs
- Powerful REST API - Create posts programmatically with secure authentication
- TypeScript - Full type safety and excellent IDE support
- Hot Reload - Instant preview of changes during development
- Comprehensive Validation - Input validation for all API endpoints
- Well-Documented - Clear code, comments, and extensive API documentation
- Easy Customization - Modular components and Tailwind CSS
- View Counter - Track post popularity
- Reading Time - Automatic reading time estimates
- Social Sharing - Built-in Twitter, LinkedIn, and link sharing
- Tag System - Organize and filter posts by tags
- Category Navigation - Filter posts by category with one click
- Comment System - Threaded comments with nested replies, likes, and real-time engagement
- Smooth Animations - Fade-in and slide effects for professional feel
- Dark/Light Compatible - Ready for dark mode implementation
- Professional Shadows - Depth and hierarchy with subtle shadows
- Responsive Tables - Mobile-optimized data display
- Accessible - Semantic HTML and ARIA attributes
Get your blog running in 4 simple steps:
git clone https://github.com/AKzar1el/blog-starter-template.git
cd blog-starter-templateCreate a free Turso account:
- Go to https://turso.tech
- Sign up with GitHub (it's free!)
- Click "Create Database"
- Name it
blog-dband click Create
Get your credentials:
- Copy the Database URL (looks like
libsql://blog-db-xxxxx.turso.io) - Click "Create Token" and copy the auth token
Initialize the database schema:
- In Turso dashboard, click your database
- Open the SQL Shell or Console
- Paste and run this SQL:
CREATE TABLE posts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
slug TEXT UNIQUE NOT NULL,
title TEXT NOT NULL,
content TEXT NOT NULL,
excerpt TEXT NOT NULL,
author TEXT NOT NULL,
tags TEXT NOT NULL,
coverImage TEXT,
category TEXT DEFAULT 'All Blog Posts',
publishedAt TEXT NOT NULL,
updatedAt TEXT NOT NULL,
views INTEGER DEFAULT 0,
embeddedMedia TEXT
);
CREATE INDEX idx_posts_slug ON posts(slug);
CREATE INDEX idx_posts_publishedAt ON posts(publishedAt DESC);
CREATE INDEX idx_posts_category ON posts(category);# Install packages
npm install
# Set up environment variables
cp .env.example .env.localEdit .env.local file with your Turso credentials:
# Database Configuration (from Turso dashboard)
TURSO_DATABASE_URL=libsql://your-database-name.turso.io
TURSO_AUTH_TOKEN=your-turso-auth-token-here
# API Configuration
API_KEY=your-secure-api-key-here
# Site Configuration
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_SITE_NAME=Your Professional Blognpm run devπ That's it! Open http://localhost:3000 and start blogging!
curl -X POST http://localhost:3000/api/posts \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"title": "My First Blog Post",
"content": "# Welcome\n\nThis is my first post!",
"excerpt": "An introduction to my new blog",
"author": "Your Name",
"tags": ["welcome", "introduction"],
"category": "Technology",
"coverImage": "https://images.unsplash.com/photo-1499750310107-5fef28a66643"
}'For detailed API documentation with all features, see API_DOCUMENTATION.md.
next.config.js - Configure Next.js settings:
module.exports = {
images: {
domains: ['images.unsplash.com', 'your-image-domain.com'],
},
}.env.local - Environment variables:
# Required - Database Configuration (Turso)
TURSO_DATABASE_URL=libsql://your-database.turso.io
TURSO_AUTH_TOKEN=your-turso-auth-token
# Required - API Configuration
API_KEY=your-secure-random-api-key
# Required - Site Configuration
NEXT_PUBLIC_SITE_URL=https://yourdomain.com
NEXT_PUBLIC_SITE_NAME=Your Blog Name
# Optional
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX # Google AnalyticsColors & Styling:
- Edit
tailwind.config.tsfor theme colors - Modify
app/globals.cssfor custom styles and animations - Update components in
components/folder
Content Categories:
- Edit
lib/constants.tsto modify or add categories - Default categories: Technology, Business, Education, Ethics, Art, Entertainment, Fun, Games, Music, Politics, History, News
Database:
- Turso (serverless SQLite) - Perfect for production and edge deployment
- SQLite-compatible syntax - Easy to work with
- Schema defined in
lib/db/index.ts - Initialization script available:
npm run init-db
blog-starter-template/
βββ app/
β βββ api/
β β βββ posts/
β β βββ route.ts # REST API with validation
β βββ blog/
β β βββ [slug]/
β β β βββ page.tsx # Individual post page
β β βββ page.tsx # Blog listing with categories
β βββ about/
β β βββ page.tsx # About page
β βββ layout.tsx # Root layout with SEO
β βββ page.tsx # Homepage
β βββ sitemap.ts # Dynamic sitemap
β βββ robots.ts # Robots.txt
β βββ globals.css # Global styles
βββ components/
β βββ Header.tsx # Navigation
β βββ Footer.tsx # Site footer
β βββ PostCard.tsx # Post preview card
β βββ MarkdownContent.tsx # Markdown/HTML renderer
β βββ MediaEmbed.tsx # Video/audio embedding
β βββ TableOfContents.tsx # Auto-generated TOC
β βββ ShareButtons.tsx # Social sharing
βββ lib/
β βββ db/
β β βββ index.ts # Database setup (Turso client)
β β βββ posts.ts # Post operations
β βββ constants.ts # Blog categories & config
β βββ media-utils.ts # Media processing
β βββ utils.ts # Helper functions
βββ scripts/
β βββ init-db.ts # Database initialization script
βββ public/ # Static assets
βββ .env.example # Environment template
βββ API_DOCUMENTATION.md # Full API docs
βββ DATABASE_MIGRATION.md # Database setup guide
βββ package.json
Embed videos and audio with flexible layouts:
{
"embeddedMedia": [
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"type": "youtube",
"position": "right",
"caption": "Tutorial: Getting Started"
}
]
}{
"url": "https://vimeo.com/VIDEO_ID",
"type": "vimeo",
"position": "full-width"
}{
"url": "https://example.com/video.mp4",
"type": "video",
"position": "inline"
}{
"url": "https://example.com/podcast.mp3",
"type": "audio",
"position": "inline",
"caption": "Episode 1: Introduction"
}Position Options:
inline- Centered within content (default)right- Media on right, text wraps left (desktop only)left- Media on left, text wraps right (desktop only)full-width- Spans full width for cinematic effect
Endpoint: POST /api/posts
Headers:
Content-Type: application/json
x-api-key: YOUR_API_KEY
Required Fields:
title(string) - Post titlecontent(string) - Markdown or HTML contentexcerpt(string) - Brief summaryauthor(string) - Author nametags(array) - Minimum 1 tag
Optional Fields:
category(string) - One of 13 available categoriesslug(string) - Custom URL (auto-generated if not provided)coverImage(string) - Cover image URLembeddedMedia(array) - Video/audio embeds
Example Request:
curl -X POST http://localhost:3000/api/posts \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"title": "Getting Started with Next.js",
"content": "# Introduction\n\nNext.js is amazing...",
"excerpt": "Learn Next.js fundamentals",
"author": "John Doe",
"tags": ["nextjs", "react", "tutorial"],
"category": "Technology",
"coverImage": "https://images.unsplash.com/photo-1461749280684-dccba630e2f6"
}'Success Response (201):
{
"success": true,
"message": "Post created successfully",
"post": {
"id": 1,
"slug": "getting-started-with-nextjs",
"title": "Getting Started with Next.js",
"publishedAt": "2024-11-17T10:30:00.000Z",
...
}
}Endpoint: GET /api/posts
Query Parameters:
limit(number) - Posts per pageoffset(number) - Pagination offset
Example:
curl http://localhost:3000/api/posts?limit=10&offset=0π For comprehensive API documentation, see API_DOCUMENTATION.md
Deploy your blog to production with one click:
Steps:
- Set up Turso Database (see Quick Start above)
- Click the deploy button above
- Connect your GitHub account
- Set environment variables (for Production, Preview, and Development):
TURSO_DATABASE_URL- Your Turso database URLTURSO_AUTH_TOKEN- Your Turso auth tokenAPI_KEY- Choose a secure API keyNEXT_PUBLIC_SITE_URL- Your Vercel deployment URLNEXT_PUBLIC_SITE_NAME- Your blog name
- Deploy! π
Important: Make sure your Turso database is initialized with the schema (see Quick Start step 2οΈβ£) before deploying.
This standard Next.js app can deploy to:
- Railway - Deploy Guide
- Render - Deploy Guide
- DigitalOcean App Platform - Deploy Guide
- AWS Amplify - Deploy Guide
π‘ Production Tip: Turso is production-ready and serverless, perfect for edge deployment. The free tier includes everything you need to get started!
- Next.js 14+ - React framework with App Router
- React 18+ - UI library
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS
- Turso (@libsql/client) - Serverless SQLite database
- react-markdown - Markdown renderer
- rehype-highlight - Code syntax highlighting
- Next/Image - Automatic image optimization
- Next/Font - Font optimization
- JSON-LD - Structured data for search engines
| Column | Type | Description |
|---|---|---|
id |
INTEGER | Primary key, auto-increment |
slug |
TEXT | Unique URL slug (indexed) |
title |
TEXT | Post title |
content |
TEXT | Markdown or HTML content |
excerpt |
TEXT | Brief summary for SEO |
author |
TEXT | Author name |
tags |
TEXT | JSON array of tags |
category |
TEXT | Blog category (indexed) |
coverImage |
TEXT | Cover image URL (nullable) |
embeddedMedia |
TEXT | JSON array of media objects (nullable) |
publishedAt |
TEXT | ISO 8601 timestamp (indexed) |
updatedAt |
TEXT | ISO 8601 timestamp |
views |
INTEGER | View counter (default: 0) |
Indexes for Performance:
idx_posts_slug- Fast slug lookupsidx_posts_publishedAt- Efficient sorting by dateidx_posts_category- Quick category filtering
- Performance: 90+
- Accessibility: 95+
- Best Practices: 95+
- SEO: 100
- β Dynamic meta tags for every page
- β Open Graph tags for social sharing
- β Twitter Card support
- β JSON-LD structured data (Article schema)
- β Automatic sitemap.xml generation
- β Robots.txt configuration
- β Semantic HTML5 structure
- β Canonical URLs
- β Mobile-friendly design
- β Fast page load times
- β Server-side rendering (SSR)
- β Automatic code splitting
- β Image lazy loading and optimization
- β Font optimization
- β Efficient caching strategies
- β Minimal JavaScript bundle
Your blog is secure by default:
- API Authentication - Secure API key for post creation
- Input Validation - Comprehensive validation on all inputs
- SQL Injection Protection - Parameterized queries
- XSS Protection - React escaping + DOMPurify for HTML
- External Link Security - Automatic
rel="noopener noreferrer" - CSRF Protection - Built-in Next.js CSRF protection
- Type Safety - TypeScript prevents common errors
- API Documentation - Complete API reference with examples
- Database Migration Guide - Turso setup and migration instructions
- Installation Guide - See Quick Start above
- Configuration - See Configuration above
- Deployment Guide - See Deployment above
This blog uses Turso - a serverless SQLite database perfect for modern web applications:
Why Turso?
- β Serverless - No infrastructure to manage
- β SQLite-compatible - Familiar SQL syntax
- β Edge-ready - Deploy close to your users
- β Free tier - Generous limits for most blogs
- β Fast - Sub-10ms query latency
- β Scalable - Grows with your blog
Key Features:
- Automatic backups and point-in-time recovery
- Built-in replication for high availability
- Web dashboard for easy management
- CLI tools for advanced operations
For detailed setup instructions, see the Quick Start guide above.
- Production-ready blog platform
- SEO optimization
- Rich content support (Markdown & HTML)
- Media embedding (video & audio)
- 13 blog categories
- REST API with authentication
- Mobile-responsive design
- View counter and analytics
- Dark mode support
- Related posts recommendations
- Threaded comment system with likes and nested replies
- Search functionality
- Newsletter integration (Mailchimp, ConvertKit)
- Multi-author support with profiles
- RSS feed
- Admin dashboard
- Draft posts management
- Scheduled publishing
See open issues for feature requests and bug reports.
Contributions make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature
- Commit your changes
git commit -m 'Add some AmazingFeature' - Push to the branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Write clear, descriptive commit messages
- Follow the existing code style (TypeScript, ESLint)
- Add comments for complex logic
- Update documentation if needed
- Test your changes thoroughly
This project is available under dual licensing:
Free to use under the MIT License for:
- Personal blogs and portfolios
- Educational projects and learning
- Non-profit organizations
- Open-source projects
- Hobby projects
For commercial use, please contact me for licensing options.
Commercial use includes:
- Building blogs for clients (paid work)
- Using in products or services that generate revenue
- Integrating into SaaS platforms
- Selling as a premium template
Why dual licensing?
I want this template to be freely available for personal use and learning while ensuring sustainable development through commercial licensing.
π§ Contact for commercial license: tomi.seregi99@gmail.com
Questions about licensing? Email me - I'm happy to help you determine which license fits your use case!
Need help? Have questions? Want to share what you built?
- π§ Email: tomi.seregi99@gmail.com
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Issues
- π¬ Discussions: GitHub Discussions
Response Time: I aim to respond to issues and questions within 48 hours.
If this project helped you launch your blog, please consider:
- β Starring this repository
- π΄ Forking and contributing
- π’ Sharing with others who might find it useful
- π¬ Tweeting about your experience
- β Buy me a coffee (optional)
Every star motivates me to keep improving this project! π
Built with β€οΈ using amazing open-source tools:
- Next.js team for the incredible framework
- Vercel for seamless deployment
- Tailwind CSS for beautiful styling
- The open-source community for inspiration and support
- Repository: https://github.com/AKzar1el/blog-starter-template
- Live Demo: Coming soon
- Author: AKzar1el
π Database Migration to Turso
- Migrated from SQLite to Turso (serverless SQLite)
- Perfect compatibility with Vercel and edge deployment
- Sub-10ms query latency
- Built-in backups and replication
- Easy setup with web dashboard
- Production-ready from day one
π¬ Rich Media Features
- YouTube and Vimeo video embedding
- Direct video file support (.mp4, .webm, .ogg)
- Audio embedding (.mp3, .wav, .ogg, .m4a)
- Flexible positioning (inline, left, right, full-width)
- Optional captions for embedded content
π Content Organization
- 13 organized blog categories
- Category navigation with tabs
- Category badges on post cards
- Efficient category-based filtering
β¨ Enhanced Content
- Full HTML support alongside Markdown
- SEO-optimized link handling
- Automatic external link attributes
- Improved code syntax highlighting
π¨ UI/UX Improvements
- Smooth fade-in animations
- Enhanced button interactions
- Professional shadow transitions
- Responsive media layouts
- Better mobile experience
For detailed API usage with new features, see API_DOCUMENTATION.md.
Made with β€οΈ for developers and content creators
Launch your blog today. Start writing tomorrow.
