Welcome to the Plugn project. This document will help you get started as a developer across the main Plugn repositories: plugn (Yii2 backend), plugn-dashboard-ionic, plugn-ionic, plugn-store, plugn-store-community, and plugn-microservices.
What is Plugn?#
Plugn is a full-stack platform designed to deliver modular, scalable e-commerce and community experiences. It provides a Yii2-based backend for business logic and APIs, a suite of microservices for auxiliary and cloud functions, and multiple frontends (Ionic and Vue) for different user roles and interfaces. Plugn integrates with cloud storage, messaging, and payment providers to support modern e-commerce and collaboration needs.
Architecture#
The Plugn system is organized in three main layers:
- The backend provides core APIs and business logic.
- Microservices handle specialized or asynchronous tasks.
- Frontends (Ionic/Vue) deliver user interfaces for different audiences.
Local Development Startup Order#
- Start the backend (
plugn) first. This provides the main API and business logic. - Start any required microservices (
plugn-microservices). These depend on the backend and provide auxiliary features. - Start the frontends (
plugn-dashboard-ionic,plugn-ionic,plugn-store,plugn-store-community). These connect to the backend and microservices.
Shared Services#
The backend integrates with several shared services:
- AWS S3: Used for file storage, specifically the
plugn-public-anyone-can-upload-24hr-expirybucket for public uploads with 24-hour expiry. - Slack: Webhooks and channels are used for notifications and alerts.
- Payment Gateways: The backend connects to payment providers to process transactions.
These services are primarily consumed by the backend (plugn), but some frontends may require access to public S3 endpoints or payment gateway keys for client-side operations.
Optional / Auxiliary Repositories#
You can ignore the following during onboarding:
plugn-store-sdk: SDK for store integrations, not required for core development.plugn-device: Device-specific integrations, not part of the main onboarding flow.
What to Configure#
Each repository may require environment variables for local development. The most common are:
- AWS S3:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION,AWS_S3_BUCKET(backend, sometimes frontend for direct uploads) - Slack:
SLACK_WEBHOOK_URL,SLACK_CHANNEL(backend) - Payment Gateways:
PAYMENT_GATEWAY_KEY,PAYMENT_GATEWAY_SECRET(backend, sometimes frontend for client-side payments) - Database:
DB_HOST,DB_USER,DB_PASSWORD,DB_NAME(backend) - API URLs:
API_BASE_URL,MICROSERVICES_URL(frontends)
Who needs them:
- The backend (
plugn) requires all AWS, Slack, payment, and database variables. - Microservices (
plugn-microservices) may require their own service-specific variables. - Frontends require API URLs and, if handling direct uploads or payments, public S3 and payment keys.
Check each repo’s .env.example or README for the exact variable names and required values.
For further details on setup and configuration, refer to each repository’s README and configuration files.