A modern, professional personal blog platform built with React, TypeScript, and Tailwind CSS. Features a beautiful, responsive design with dark mode support, SEO optimization, and a powerful admin panel for content management.
- Professional UI/UX - Clean, modern interface with glassmorphism effects
- Responsive Layout - Optimized for mobile, tablet, and desktop
- Dark Mode - Seamless theme switching with system preference detection
- Smooth Animations - Framer Motion powered transitions and micro-interactions
- Custom Typography - Beautiful font pairing with Inter and Playfair Display
- Rich Markdown Editor - Write posts with full Markdown support
- Syntax Highlighting - Code blocks with highlight.js
- Math Rendering - LaTeX support via KaTeX
- Image Optimization - Automatic image handling and optimization
- Draft System - Save and publish posts when ready
- Advanced Search - Filter posts by title, content, tags, and categories
- Tag System - Organize content with multiple tags
- Reading Time - Automatic reading time calculation
- Table of Contents - Auto-generated TOC for long posts
- Related Posts - Smart content recommendations
- SEO Optimized - Dynamic meta tags, Open Graph, and Twitter Cards
- Fast Performance - Vite-powered build with code splitting
- Accessibility - WCAG 2.1 AA compliant
- Bookmarks - Save posts to read later
- Social Sharing - Share posts on Twitter, LinkedIn, and Facebook
- Comments - Engage with readers (optional)
- Secure Authentication - Supabase-powered auth system
- Content Dashboard - Manage posts, recommendations, and settings
- Profile Management - Update author bio, social links, and photo
- Site Settings - Customize site name, description, and metadata
- Analytics Ready - Easy integration with analytics platforms
- Node.js 18+ and npm
- Supabase account (free tier available)
- Git
-
Clone the repository
git clone https://github.com/M-F-Tushar/Blog-Website.git cd Blog-Website -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Set up Supabase database
Run the SQL scripts in
supabase/schema.sqlin your Supabase SQL editor -
Start development server
npm run dev
-
Open in browser
Navigate to
http://localhost:3000
Execute these SQL commands in your Supabase SQL Editor:
-- Posts table
CREATE TABLE posts (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
title TEXT NOT NULL,
content TEXT NOT NULL,
excerpt TEXT,
cover_image TEXT,
category TEXT DEFAULT 'General',
date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
status TEXT DEFAULT 'draft',
tags TEXT[],
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Recommendations table
CREATE TABLE recommendations (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
title TEXT NOT NULL,
description TEXT NOT NULL,
url TEXT NOT NULL,
type TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Site settings table
CREATE TABLE site_settings (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
site_name TEXT DEFAULT 'My Blog',
site_description TEXT,
author_name TEXT,
author_tagline TEXT,
author_bio TEXT,
author_image TEXT,
social_github TEXT,
social_linkedin TEXT,
social_twitter TEXT,
social_email TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Profile settings table
CREATE TABLE profile_settings (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
bio TEXT,
skills JSONB,
timeline JSONB,
achievements JSONB,
statistics JSONB,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Enable Row Level Security
ALTER TABLE posts ENABLE ROW LEVEL SECURITY;
ALTER TABLE recommendations ENABLE ROW LEVEL SECURITY;
ALTER TABLE site_settings ENABLE ROW LEVEL SECURITY;
ALTER TABLE profile_settings ENABLE ROW LEVEL SECURITY;
-- Public read access
CREATE POLICY "Allow public read access" ON posts FOR SELECT USING (true);
CREATE POLICY "Allow public read access" ON recommendations FOR SELECT USING (true);
CREATE POLICY "Allow public read access" ON site_settings FOR SELECT USING (true);
CREATE POLICY "Allow public read access" ON profile_settings FOR SELECT USING (true);
-- Authenticated write access
CREATE POLICY "Allow authenticated users to insert" ON posts FOR INSERT TO authenticated WITH CHECK (true);
CREATE POLICY "Allow authenticated users to update" ON posts FOR UPDATE TO authenticated USING (true);
CREATE POLICY "Allow authenticated users to delete" ON posts FOR DELETE TO authenticated USING (true);
CREATE POLICY "Allow authenticated users to insert" ON recommendations FOR INSERT TO authenticated WITH CHECK (true);
CREATE POLICY "Allow authenticated users to update" ON recommendations FOR UPDATE TO authenticated USING (true);
CREATE POLICY "Allow authenticated users to delete" ON recommendations FOR DELETE TO authenticated USING (true);
CREATE POLICY "Allow authenticated users to update" ON site_settings FOR UPDATE TO authenticated USING (true);
CREATE POLICY "Allow authenticated users to update" ON profile_settings FOR UPDATE TO authenticated USING (true);- Go to Supabase Dashboard β Authentication β Users
- Click "Add user" β "Create new user"
- Enter email and secure password
- Check "Auto Confirm User"
- Save credentials for admin login
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run lint:fix- Fix ESLint errorsnpm run format- Format code with Prettiernpm run generate-sitemap- Generate sitemap.xml
-
Update
vite.config.tswith your repository name (already configured) -
Build the project
npm run build
-
Deploy
The built files in
dist/can be deployed to GitHub Pages using GitHub Actions or manually.
- Connect your GitHub repository
- Set build command:
npm run build - Set output directory:
dist - Add environment variables (Supabase credentials)
- Connect your repository
- Build command:
npm run build - Publish directory:
dist - Add environment variables
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS - Utility-first styling
- Framer Motion - Animations
- React Router v6 - Routing
- Lucide React - Icons
- React Markdown - Markdown rendering
- Remark GFM - GitHub Flavored Markdown
- Rehype Highlight - Syntax highlighting
- KaTeX - Math rendering
- Mermaid - Diagrams
- Supabase - Backend as a Service
- PostgreSQL - Database
- Row Level Security - Data protection
- Vite - Build tool
- ESLint - Linting
- Prettier - Code formatting
- Husky - Git hooks
- lint-staged - Pre-commit checks
Blog-Website/
βββ src/
β βββ components/ # React components
β β βββ admin/ # Admin panel components
β β βββ blog/ # Blog-specific components
β β βββ comments/ # Comment system
β β βββ common/ # Reusable components
β βββ hooks/ # Custom React hooks
β βββ services/ # API services
β βββ types/ # TypeScript types
β βββ utils/ # Utility functions
β βββ context/ # React contexts
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
βββ public/ # Static assets
β βββ posts/ # Blog post markdown files
β βββ images/ # Images and media
βββ scripts/ # Build and utility scripts
βββ supabase/ # Database schema
βββ index.css # Global styles
βββ tailwind.config.js # Tailwind configuration
βββ vite.config.ts # Vite configuration
-
Login to Admin Panel
- Navigate to
/admin/login - Use your Supabase credentials
- Navigate to
-
Update Settings
- Go to Settings β Site Settings
- Update site name, description, and metadata
- Go to Settings β Profile Settings
- Update author bio, skills, and social links
The blog comes with optimized PWA icons, but you can customize them to match your brand:
npm run generate-iconsThis will generate three optimized icons:
pwa-192x192.png(< 20KB) - Standard PWA iconpwa-512x512.png(< 50KB) - High-resolution PWA iconapple-touch-icon.png(< 20KB) - Apple Touch Icon
You can customize the icon design by editing scripts/generate-pwa-icons.js.
- Open
scripts/icon-generator.htmlin your browser - Customize the icon text and colors
- Click "Download All Icons"
- Place the downloaded files in the
public/directory
The browser-based generator is perfect if you:
- Don't want to run Node scripts
- Want a visual, interactive way to design icons
- Need quick icon generation without dependencies
- 192x192: Should be under 20KB for optimal performance
- 512x512: Should be under 50KB for optimal performance
- 180x180: Apple Touch Icon, should be under 20KB
All generated icons are automatically optimized for web use.
Edit tailwind.config.js to customize:
- Color palette
- Fonts
- Spacing
- Animations
- Create component in
src/components/ - Add route in
src/App.tsx - Update navigation in
src/components/Header.tsx
- Login to admin panel
- Navigate to Posts β Create New
- Write content in Markdown
- Add tags and category
- Upload cover image (optional)
- Save as draft or publish
- Headers:
# H1,## H2, etc. - Bold:
**text** - Italic:
*text* - Links:
[text](url) - Images:
 - Code:
`code`or```language - Math:
$inline$or$$block$$ - Tables: GitHub Flavored Markdown tables
- Task Lists:
- [ ] Task
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your 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
This project is licensed under the MIT License - see the LICENSE file for details.
M-F-Tushar
- GitHub: @M-F-Tushar
- LinkedIn: Connect with me
- Email: your.email@example.com
- React - UI library
- Vite - Build tool
- Tailwind CSS - Styling
- Supabase - Backend platform
- Framer Motion - Animations
- Lucide - Icons
If you have any questions or need help, please:
- Open an issue on GitHub
- Check the documentation
- Reach out via email
If you find this project useful, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting new features
- π Contributing code
Made with β€οΈ by M-F-Tushar
A modern personal blog platform for developers and writers
