Strapi plugin logo for Voting

Voting

A simple voting system allowing users to vote for enabled content type's entities.

Strapi Voting

A plugin for Strapi Headless CMS that provides a simple voting system together with a moderation panel and logs.

✨ Features

  • Any Content Type relation: Voting system can be linked to any of your content types, both collection and single.
  • Voting modes: Allows users to either vote once per day per for one entity out of the collection, once per day per every entity of the collection or customizable per specific needs.
  • Moderation Panel: Search and filter through the logs and see various voting statistics.
  • Simple to use and change: Plugin is designed to provide a simple and seamless experience with extensive configuration compatabilities.

⏳ Installation

(Use npm to install this plugin within your Strapi project (recommended). Install npm with these docs.)

npm install strapi-plugin-voting@latest

After successful installation you've to build a fresh package that includes plugin UI. To achieve that simply use:

npm run build
npm run develop

or just run Strapi in the development mode with --watch-admin option:

npm run develop --watch-admin

The Voting plugin should appear in the Plugins section of Strapi sidebar after you run app again.

🕸️ Public REST API specification

Vote

POST <host>/voting/api::<collection name>.<content type name>:<entity id>

Vote for a specific entity of a content type, for example Page with ID: 1.

Everytime You call this endpoint, on success, selected entities votes field will be increased by +1 and a user and a votelog will be created accordingly.

Example URL: https://localhost:1337/voting/api::page.page:1/vote

Example response body

1{
2  "createdAt": "2022-04-26T12:50:49.954Z",
3  "id": 1,
4  "publishedAt": "2022-04-26T12:50:50.600Z",
5  "title": "Apple pie",
6  "updatedAt": "2022-04-28T12:17:45.893Z",
7  "votes": 64
8}

Enjoy 🎉

Install now

npm install strapi-plugin-voting

STATS

7 GitHub stars10 weekly downloads

Last updated

134 days ago

Strapi Version

Unavailable

Author

github profile image for Karolis Stakėnas
Karolis Stakėnas

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.