Meh…
Meh is a commenting system with a client-server architecture:
Server Component: A PHP backend that handles comment storage (in SQLite), moderation, and API endpoints. It can be installed on your own server and supports multiple sites from a single installation.
Client Components: A set of web components (custom HTML elements) that can be embedded in any website to display and submit comments. These components communicate with the server via a REST API.
A quick and dirty way to get started is to use the built-in PHP server on your local machine.
cd backend
composer install
cd ../frontend
npm install
npm run build
cd ..
cp .env.example .env
$EDITOR .env
./meh migrate
php -S localhost:8000 -t public
You can now browse this documentation at http://localhost:8000
. It will also serve the Meh components and the API.
In your blog, add the following to your HTML:
<!-- Add a comment form -->
<script type="module" src="http://localhost:8000/meh/meh.esm.js"></script>
<meh-form>
<meh-mastodon></meh-mastodon>
<meh-login></meh-login>
</meh-form>
<meh-comments></meh-comments>
This should give you a rough idea how Meh works. For a production setup, you should point your web server at the public
directory.
More details on how to set up the server can be found in the Server Setup section.
Check out open-source self-hosted comments for a static website for a big list of similar projects.