Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fkadeal/headless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Headless CMS

A Laravel-based headless CMS with Filament admin panel. This project provides both API authentication for external clients and a web-based admin interface for content management.

Laravel Filament License: MIT

Features

  • API-First Architecture: Full REST API for managing content
  • Admin Panel: Intuitive Filament-based content management
  • Content Types: Posts, Categories, and Tags with relationships
  • Authentication: Token-based API authentication with Sanctum
  • Flexible: Easy to extend and customize for your needs

Quick Start

Prerequisites

  • PHP 8.2+
  • Composer
  • Database (SQLite, MySQL, PostgreSQL)

Installation

  1. Clone the repository:
git clone https://github.com/fkadeal/headless.git
cd headless
  1. Install dependencies:
composer install
npm install
  1. Set up environment:
cp .env.example .env
php artisan key:generate
  1. Configure your database in .env file

  2. Run migrations:

php artisan migrate
  1. Start the development server:
php artisan serve

API Documentation

The CMS provides a comprehensive API for managing content:

Authentication

  • POST /api/login - Get API token
  • POST /api/logout - Revoke token

Content Management

  • GET /api/posts - List posts
  • POST /api/posts - Create post (auth required)
  • GET /api/posts/{id} - Get single post
  • PUT/PATCH /api/posts/{id} - Update post (auth required)
  • DELETE /api/posts/{id} - Delete post (auth required)

Similar endpoints are available for categories and tags.

Admin Panel

Access the admin panel at /admin to manage your content through an intuitive interface.

Architecture

Models

  • Post: Content with title, slug, content, excerpt, category, tags, publishing status
  • Category: Hierarchical categories for organizing content
  • Tag: For content tagging and filtering

Relationships

  • Posts belong to Categories
  • Posts have many Tags (many-to-many)
  • Categories can be hierarchical (parent-child)

Documentation

Contributing

Fork the repository, create a feature branch, and submit a pull request.

Author

Fkadeal Matiwos - GitHub Profile

License

This project is open source and available under the MIT License.

Support

For support, please open an issue on the GitHub repository.

About

headless cms sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages