No description
Backend: - Add org namespace management (company to Forgejo org mappings) - Add holding company flag for viewing all organizations - Add admin handlers for namespace CRUD operations - Add chat persistence with suggested_changes support - Add apply_change handler for committing changes via Forgejo API - Database migrations for chats, suggested_changes, and org_namespaces Frontend: - Add Administration app for managing org namespace mappings - Add org context switcher in toolbar with badges - Filter Library collections by selected company's Forgejo orgs - Intelligence view starts blank, loads chat on click from sidebar - Persisted chat history in sidebar with click-to-load - Add RepoCard component (renamed to repo-info-card to avoid CSS conflicts) - Add new icons for admin features Shared: - Add OrgNamespace model - Add is_holding flag to Company model |
||
|---|---|---|
| backend | ||
| frontend | ||
| shared | ||
| .env.example | ||
| .gitignore | ||
| Cargo.toml | ||
| README.md | ||
| SETUP.md | ||
Publisher OS
A unified platform for managing publications, domains, and deployments across your organization. Built with Rust, Dioxus, and PostgreSQL.
Features
- Multi-type Publication Management: Support for mdBook, Docusaurus, React, Yew WASM, Next.js, Hugo, Jekyll, and more
- Domain & Subdomain Management: Request-based workflow with DNS operations queue
- CI/CD Integration: Forgejo Actions integration for build status tracking
- Activity Feed: Real-time timeline of all operations
- Multi-company Support: Operate within a holding structure with company-level isolation
- Forgejo OAuth: Secure authentication via your organization's Forgejo instance
- Island-based UI: Modern, OS-like interface design
Architecture
publisher-os/
├── frontend/ # Dioxus web frontend
├── backend/ # Axum REST API
├── shared/ # Shared types and models
└── migrations/ # PostgreSQL migrations
Prerequisites
- Rust 1.75+
- PostgreSQL 14+
- Dioxus CLI (
cargo install dioxus-cli) - A Forgejo instance with OAuth application configured
Setup
1. Clone and Configure
git clone <repo-url>
cd publisher-os
cp .env.example .env
# Edit .env with your configuration
2. Configure Forgejo OAuth
- Go to your Forgejo instance → Settings → Applications
- Create a new OAuth2 application:
- Application Name: Publisher OS
- Redirect URI:
http://localhost:8080/auth/callback
- Copy the Client ID and Client Secret to your
.envfile
3. Setup Database
# Create database
createdb publisher
# Run migrations (handled automatically on backend start)
4. Run Development Servers
Terminal 1 - Backend:
cd backend
cargo run
Terminal 2 - Frontend:
cd frontend
dx serve
The app will be available at http://localhost:8080
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgres://postgres:postgres@localhost/publisher |
FORGEJO_URL |
Your Forgejo instance URL | - |
FORGEJO_CLIENT_ID |
OAuth client ID | - |
FORGEJO_CLIENT_SECRET |
OAuth client secret | - |
JWT_SECRET |
Secret for JWT signing | - |
APP_URL |
Frontend URL for OAuth callback | http://localhost:8080 |
Usage
Publications View
- View all publications across companies
- Expandable rows for multi-branch publications
- Click cells to navigate to:
- Repository (opens Forgejo)
- CI/CD run (opens workflow)
- Domain mappings
Domains View
- Manage domains and subdomains
- Request-based workflow for DNS operations
- Expandable rows showing subdomains and mappings
DNS Operations (Ops only)
- Review pending DNS requests
- Mark requests as in-progress, completed, or rejected
- Add notes for tracking
Activity Feed
- Timeline of all operations
- Filter by company
- Real-time updates
Settings
- Account management
- User roles (Admin only)
- Company management (Admin only)
User Roles
| Role | Capabilities |
|---|---|
| Viewer | View publications, domains, and activity |
| Editor | Create/edit publications and request domains |
| Admin | Manage users, companies, and all settings |
| Ops | Process DNS requests |
Production Deployment
Backend
cd backend
cargo build --release
./target/release/publisher-backend
Frontend
cd frontend
dx build --release
# Serve the dist/ directory with your web server
Caddy Configuration
publisher.example.com {
# API proxy
handle /api/* {
reverse_proxy localhost:3001
}
# Frontend
handle {
root * /path/to/frontend/dist
try_files {path} /index.html
file_server
}
}
Development
Project Structure
shared/src/
├── models.rs # Data models
└── api.rs # API request/response types
backend/src/
├── main.rs # Server setup
├── config.rs # Configuration
├── db.rs # Database operations
├── forgejo.rs # Forgejo API client
├── error.rs # Error handling
├── middleware.rs # Auth middleware
└── handlers/ # Route handlers
frontend/src/
├── main.rs # App entry point
├── state.rs # Global state
├── api.rs # API client
├── components/ # Reusable UI components
└── views/ # Page views
Adding a New Publication Type
- Add variant to
PublicationTypeinshared/src/models.rs - Update the icon mapping in
frontend/src/views/publications.rs - Add any type-specific build configuration as needed
License
MIT