Features
- Integrated with strapi-plugin-mux-video-uploader
- Organize courses in categories, modules and lectures
- Process payments with Stripe's checkout page
Transform your Strapi app into a Learning Management System to create and sell courses online effortlessly.
In the root of your Strapi application:
npm i strapi-plugin-maestro
Once installed, set the following values in your project's .env
:
ACCESS_TOKEN_ID={Mux access token ID}
ACCESS_TOKEN_SECRET={Mux secret key}
WEBHOOK_SIGNING_SECRET={Mux webhook signing secret}
SIGNING_KEY_ID={Mux signing Key ID}
SIGNING_KEY_PRIVATE_KEY={Mux base64-encoded Private Key}
STRIPE_SECRET_KEY={Stripe secret key}
STRIPE_CHECKOUT_SUCCESS_URL={Frontend checkout success URL}
STRIPE_CHECKOUT_CANCEL_URL={Frontend checkout cancel URL}
Then add the following in config/plugins.ts
:
export default ({ env }: { env: any }) => ({
"maestro": {
enabled: true,
config: {
stripeSecretKey: env('STRIPE_SECRET_KEY'),
checkoutSuccessUrl: env('STRIPE_CHECKOUT_SUCCESS_URL'),
checkoutCancelUrl: env('STRIPE_CHECKOUT_CANCEL_URL'),
}
},
"mux-video-uploader": {
enabled: true,
config: {
accessTokenId: env('ACCESS_TOKEN_ID'),
secretKey: env('ACCESS_TOKEN_SECRET'),
webhookSigningSecret: env('WEBHOOK_SIGNING_SECRET'),
playbackSigningId: env('SIGNING_KEY_ID'),
playbackSigningSecret: env('SIGNING_KEY_PRIVATE_KEY'),
}
}
});
That's it! Start the server with npm run develop
.
Enable endpoints in the Users & Permissions plugin for Maestro.
Creating courses is done through the Strapi Admin Dashboard.
The Maestro plugin exposes a REST API for managing and consuming courses, categories, orders, and user progress. Below are the available endpoints.
Method | Path | Auth | Description |
---|---|---|---|
GET | /categories/index | Public | List all categories with thumbnails and courses. |
GET | /categories/:slug | Public | Get a category by slug with courses. |
Method | Path | Auth | Description |
---|---|---|---|
GET | /courses | Public | All courses with thumbnails, modules, lectures, and metadata. |
GET | /courses/:slug | Public | Course by slug with modules/lectures and details. |
GET | /courses-slugs | Public | List of all course slugs. |
GET | /course-details/:courseId | Authenticated | Students count and user progress. |
GET | /courses/:courseId/classes-completed | Authenticated | Lectures completed by the user. |
GET | /courses/:courseId/get-current-lecture | Authenticated | Current lecture to resume. |
GET | /courses/:courseId/resume-course | Authenticated | Return the next lecture to watch. |
GET | /courses/:courseId/get-play-auth-lecture | Authenticated | Play authorization for a lecture video. |
PUT | /courses/:courseId/check-lecture | Authenticated | Mark a lecture as completed. |
GET | /my-items-purchased | Authenticated | IDs of purchased courses. |
GET | /my-learning | Authenticated | Full info for purchased courses. |
Method | Path | Auth | Description |
---|---|---|---|
GET | /orders | Authenticated | List all orders for the user. |
GET | /orders/:id | Authenticated | Get an order by ID (must belong to user). |
POST | /orders | Public or Authenticated | Create order for one or more courses. Supports guest checkout with email . |
PUT | /orders/confirm | Public | Confirm order after payment (webhook/redirect). |
PUT | /orders/confirm-with-user | Authenticated | Confirm order for the authenticated user. |
PUT | /orders/finish-register | Public | Finish registration after guest checkout confirmation. |
See server/src/content-types/
for full schema details.
If you find a bug or need support, please open an issue at github.com/luisguve/strapi-plugin-maestro