Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Next.js 16 TypeScript Tailwind CSS Prisma PostgreSQL Tiptap Zod Docker

License Last Commit Stars Status ESLint TypeScript Strict

🌸 maddyBlog 🌸

A modern, multi‑theme blogging platform
Type‑safe Β· Modular Β· i18n Β· Production‑ready

Features Β· Themes Β· Tech Stack Β· Structure Β· Quick Start




Overview

maddyBlog is an open‑source blogging platform with a multi‑theme engine, drag‑drop header/footer builder, Persian/English i18n, and AI integration. Built with Next.js 16, TypeScript, and PostgreSQL β€” every module is decoupled, type‑safe, and production‑ready.

✦ 9 themes · Visual header/footer builder · AI content tools · i18n ✦




Features

🎨 Multi‑Theme Engine 9 themes (default, Madelin, Zoomg, Zoomji, DigiTech, GameVerse, PersonalBlog, NewsWire, EduPro) with runtime switching
🧩 Header/Footer Builder Drag‑drop visual builder with 14 element types, per‑theme configs, color customization
✍️ Rich‑Text Editor Tiptap‑powered with slash commands, image upload, live preview, autosave
πŸ” Auth System JWT (jose) with httpOnly cookies, bcrypt, role‑based (USER / ADMIN)
🏷️ Categories & Tags Organize content with PostTag many‑to‑many
πŸ’¬ Nested Comments Threaded discussions with reply trees + in‑memory rate limiting + @mentions
🌐 i18n Persian (RTL) / English (LTR) with message files, admin UI in Persian
πŸ€– AI Integration Content generation via Anthropic, Gemini, Ollama providers
πŸ” Full‑Text Search PostgreSQL to_tsvector / to_tsquery across title + content
πŸ“ˆ Trending Algorithm views Γ— 0.6 + comments Γ— 0.4 + recency boost
❀️ Reactions Like / Fire / Clap with toggle per user
πŸ”– Bookmarks Save posts for later
πŸ‘οΈ View Tracking Granular PostView analytics (visitorHash, referrer, userAgent)
πŸ“Š Analytics Dashboard recharts charts, traffic sources, top posts table, daily stats
🎬 Stories & Slides Instagram‑style stories + hero slides with scheduling and ordering
πŸ“§ Newsletter Email subscription with rate limiting
πŸ‘₯ Follow System Follow/unfollow with unique constraints + activity feed
πŸ”” Notifications Follow, comment, reaction, mention, publish β€” with admin bell + polling
πŸ“° Activity Feed Timeline of followed users' actions
πŸ‘€ Profile Pages /users/[username] with bio, avatar, post list
πŸŽ›οΈ Admin Dashboard Full admin panel: posts, comments, users, themes, media, plugins, settings
πŸ–ΌοΈ Media Library Upload, browse, copy URL, delete β€” grid view
🐳 Docker Multi‑stage Alpine build + docker‑compose with PostgreSQL 16
πŸš€ CI/CD GitHub Actions β€” lint β†’ typecheck β†’ build on push/PR



Themes

Theme Vibe Directory
Default Clean, minimalist default
Madelin Modern, feminine madelin
Zoomg Gaming, bold zoomg
Zoomji Tech, vibrant zoomji
DigiTech Digital, futuristic digitech
GameVerse Dark, immersive gameverse
PersonalBlog Clean card‑based personalblog
NewsWire News portal style newswire
EduPro Educational, structured edupro

All themes share a responsive layout, support dynamic header/footer customization, and can be switched live from the admin panel.

πŸ“¦ All themes are published on the maddyblog-themes repo β€” install via the admin Marketplace tab.

🧩 All plugins are published on the maddyblog-plugins repo β€” install via the admin Marketplace tab.




Tech Stack

Layer Technology
🎨 Frontend Next.js 16 · TypeScript 5.x · React 19 · TailwindCSS
βš™οΈ Backend REST API Routes + Server Components
πŸ—„οΈ Database PostgreSQL Β· Prisma ORM v7 (driver adapters)
✍️ Editor Tiptap (Slash commands, image upload, live preview)
βœ… Validation Zod v4
πŸ” Auth JWT via jose Β· bcryptjs Β· httpOnly cookies
🌐 i18n Custom provider with message files (fa/en)
πŸ€– AI Anthropic Β· Gemini Β· Ollama providers
πŸ“Š Charts recharts
🧹 Dev Tools ESLint Β· Prettier Β· Husky Β· lint‑staged Β· Vitest
🐳 Deploy Docker Β· docker‑compose Β· GitHub CI



