PostWeaver is a Markdown-centric content distribution system that weaves a single piece of writing into a multi-platform publishing flow.
post_waver is a content management and distribution tool that helps you:
Designed for: Technical bloggers who want to maximize their content reach.
# Clone the repository
git clone https://github.com/Charliechen114514/post_waver.git
cd post_waver
# Install dependencies
pnpm install
# Configure environment variables
cat > .env << 'EOF'
# Database
DATABASE_URL="file:./packages/database/prisma/dev.db"
# API Configuration
API_PORT=3001
API_HOST=localhost
# Environment
NODE_ENV=development
EOF
# Initialize database (generate Prisma Client)
pnpm db:init
# Run database migrations (create database file)
pnpm db:migrate:prisma
post_waver requires a Hexo blog to sync content. The blog/ directory is not tracked by git - each user manages their own blog configuration.
You have several options:
Option 1: Use existing Hexo blog (Recommended)
# Create symlink to your existing blog
ln -s /path/to/your/hexo/blog ./blog
Option 2: Clone your private blog repository
# If you have your blog in a private repo
git clone git@github.com:username/my-private-blog.git blog
Option 3: Initialize new Hexo blog
# Install Hexo CLI
pnpm add -g hexo-cli
# Initialize blog
hexo init blog
cd blog
pnpm install
Optional: Set up version control for your blog
cd blog
git init
git remote add origin <your-private-repo-url>
# After syncing content with post_waver
cd ..
pnpm sync:blog # Uses scripts/update-blog.sh to commit & push
Important: The
blog/directory is in.gitignorebecause it contains your personal blog configuration and should not be shared with the post_waver repository.
# Write a test article
echo "# Hello World" > content/posts/test.md
# Scan and index content
pnpm scan
# Sync to blog (if configured)
pnpm sync:blog
# First time setup - install dependencies
pnpm install
# Configure environment variables
cat > .env << 'EOF'
DATABASE_URL="file:./packages/database/prisma/dev.db"
API_PORT=3001
API_HOST=localhost
NODE_ENV=development
EOF
# Initialize database
pnpm db:init
# Run database migrations (create database file)
pnpm db:migrate:prisma
# Build all packages
pnpm build
Build Process:
dist/ directories in each packageFull startup (build + start):
pnpm dev
Quick startup (skip build if already compiled):
pnpm start
Individual services:
pnpm dev:web # Start only Web UI (port 5173)
pnpm dev:api # Start API server + Web UI (port 3001 + 5173)
After starting, you can access:
Morning routine:
pnpm start # Quick start, uses already compiled code
After code changes:
pnpm build # Recompile modified packages
pnpm start # Restart services
Full clean rebuild:
pnpm clean # Remove all dist/ directories
pnpm install # Reinstall dependencies
pnpm db:init # Regenerate Prisma Client
pnpm db:migrate:prisma # Recreate database if needed
pnpm build # Rebuild all packages
pnpm start # Start services
Module not found errors:
# Solution: Reinstall dependencies
rm -rf node_modules scripts/node_modules
pnpm install
Prisma errors:
# Solution: Regenerate Prisma Client
pnpm db:init
# If database file is missing, run migrations
pnpm db:migrate:prisma
Port already in use:
# Solution: Stop existing processes
lsof -ti :3001 | xargs kill -9 # Clear API port
lsof -ti :5173 | xargs kill -9 # Clear Web UI port
Build failures:
# Solution: Clean build
pnpm clean
pnpm build
| Package | Purpose | Language | Description |
|---|---|---|---|
| @content-hub/core | Content parsing | TypeScript | Markdown parsing, frontmatter, scanning |
| @content-hub/linker | Content relationships | TypeScript/Python | Related posts, prev/next calculation |
| @content-hub/transformer | Platform conversion | TypeScript | Platform-specific transformations |
| @content-hub/adapter | Platform APIs | TypeScript | Platform API adapters |
| @content-hub/database | Data persistence | TypeScript/Prisma | SQLite database, ORM |
| @content-hub/config | Configuration | TypeScript | Config management |
| @content-hub/engine | Publishing engine | TypeScript | API server, workflows |
| @content-hub/web-ui | Web interface | TypeScript/React | User interface |
| @content-hub/converter-web | Converter tool | TypeScript/React | Standalone converter |
post_waver/
โโโ packages/ # Monorepo packages
โ โโโ core/ # Core functionality
โ โโโ linker/ # Content relationships
โ โโโ transformer/ # Platform transformations
โ โโโ adapter/ # Platform APIs
โ โโโ database/ # Database layer
โ โโโ config/ # Configuration
โ โโโ engine/ # Publishing engine & API
โ โโโ web-ui/ # Web interface
โ โโโ converter-web/ # Standalone converter
โโโ content/ # Your markdown articles
โโโ scripts/ # Utility scripts
โโโ docs/ # Documentation
โโโ test/ # Tests and fixtures
โโโ blog/ # Hexo blog (not tracked)
pnpm dev # Build all + Start API & Web UI
pnpm start # Start API & Web UI (skip build)
pnpm dev:web # Start Web UI only
pnpm dev:api # Start API server + Web UI
pnpm build # Build all packages
pnpm clean # Remove all dist/ directories
pnpm typecheck # Type check without building
pnpm scan # Scan and index content
pnpm scan:drafts # Scan including drafts
pnpm inject:links # Inject related article links
pnpm sync:blog # Sync content to Hexo blog
pnpm lint # Lint code
pnpm lint:fix # Fix linting issues
pnpm test # Run tests
pnpm db:init # Initialize database (generate Prisma Client)
pnpm db:migrate:prisma # Run database migrations
pnpm db:studio # Open Prisma Studio (database GUI)
pnpm db:reset # Reset database (โ ๏ธ deletes all data)
pnpm post:status # Check post status in database
PostWaver uses a modular monorepo architecture:
Learn more: Architecture Documentation
Interested in contributing or extending PostWaver?
# Clone and install
git clone https://github.com/Charliechen114514/post_waver.git
cd post_waver
pnpm install
# Configure environment
cat > .env << 'EOF'
DATABASE_URL="file:./packages/database/prisma/dev.db"
API_PORT=3001
API_HOST=localhost
NODE_ENV=development
EOF
# Initialize database
pnpm db:init
pnpm db:migrate:prisma
# Build all packages
pnpm build
# Run tests
pnpm test
# Start development servers
pnpm dev
Contributions are welcome! Please read our contributing guidelines and submit pull requests.
License: MIT