Vue 2 plugin for the Better Together Community Engine platform. Provides shared components, Vuex store modules, Vue Router routes, and API clients for Better Together host applications.
Note: This package targets Vue 2. A Vue 3 migration is planned — see Migration Plan.
yarn add @bettertogether/community-engine-vue
# or
npm install @bettertogether/community-engine-vueRegister the plugin in your app's entry point:
import Vue from 'vue'
import CommunityEngineVue from '@bettertogether/community-engine-vue'
Vue.use(CommunityEngineVue)Import and spread the provided routes into your own router:
import { BtRoutes } from '@bettertogether/community-engine-vue'
const router = new VueRouter({
mode: 'history',
routes: [
...BtRoutes,
// your app's own routes
],
})Import and merge the provided store modules and plugins:
import { BtStoreModules, BtStorePlugins } from '@bettertogether/community-engine-vue'
export default new Vuex.Store({
modules: { ...BtStoreModules },
plugins: [...BtStorePlugins],
})| Variable | Default | Description |
|---|---|---|
VUE_APP_BETTER_TOGETHER_API_URI |
http://localhost:3000 |
Base URL of the Community Engine Rails API |
| Component | Description |
|---|---|
BtHeader |
App header with branding and navigation |
BtNavBar |
Navigation bar |
BtNavItem |
Individual nav link |
BtNavUser |
Authenticated user menu |
BtBrandingLogo |
Logo component |
BtMainContent |
Main layout wrapper / router-view host |
BtUserSignInForm |
Login form |
BtUserSignUpForm |
Registration form |
BtUserResetPasswordForm |
Password reset request form |
BtUserNewPasswordForm |
New password form (token-based) |
BtUserResendConfirmationForm |
Resend confirmation email form |
BtProfileForm |
User profile editing form |
CommunityForm |
Community creation/editing form |
All modules are namespaced under CommunityEngine/:
| Module | Namespace | Description |
|---|---|---|
| Authentication | CommunityEngine/Authentication |
Login state, current user |
| Communities | CommunityEngine/Communities |
Community data |
| Menus | CommunityEngine/Menus |
Header and nav menu items |
| People | CommunityEngine/People |
User/person profiles |
| Path | Name |
|---|---|
/ |
Home |
/me |
Me (user profile) |
/users/sign-in |
Sign In |
/users/sign-up |
Sign Up |
/users/password/reset |
Reset Password |
/users/password/new |
New Password |
/users/confirmation/resend |
Resend Confirmation |
/users/confirmation |
Account Confirmation |
# Install dependencies
yarn install
# Start dev server
yarn serve
# Build for production
yarn build
# Run E2E tests
yarn test:e2e
# Run unit tests
yarn test:unit
# Lint
yarn lintMigration to Vue 3 is planned. Key changes will include:
- Vue 2 → Vue 3 (with
@vue/compatbridge phase) - Vuex → Pinia
- Vue Router 3 → Vue Router 4
- BootstrapVue 2 → BootstrapVue Next (or Oruga + Bootstrap 5)
- Webpack (Vue CLI) → Vite
- Options API → Composition API (
<script setup>) - Auth guards rewritten as reactive Pinia-based
beforeEachcallbacks
LGPL-3.0-or-later