Content Publishing Workflow System (Draft → Review → Publish)

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Content Publishing Workflow System Development (draft → review → publication)

A content workflow system manages the publication lifecycle. Instead of direct publishing by any user — configured process: draft → review → approval → publication → archiving. Critical for publications, corporate blogs, and user-generated content platforms.

Statuses and Transitions

draft → review → approved → published → archived
  ↑                ↓
  └── rejected ←───┘
  └── revision_needed ←───── (partial return)
content_states (
  id, content_type, content_id,
  status: draft | review | approved | published | rejected | archived | scheduled,
  assigned_to (editor/moderator id),
  comment,          -- rejection comment
  scheduled_at,     -- publication date for scheduled
  published_at, archived_at,
  transitioned_by, transitioned_at
)

content_state_history (
  id, content_type, content_id,
  from_status, to_status,
  changed_by, comment, changed_at
)

Defining Allowed Transitions

class ContentWorkflow
{
    private array $transitions = [
        'draft'    => ['review'],
        'review'   => ['approved', 'rejected', 'revision_needed'],
        'approved' => ['published', 'scheduled'],
        'rejected' => ['draft'],
        'revision_needed' => ['draft'],
        'published'=> ['archived', 'draft'],  // return to draft = depublication
        'scheduled'=> ['published', 'draft']
    ];

    private array $permissions = [
        'draft → review'    => 'content.submit_for_review',
        'review → approved' => 'content.approve',
        'review → rejected' => 'content.approve',
        'approved → published' => 'content.publish'
    ];

    public function canTransition(User $user, Content $content, string $toStatus): bool
    {
        $fromStatus = $content->status;
        if (!in_array($toStatus, $this->transitions[$fromStatus] ?? [])) {
            return false;
        }

        $permKey = "{$fromStatus} → {$toStatus}";
        if (isset($this->permissions[$permKey])) {
            return $user->can($this->permissions[$permKey]);
        }

        return true;
    }

    public function transition(Content $content, string $toStatus, User $actor, ?string $comment = null): void
    {
        if (!$this->canTransition($actor, $content, $toStatus)) {
            throw new WorkflowException("Transition {$content->status} → {$toStatus} unavailable");
        }

        DB::transaction(function () use ($content, $toStatus, $actor, $comment) {
            ContentStateHistory::create([
                'content_type' => get_class($content),
                'content_id'   => $content->id,
                'from_status'  => $content->status,
                'to_status'    => $toStatus,
                'changed_by'   => $actor->id,
                'comment'      => $comment
            ]);

            $content->update([
                'status'       => $toStatus,
                'published_at' => $toStatus === 'published' ? now() : $content->published_at
            ]);

            event(new ContentStatusChanged($content, $toStatus, $actor, $comment));
        });
    }
}

Reviewer Assignment

// On review submission — auto-assign free editor
class AssignReviewer
{
    public function assign(Content $content): User
    {
        $reviewer = User::where('role', 'editor')
            ->withCount(['assignedContent' => fn($q) => $q->where('status', 'review')])
            ->orderBy('assigned_content_count')  // least loaded
            ->first();

        $content->update(['assigned_to' => $reviewer->id]);
        $reviewer->notify(new ContentAssignedForReview($content));

        return $reviewer;
    }
}

Deadlines and Reminders

// Scheduled job: find content pending review for more than X hours
$overdue = Content::where('status', 'review')
    ->where('submitted_for_review_at', '<', now()->subHours(24))
    ->get();

foreach ($overdue as $content) {
    $content->assignedEditor?->notify(new ReviewOverdueNotification($content));
    Notification::sendToRole('chief_editor', new EscalationNotification($content));
}

Scheduled Publishing

class PublishScheduledContent implements ShouldQueue
{
    public function handle(): void
    {
        Content::where('status', 'scheduled')
            ->where('scheduled_at', '<=', now())
            ->each(function (Content $content) {
                app(ContentWorkflow::class)->transition(
                    $content, 'published', User::find($content->created_by)
                );
            });
    }
}

Job runs every 5 minutes via scheduler.

Editorial Dashboard Interface

Columns by status (Kanban-like view) or list with filters. For each entry:

  • Current status and responsible person
  • Available transition buttons (depend on role)
  • Moderator comments
  • Status change history

Development timeline: 3–5 weeks for full workflow system with roles, assignment, deadlines, and history.