{"id":42743011,"url":"https://github.com/zechcodes/skrift","last_synced_at":"2026-05-09T22:22:23.444Z","repository":{"id":334803246,"uuid":"1140245701","full_name":"ZechCodes/Skrift","owner":"ZechCodes","description":"A lightweight CMS built with Litestar and SQLAlchemy","archived":false,"fork":false,"pushed_at":"2026-03-09T01:27:47.000Z","size":1463,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-09T06:54:09.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZechCodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"AUDIT-2026-02-15.md","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-23T02:37:57.000Z","updated_at":"2026-03-09T01:27:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ZechCodes/Skrift","commit_stats":null,"previous_names":["zechcodes/skrift"],"tags_count":77,"template":false,"template_full_name":null,"purl":"pkg:github/ZechCodes/Skrift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZechCodes%2FSkrift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZechCodes%2FSkrift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZechCodes%2FSkrift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZechCodes%2FSkrift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZechCodes","download_url":"https://codeload.github.com/ZechCodes/Skrift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZechCodes%2FSkrift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-29T19:02:56.367Z","updated_at":"2026-03-11T06:01:24.373Z","avatar_url":"https://github.com/ZechCodes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Skrift\n\n[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg?style=flat-square)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![Built with Litestar](https://img.shields.io/badge/Built%20with-Litestar-blue.svg?style=flat-square)](https://litestar.dev/)\n\nA modern Litestar-powered content management framework with multi-provider OAuth authentication, role-based access control, and WordPress-like template resolution.\n\n## Features\n\n- **Multi-Provider OAuth**: Authenticate with Google, GitHub, Microsoft, Discord, Facebook, or Twitter/X\n- **Role-Based Access Control**: Flexible permission system with Admin, Editor, Author, and Moderator roles\n- **Setup Wizard**: Guided first-time configuration without manual file editing\n- **Admin Interface**: Web-based management for users, pages, and site settings\n- **WordPress-like Templates**: Hierarchical template resolution for content pages\n- **Dynamic Controllers**: Load controllers from `app.yaml` configuration\n- **SQLAlchemy Integration**: Async database support with SQLite/PostgreSQL\n- **Client-Side Sessions**: Encrypted cookie sessions for horizontal scalability\n- **Hook/Filter System**: WordPress-like extensibility with async support\n- **SEO Metadata**: Built-in meta descriptions, OpenGraph tags, and robots directives\n- **Content Scheduling**: Schedule pages to publish at a future date\n- **Page Revisions**: Automatic content history with restore capability\n- **Sitemap \u0026 Robots.txt**: Auto-generated with filter extensibility\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.13+\n\n### Installation\n\n```bash\n# Install Skrift\npip install skrift\n\n# Or install from git\npip install git+https://github.com/ZechCodes/skrift.git\n```\n\n### Getting Started\n\nCreate a project directory and set up your environment:\n\n```bash\nmkdir mysite \u0026\u0026 cd mysite\n\n# Create minimal environment file\necho \"SECRET_KEY=$(python -c 'import secrets; print(secrets.token_urlsafe(32))')\" \u003e .env\n\n# Start Skrift\nskrift\n```\n\nOpen http://localhost:8080 to launch the setup wizard.\n\n### Setup Wizard\n\nThe setup wizard guides you through initial configuration:\n\n1. **Database Configuration**: Choose SQLite (dev) or PostgreSQL (production)\n2. **Authentication Providers**: Configure OAuth credentials\n3. **Site Settings**: Set site name, tagline, and copyright info\n4. **Admin Account**: Create your first admin user via OAuth login\n\nAfter completing the wizard, an `app.yaml` configuration file is created in your project directory.\n\n### Manual Configuration\n\nAlternatively, create `app.yaml` manually:\n\n```yaml\ncontrollers:\n  - skrift.controllers.auth:AuthController\n  - skrift.admin.controller:AdminController\n  - skrift.controllers.web:WebController\n\ndb:\n  url: sqlite+aiosqlite:///./app.db\n\nauth:\n  redirect_base_url: http://localhost:8080\n  providers:\n    google:\n      client_id: $GOOGLE_CLIENT_ID\n      client_secret: $GOOGLE_CLIENT_SECRET\n      scopes: [openid, email, profile]\n```\n\nThen run migrations and start the server:\n\n```bash\nskrift-db upgrade head\nskrift\n```\n\n## Documentation\n\n- **[Full Documentation](docs/README.md)**: Comprehensive guide covering all features\n- **[Deployment Guide](docs/deployment.md)**: VPS, Docker, and Kubernetes deployment\n- **[CSS Framework](docs/css-framework.md)**: Styling documentation\n\n## Project Structure\n\n```\nskrift/\n├── skrift/              # Main Python package\n│   ├── asgi.py          # Application factory\n│   ├── config.py        # Settings management\n│   ├── controllers/     # Route handlers (auth, web, sitemap)\n│   ├── admin/           # Admin panel\n│   ├── auth/            # RBAC and guards\n│   ├── db/              # Models and services\n│   │   ├── models/      # Page, User, Role, PageRevision\n│   │   └── services/    # page_service, revision_service\n│   ├── lib/             # Core utilities\n│   │   ├── hooks.py     # Hook/filter system\n│   │   ├── seo.py       # SEO metadata utilities\n│   │   ├── flash.py     # Enhanced flash messages\n│   │   └── template.py  # Template resolver\n│   └── setup/           # Setup wizard\n├── templates/           # Jinja2 templates\n├── static/              # Static assets\n├── alembic/             # Database migrations\n├── docs/                # Documentation\n├── app.yaml             # Application config (generated)\n└── main.py              # Development entry point\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `SECRET_KEY` | Yes | Session encryption key |\n| `DEBUG` | No | Enable debug mode (default: false) |\n| `DATABASE_URL` | No | Database connection string |\n| `OAUTH_REDIRECT_BASE_URL` | No | OAuth callback base URL |\n\nOAuth credentials are configured per-provider (e.g., `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`).\n\n### app.yaml\n\nApplication configuration is stored in `app.yaml` (generated by setup wizard):\n\n```yaml\ncontrollers:\n  - skrift.controllers.auth:AuthController\n  - skrift.admin.controller:AdminController\n  - skrift.controllers.web:WebController\n\ndb:\n  url: $DATABASE_URL\n  pool_size: 5\n\nauth:\n  redirect_base_url: $OAUTH_REDIRECT_BASE_URL\n  providers:\n    google:\n      client_id: $GOOGLE_CLIENT_ID\n      client_secret: $GOOGLE_CLIENT_SECRET\n```\n\nEnvironment variables (prefixed with `$`) are interpolated at runtime.\n\n## Deployment\n\n### Minimal VPS Deployment\n\n```bash\n# Install Skrift\npip install skrift\n\n# Create project directory\nmkdir -p /opt/skrift \u0026\u0026 cd /opt/skrift\n\n# Configure environment\ncat \u003e .env \u003c\u003c EOF\nSECRET_KEY=$(python -c \"import secrets; print(secrets.token_urlsafe(32))\")\nDATABASE_URL=sqlite+aiosqlite:///./app.db\nOAUTH_REDIRECT_BASE_URL=https://yourdomain.com\nEOF\n\n# Start server (use setup wizard or create app.yaml manually)\nskrift\n```\n\n### Production with Hypercorn\n\n```bash\nhypercorn skrift.asgi:app --workers 4 --bind 0.0.0.0:8080\n```\n\nSee the [Deployment Guide](docs/deployment.md) for detailed instructions including Docker, Docker Compose, and Kubernetes deployments.\n\n## Database Migrations\n\n```bash\n# Apply migrations\nskrift-db upgrade head\n\n# Create new migration\nskrift-db revision --autogenerate -m \"description\"\n\n# Rollback\nskrift-db downgrade -1\n```\n\n## Template Resolution\n\nTemplates follow WordPress-like hierarchical resolution:\n\n| URL Path | Templates Tried |\n|----------|-----------------|\n| `/about` | `page-about.html` -\u003e `page.html` |\n| `/services/web` | `page-services-web.html` -\u003e `page-services.html` -\u003e `page.html` |\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Submit a pull request\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzechcodes%2Fskrift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzechcodes%2Fskrift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzechcodes%2Fskrift/lists"}