pageel/pageel-cms
ุญูู
๐ Pageel CMS - A lightweight, self-hosted and Git-based CMS native for Astro - Manage your content where your code lives. No database required.
ุงูุจูุงูุงุช ูุงูุชุญูููุงุชู ุง ูู ููู ูุนูู
- ๐ Multi-Collection - Manage multiple content types (Blog, Docs, Projects) in one workspace
- ๐ Direct Post - Create blank posts directly from the UI toolbar and save them to Git
- ๐ท๏ธ Typed Templates - Define schema with String, Date, Boolean, Number, Array, Object
- ๐ Smart Filtering - Auto-generated filter UI based on your template types
ุงููู ู ุงูู ูุงุณ ูููุฌูู
- ุฎูุงู 24 ุณุงุนุฉ
- ุฌุงุฑู ุฌู ุน ุงูุณุฌู
- ุฎูุงู 7 ุฃูุงู
- ุฌุงุฑู ุฌู ุน ุงูุณุฌู
- ุฎูุงู 15 ููู ูุง
- ุฌุงุฑู ุฌู ุน ุงูุณุฌู
- ุฎูุงู ุดูุฑ
- ุฌุงุฑู ุฌู ุน ุงูุณุฌู
ุชุบููุฑ ุตุงูู ุงููุฌูู ุฎูุงู ูุชุฑุงุช ู ุชุฏุงุฎูุฉุ ูููุณ ู ุฌู ูุนูุง ููู ููุง. ุชุจูู ุงูููุงุณุงุช ุงูู ูููุฏุฉ ูุงุฑุบุฉ. ุงููุฌูู ุชููุณ ุงูุงูุชู ุงู ูุง ุฌูุฏุฉ ุงูุจุฑู ุฌูุงุช.
README.md
ุงูุฃุตูPageel CMS
A lightweight, self-hosted and Git-based CMS native for Astro
Manage your content where your code lives. No database required.
A lightweight, self-hosted Content Management System that uses your GitHub repository as the content backend. No external database โ your Markdown/MDX files and images live right in your repo. Built with Astro 6 and React 19, featuring server-side authentication and a Notion-inspired editing experience.
๐ธ Screenshots
โจ Key Features
| Feature | Description |
|---|---|
| ๐ Multi-Collection | Manage multiple content types (Blog, Docs, Projects) in one workspace |
| ๐ Direct Post | Create blank posts directly from the UI toolbar and save them to Git |
| ๐ท๏ธ Typed Templates | Define schema with String, Date, Boolean, Number, Array, Object |
| ๐ Smart Filtering | Auto-generated filter UI based on your template types |
| ๐งฉ Plugin System | Slot-based WYSIWYG editor plugins (MDXEditor included) with CSS isolation |
| ๐ Server-Side Auth | Env Auth with bcrypt โ your Git token never leaves the server |
| ๐ Multi-Tenant | One deployment, multiple repos โ each user provides their own token at login |
| ๐ i18n Ready | English and Vietnamese support |
| โก Optimistic Locking | SHA-check prevents overwriting concurrent changes |
| ๐ Self-Hosted | Deploy on any VPS, Docker, or serverless platform |
๐๏ธ Architecture (v2.0)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser (React SPA) โ
โ Dashboard, PostList, Images, Templates โ
โ ProxyGitAdapter โ /api/proxy/* โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cookie session (HMAC-SHA256)
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Astro SSR Server (Node.js) โ
โ middleware.ts โ session guard โ
โ /api/auth/login โ bcrypt verify โ
โ /api/proxy/git โ GitHub API (server-side) โ
โ /api/proxy/upload โ file upload via API โ
โ /api/proxy/blob โ binary file serving โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tech Stack
Security Model
- No client-side tokens: Git PAT stored server-side only (env or encrypted in session cookie)
- PBKDF2 password hashing: Node-native Web Crypto API PBKDF2 (100k rounds) with constant-time verification
- HMAC-SHA256 sessions: Signed cookies with HttpOnly + SameSite=Strict + Secure
- Token validation at login: Dynamic tokens are verified against GitHub API before session is created
- Rate limiting: 5 attempts per minute per IP
- Upload hardening: Path validation blocklist + file type/size limits on upload proxy
๐งฉ Plugin System (v2.1 โ Beta)
Pageel CMS features a slot-based plugin architecture for extending the editor experience.
Available Plugins
| Package | Description | Status |
|---|---|---|
@pageel/plugin-types |
TypeScript interfaces for plugin development | โ Ready |
@pageel/plugin-mdx |
MDXEditor WYSIWYG editor with toolbar, image upload, debounce | โ Ready |
@pageel/cms |
Astro integration โ auto-detect collections, inject /cms route |
โ Ready |
Enable WYSIWYG Editor
Add to your .pageelrc.json:
{
"version": 2,
"plugins": {
"editor": "@pageel/plugin-mdx"
}
}
Editor Tabs
When a WYSIWYG plugin is active (e.g., @pageel/plugin-mdx):
| Tab | Description |
|---|---|
| โ๏ธ Edit | WYSIWYG visual editor (MDXEditor plugin) |
</> Source |
Source Editor โ raw markdown with Notion-style toolbar |
| ๐ Preview | Rendered HTML preview |
When no plugin is active, the UI simplifies to 2 tabs: Source + Preview.
๐ Getting Started
Prerequisites
- Node.js >= 22.12.0
- A GitHub repository with markdown content
- A GitHub personal access token (fine-grained recommended)
1. Clone & Install
git clone https://github.com/pageel/pageel-cms.git
cd pageel-cms
npm install
2. Configure Environment
cp .env.example .env
Edit .env with your credentials:
CMS_USER=admin
CMS_PASS_HASH="pbkdf2:100000:..." # PBKDF2 Web Crypto hash (use bin/cli.js to generate)
CMS_SECRET=your-random-secret-min-16-chars
# Optional โ if omitted, users provide these at login (Multi-Tenant mode)
GITHUB_TOKEN=ghp_your_token
CMS_REPO=username/repo
๐ก Two modes: Set
GITHUB_TOKEN+CMS_REPOfor a dedicated single-repo setup (Server Mode). Leave them empty to let each user provide their own token and repo at login (Connect Mode / Multi-Tenant).
3. Run Development Server
npm run dev
Open http://localhost:4321 โ you'll be redirected to /login.
4. Generate Password Hash
# Generate hash using PBKDF2 Web Crypto API (Node.js native):
node bin/cli.js hash your-password
Copy the output hash (e.g., pbkdf2:100000:salt_hex:hash_hex) to CMS_PASS_HASH in your .env file (wrap in double quotes).
5. Production Build
npm run build
node dist/server/entry.mjs
See docs/deployment.md for VPS, Docker, and Vercel deployment guides.
๐ Documentation
| Document | Description |
|---|---|
| Setup & Auth Modes | Installation guide with detailed 3-mode configuration (Server, Connect, Open) |
| Deployment | VPS, Docker, Vercel deploy guides, env vars reference |
| CI/CD Pipeline Architecture | Multi-job Quality Gate, Dependabot & CD release pipeline |
| Security Assessment | Auth, session, proxy security review |
| Plugin Development | TypeScript interfaces for building custom plugins |
๐ Ecosystem
| Product | Type | Purpose |
|---|---|---|
| Pageel CMS | OSS (MIT) | Git-native CMS for content & media |
| @pageel/plugin-mdx | OSS (MIT) | WYSIWYG editor plugin (MDXEditor) |
| @pageel/cms | OSS (MIT) | Astro integration bridge |
| Pageel Workhub | Commercial | Team workspace: workflow, review, permissions |
Pageel CMS focuses on content. For team collaboration features, see Pageel Workhub.
๐ค Contributing
Contributions are welcome!
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License. See the LICENSES.md file for details.
Made with โ๏ธ by Pageel
ุงุณุชูุดู ู ุดุงุฑูุน ู ุดุงุจูุฉ ูู ุฑุชุจุทุฉ
ุฌุงุฑู ุงูุชุญู ููโฆ