evgip/w3a

A custom modular PHP MVC forum matching the HMVC pattern.

Maintainers

Package info

github.com/evgip/w3a

Type:project

pkg:composer/evgip/w3a

Transparency log

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 1

v0.2.2 2026-08-19 11:49 UTC

This package is auto-updated.

Last update: 2026-08-22 15:11:14 UTC


README

πŸ‡¬πŸ‡§ English | πŸ‡·πŸ‡Ί Русский

Open-source Medium-style platform for authors and readers

Publish articles, discuss, follow authors β€” no ads, no algorithmic traps.

PHP MySQL License Editor.js

Demo Β· Installation Β· Structure Β· Contributing

πŸ“– About

W3A is an independent platform where authors publish in-depth articles, share experience, and engage in meaningful discussions.

The project focuses on:

  • 🎯 Content quality over virality
  • πŸ‘€ Reader control over their own feed
  • πŸ”’ Privacy without trackers and data selling
  • πŸ—οΈ Open source and extensible architecture

✨ Key Features

πŸ“° For Readers

  • Smart feed with four sections: recommendations, trending, staff picks, new publications
  • Personalization through subscriptions to authors and tags
  • Bookmarks and reading history
  • Dark theme with automatic system preference detection
  • RSS feeds for any section

✍️ For Authors

  • Block editor based on Editor.js (headings, lists, quotes, code, images)
  • Paywall β€” hide part of an article for subscribers only
  • Statistics on views and reading time
  • Subscribers and notifications about new comments

πŸ’¬ Discussions

  • Threaded comments sorted by Wilson Score
  • Voting on articles and comments
  • Karma system and moderation
  • Reports and edit suggestions

πŸ›‘οΈ Moderation

  • Staff Picks β€” curated collections
  • Flag system for reports
  • Moderation log with full history
  • Edit suggestions from the community

πŸ–Ό Screenshots

W3A home

W3A admin

πŸ— Architecture

The project is built on a custom MVC framework w3a-core with a modular architecture.

Tech Stack

Component Technology
Backend PHP 8.1+
Framework w3a-core (custom, PSR-compliant)
Database MySQL 5.7+ / MariaDB 10.3+
Frontend Vanilla JS (no heavy libraries)
Editor Editor.js 2.30+
Caching FileCache (custom, no Redis)
Styles Custom CSS framework (Medium-style)

Project Modules

app/Modules/
β”œβ”€β”€ Stories/          # Articles: CRUD, recommendations, trending, Staff Picks
β”œβ”€β”€ Comments/         # Comments: tree, Wilson Score, editing
β”œβ”€β”€ Votes/            # Voting for articles and comments
β”œβ”€β”€ Users/            # Profiles, settings, karma
β”œβ”€β”€ Auth/             # Registration, login, password recovery
β”œβ”€β”€ Subscriptions/    # Subscriptions to authors and tags
β”œβ”€β”€ Notifications/    # Real-time notifications
β”œβ”€β”€ Messages/         # Private messages
β”œβ”€β”€ Saved/            # Bookmarks
β”œβ”€β”€ Muted/            # Mute lists
β”œβ”€β”€ Flags/            # Content reports
β”œβ”€β”€ Suggestions/      # Edit suggestions
β”œβ”€β”€ Tags/             # Tags and categories
β”œβ”€β”€ Wiki/             # Wiki pages for tags
β”œβ”€β”€ Search/           # Full-text search
β”œβ”€β”€ Stats/            # Statistics
β”œβ”€β”€ Mod/              # Moderation tools
β”œβ”€β”€ Admin/            # Admin panel
β”œβ”€β”€ Invitations/      # Invitation system
β”œβ”€β”€ Rss/              # RSS feeds
└── Common/           # Common components (Layout, CacheHelper)

πŸš€ Installation

Requirements

  • PHP 8.1+ with extensions: pdo_mysql, mbstring, json, fileinfo
  • MySQL 5.7+ or MariaDB 10.3+
  • Composer
  • Web server (Apache/Nginx)

Installation Steps

1. Clone the repository

git clone https://github.com/your-username/w3a.git
cd w3a

2. Install dependencies

composer install

3. Configure the environment

cp .env.example .env

Edit .env:

APP_NAME=W3A
APP_URL=http://localhost
APP_ENV=development

DB_HOST=127.0.0.1
DB_NAME=w3a
DB_USER=root
DB_PASS=

INVITATIONS_ENABLED=false

4. Create the database

CREATE DATABASE w3a CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

5. Import the schema

mysql -u root -p w3a < database/schema.sql

6. Create required directories

mkdir -p storage/cache/data
mkdir -p storage/logs
mkdir -p public/uploads/avatars
chmod -R 755 storage public/uploads

7. Configure the web server

The document root should point to public/:

Nginx:

server {
    listen 80;
    server_name w3a.local;
    root /path/to/w3a/public;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

8. Open the website

Go to http://localhost and register the first user β€” they will automatically receive administrator privileges.

βš™οΈ Configuration

Main Config Files

File Purpose
app/Config/app.php General application settings
app/Config/database.php Database connection
app/Config/cache.php Caching settings
app/Config/storage.php File storage disks
app/Config/security.php Rate limiting, CSRF
app/Config/invitations.php Invitation system

Rate Limiting

Spam protection is enabled by default:

  • Global: 100 requests/min per IP
  • For authenticated users: 300 requests/min
  • Registration: 5 attempts/hour
  • Comments: 30/min

Settings in app/Config/security.php.

πŸ“š Usage

Writing an Article

  1. Log in to your account
  2. Click "βž• Create" in the header
  3. Start with a heading (H1 or H2)
  4. Add content via the block editor:
    • / β€” block menu
    • Ctrl+Shift+C β€” inline code
    • Ctrl+Shift+K β€” code block
  5. Select tags
  6. Click "Publish"

Paywall (Restricted Content)

  1. In the editor, add a "πŸ”’ Lock" block
  2. Everything below the lock will only be available to:
    • Authenticated users (members)
    • Or only the author's subscribers (subscribers)

Staff Picks

Administrators can feature the best articles:

  1. Open an article
  2. Menu β‹― β†’ "⭐ Add to Staff Picks"
  3. The article will appear in the sidebar on the home page

πŸ—Ί Roadmap

  • Editor.js block editor
  • Karma and voting system
  • Subscriptions to authors and tags
  • Staff Picks (editorial selection)
  • Paywall for restricted content
  • Recommendations and trending
  • Dark theme
  • Caching
  • Email digest of the best articles
  • PWA support
  • Push notifications
  • Two-factor authentication
  • Export articles to Markdown/PDF
  • Collaborative editing

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'feat: add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Code Style

  • PSR-12 for PHP
  • Comments in Russian or English
  • Tests for new features (PHPUnit)

πŸ›‘ Security

If you find a vulnerability, do not create a public Issue. Write to budo@narod.ru β€” we will respond within 48 hours.

πŸ“„ License

Distributed under the MIT license.

πŸ™ Acknowledgments

  • Editor.js β€” block editor
  • Medium β€” design inspiration
  • Lobste.rs β€” open architecture
  • The PHP community for great tools

Made with ❀️ for the community

Report a bug Β· Suggest an idea Β· Discuss