A fully dynamic content management system built with React and GitHub, allowing you to create, edit, and manage web content entirely through GitHub repositories.
- GitHub-Powered: All content stored in GitHub repositories
- Real-Time Publishing: Changes committed directly to GitHub
- Component-Based: Build pages with 10+ reusable components
- Easy Setup: Simple configuration for GitHub OAuth
- Public Access: Pages accessible without authentication
- Admin Interface: Intuitive admin panel for managing content
Visit /#/admin/settings and follow the GitHub OAuth setup guide:
- Create an OAuth App at https://github.com/settings/developers
- Set Homepage URL:
http://localhost:5182 - Set Authorization callback URL:
http://localhost:5182/?auth=callback - Copy the Client ID and paste it in Settings
Set your GitHub repository details in .env:
VITE_GITHUB_OWNER=your-username
VITE_GITHUB_REPO=your-repo-nameCreate pages in your repository:
content/
pages/
home.json
about.json
components/
Button.json
{
"name": "home",
"title": "Home Page",
"components": [
{
"id": "heading-1",
"type": "Heading",
"props": { "level": 1, "text": "Welcome" },
"style": {},
"children": []
}
]
}npm install
npm run devVisit http://localhost:5182 to see the app.
- Container: Layout wrapper
- Heading: H1-H6 headings
- Text: Text content
- Button: Clickable buttons
- Image: Image display
- Divider: Horizontal divider
- Section: Content section
- Grid: Grid layout
- Link: Navigation links
- List: List displays
- Pages: Manage page content
- Components: Create custom components
- Settings: Configure GitHub OAuth
src/
lib/
github.js - GitHub API client
contentManager.js - Page/content management
componentRegistry.js - Component registry
admin/
AdminApp.js - Admin dashboard
Auth.js - Authentication
public/
App.js - Main app
Router.js - Hash-based routing
Renderer.js - Dynamic component rendering
components/
*.js - Built-in components
The app uses the GitHub REST API via native Fetch:
GET /repos/:owner/:repo/contents/:path- Read filesPUT /repos/:owner/:repo/contents/:path- Create/update filesDELETE /repos/:owner/:repo/contents/:path- Delete filesGET /repos/:owner/:repo/git/trees/HEAD- List repository structure
Authentication uses OAuth tokens stored in sessionStorage.
Build for production:
npm run buildStatic files will be in dist/ directory.
Deploy to GitHub Pages or any static hosting service.
MIT