Project Structure

maddyBlog/
β”œβ”€β”€ prisma/                    # Schema, migrations & seed
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ (admin)/           #  Admin dashboard (15 pages)
β”‚   β”‚   β”œβ”€β”€ api/               #  25+ REST endpoints
β”‚   β”‚   β”œβ”€β”€ posts/             #  Public blog pages
β”‚   β”‚   β”œβ”€β”€ categories/        #  Category pages
β”‚   β”‚   β”œβ”€β”€ tags/              #  Tag pages
β”‚   β”‚   β”œβ”€β”€ search/            #  Search page
β”‚   β”‚   └── users/             #  Profile pages
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ admin/             #  Admin UI (Header, Sidebar, etc.)
β”‚   β”‚   β”œβ”€β”€ blog/              #  PostCard, CommentForm, SearchBar
β”‚   β”‚   β”œβ”€β”€ editor/            #  Tiptap editor, toolbar, slash commands
β”‚   β”‚   β”œβ”€β”€ header-footer/     #  Dynamic header/footer renderer + elements
β”‚   β”‚   β”œβ”€β”€ shared/            #  ImageSlider, StoriesBar
β”‚   β”‚   β”œβ”€β”€ social/            #  FollowButton, NotificationBell, ActivityFeed
β”‚   β”‚   β”œβ”€β”€ ui/                #  Reusable UI primitives
β”‚   β”‚   └── seo/               #  StructuredData (JSON‑LD)
β”‚   β”œβ”€β”€ themes/                #  9 theme packages (100+ components)
β”‚   β”‚   β”œβ”€β”€ default/
β”‚   β”‚   β”œβ”€β”€ madelin/
β”‚   β”‚   β”œβ”€β”€ zoomg/
β”‚   β”‚   β”œβ”€β”€ zoomji/
β”‚   β”‚   β”œβ”€β”€ digitech/
β”‚   β”‚   β”œβ”€β”€ gameverse/
β”‚   β”‚   β”œβ”€β”€ personalblog/
β”‚   β”‚   β”œβ”€β”€ newswire/
β”‚   β”‚   └── edupro/
β”‚   β”œβ”€β”€ features/              #  Domain modules (auth, post, comment)
β”‚   β”œβ”€β”€ services/              #  Business logic (analytics, search, etc.)
β”‚   β”œβ”€β”€ lib/                   #  prisma, jwt, errors, logger, ai providers
β”‚   β”œβ”€β”€ i18n/                  #  i18n provider + message loading
β”‚   └── cli/                   #  Developer CLI tool
β”œβ”€β”€ messages/                  #  i18n JSON files (fa.json, en.json)
β”œβ”€β”€ tests/                     #  Vitest unit tests
β”œβ”€β”€ docs/                      #  Architecture docs
β”œβ”€β”€ public/                    #  Static assets
└── .github/                   #  CI workflows & templates



Quick Start

# clone
git clone https://github.com/Maddyrampant/maddyBlog.git
cd maddyBlog

# install
npm install

# setup env
cp .env.example .env

# generate prisma client
npx prisma generate

# run migrations (needs PostgreSQL)
npx prisma migrate dev

# seed (optional)
npm run seed

# start
npm run dev

Needs a PostgreSQL instance β€” set DATABASE_URL in .env




Environment

DATABASE_URL=postgresql://user:password@localhost:5432/maddyblog
JWT_SECRET=your-super-secret-key-change-in-production
NEXT_PUBLIC_APP_URL=http://localhost:3000
LOG_LEVEL=info



Scripts

command does
npm run dev start development server
npm run build production build
npm run lint lint all files
npm run typecheck TypeScript type checking
npm run test run Vitest tests
npm run seed seed database
npm run db:studio open Prisma Studio
npm run dev:cli developer CLI tool



License

MIT β€” see LICENSE




built with love by a girl who codes
Maddyrampant Β© 2026

About

🌸 A modern, lovly blogging platform built with Next.js 16, TypeScript, TailwindCSS & Prisma. Modular, production-ready, and an absolute joy to use.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages