Skip to content

Commit

Permalink
Merge pull request #171 from membermatters/dev
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
jabelone authored May 27, 2022
2 parents e6d3330 + 816556d commit 02b4f23
Show file tree
Hide file tree
Showing 118 changed files with 15,049 additions and 48,232 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
TEST/
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
Expand Down Expand Up @@ -110,6 +111,9 @@ venv.bak/
/memberportal/media/

*.sqlite3
**/*.sqlite3
*.sqlite3.bak
**/*.sqlite3.bak

\.DS_Store

Expand All @@ -123,7 +127,6 @@ webpack-stats.json

frontend/src-capacitor/ios/App/App/Assets.xcassets/Splash.imageset/

frontend/.npmrc
memberportal/static/

.vscode
Expand All @@ -144,3 +147,7 @@ frontend/src-electron/icons/
tmp/
.ackrc
.terragrunt-cache/

errors.log*

setupcomplete
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,51 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v3.0.0] - 2022-05-27
### Removed
- All Xero support
- Legacy http API for door controllers
- Member Types (for use with Xero)
- Sentry (temporarily)
- Unnecessary environment variables

### Added
- Websocket API for access control devices (ping/pong, authorise, sync tags, log access, update device ip)
- Django pwned passwords
- Loading spinner while app / login page is loading
- Empty state to access permissions page
- Empty state to admin members list
- Some missing translation strings that were hardcoded in the app
- Redis support for Django channels
- Log failed door swipes to the database too
- User event, door and interlock logs to manage member screen

### Changed
- Upgraded to Vue 3, Qusar 2, all frontend dependencies updated
- Bumped backend dependencies
- Messaging around membership plan / payment plans to make it more clear
- References to "donate" to "make payment" as an exchange of money for goods/services is *not* a donation
- Tidied up manage member UI and made it cleaner
- Export mailing list translation to make it clearer

### Fixed
- Logging so it's actually useful now that we've moved to daphne
- Redirect on loging sometimes getting stuck
- Some forms not saving after modification
- Bug where member tier/plan translation string was not showing properly sometimes
- made manage member/tier page always go back one level
- History router mode broke in some cases
- Missing short name getter causing warnings logged
- Redirect to original URL if user is not logged in (after login)
- Some UI bugs in the billing workflow
- Minor UI bug with side menu border / scrolling
- Double filter dropdown showing on mobile manage members page
- UI issues with tiers list
- Loading states for door unlock/reboot buttons
- Typo in first joined date on digital ID
- Door checkin via websocket overriding door object in database
-

## [v2.8.0] - 2021-10-20
### Removed
- Sendgrid integration for email sending
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ MemberMatters is an open source membership and access management solution.
### Deprecation Warning
The following features have been removed:
* Sendgrid integration - please use our Postmark integration instead.

The following features have now been deprecated and will be removed in a **future** release:
* Xero integration
* Xero integration - please use Stripe billing to manage payments.

## Getting Started
See the [getting started](/docs/GETTING_STARTED.md) instructions for how to run the MemberMatters software for your
Expand Down
1 change: 0 additions & 1 deletion dev.env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
PORTAL_DOMAIN=https://portal.yourdomain.com
PORTAL_ENV=Development
31 changes: 15 additions & 16 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,9 @@ LABEL description="Base Dockerfile for the MemberMatters software."
VOLUME /usr/src/data/
VOLUME /usr/src/logs/

RUN mkdir -p /usr/src/app/frontend && mkdir -p /usr/src/logs && mkdir -p /usr/src/data
COPY memberportal/requirements.txt /usr/src/app/memberportal/requirements.txt
RUN mkdir -p /usr/src/app/frontend && mkdir /usr/src/logs && mkdir /usr/src/data

RUN apt-get update && apt-get install -y nginx curl build-essential gcc make
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

# Install python deps
WORKDIR /usr/src/app/memberportal/
RUN python -m pip install --upgrade pip
RUN pip3 install --no-cache-dir pillow
RUN pip3 install --no-cache-dir -r requirements.txt
RUN apt-get update -y && apt-get install -y nginx curl daphne

# Install Node
ENV NODE_VERSION=14.15.0
Expand All @@ -32,10 +24,15 @@ WORKDIR /usr/src/app/frontend/
COPY frontend/package* /usr/src/app/frontend/
RUN npm ci

COPY frontend /usr/src/app/frontend
COPY memberportal /usr/src/app/memberportal
COPY docker /usr/src/app/docker
COPY package.json /usr/src/app/package.json
ADD frontend /usr/src/app/frontend
ADD package.json /usr/src/app/package.json

# Install python deps
WORKDIR /usr/src/app/memberportal/
RUN python -m pip install --upgrade pip
ADD memberportal/requirements.txt /usr/src/app/memberportal/requirements.txt
RUN pip3 install --no-cache-dir pillow
RUN pip3 install --no-cache-dir -r requirements.txt

# Build our frontend
WORKDIR /usr/src/app/frontend/
Expand All @@ -44,12 +41,14 @@ RUN npm run build
# Remove our .npmrc
RUN rm -rf .npmrc

# collect static files from Django
# collect static files from Django and add the backend source code
ADD memberportal /usr/src/app/memberportal
WORKDIR /usr/src/app/memberportal/
RUN python3 manage.py collectstatic --noinput

# Copy over the nginx config and requirement files
COPY docker/nginx.conf /etc/nginx/nginx.conf
ADD docker/nginx.conf /etc/nginx/nginx.conf
ADD docker /usr/src/app/docker

# Expose the port and run the app
EXPOSE 8000
Expand Down
1 change: 0 additions & 1 deletion docker/caprover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ services:
restart: always
environment:
PORTAL_ENV: $$cap_env
PORTAL_DOMAIN: $$cap_url
volumes:
- $$cap_appname-data:/usr/src/data
caproverExtra:
Expand Down
3 changes: 2 additions & 1 deletion docker/container_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ if [ ! -f /usr/src/data/setupcomplete ]; then
touch /usr/src/data/setupcomplete
fi

exec gunicorn membermatters.wsgi:application --bind unix:/tmp/gunicorn.sock --access-logfile '/usr/src/logs/access.log' --error-logfile '/usr/src/logs/error.log' --workers 6
#exec gunicorn membermatters.wsgi:application --bind unix:/tmp/gunicorn.sock --access-logfile '/usr/src/logs/access.log' --error-logfile '/usr/src/logs/error.log' --workers 6
exec daphne -b 0.0.0.0 -p 8001 membermatters.asgi:application
3 changes: 2 additions & 1 deletion docker/container_start_no_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ cd memberportal
# We should migrate on startup in case there's been any db changes
python3 manage.py migrate

exec gunicorn membermatters.wsgi:application --bind unix:/tmp/gunicorn.sock --access-logfile '/usr/src/logs/access.log' --error-logfile '/usr/src/logs/error.log' --workers 6
exec daphne -b 0.0.0.0 -p 8001 membermatters.asgi:application
#exec gunicorn membermatters.wsgi:application --bind unix:/tmp/gunicorn.sock --access-logfile '/usr/src/logs/access.log' --error-logfile '/usr/src/logs/error.log' --workers 6
16 changes: 16 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3'

services:
mm_app:
image: mm:latest
ports:
- "8000:8000"
volumes:
- /Users/jabelone/mm/data:/usr/src/data
- /Users/jabelone/mm/logs:/usr/src/logs

environment:
PORTAL_ENV: "Production"

mm_redis:
image: redis:latest
46 changes: 29 additions & 17 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ http {

upstream app_server {
# for UNIX domain socket setups
server unix:/tmp/gunicorn.sock fail_timeout=10s;
server localhost:8001 fail_timeout=10s;
}

server {
Expand All @@ -41,33 +41,45 @@ http {
add_header Cache-Control 'no-cache, no-store, max-age=0, must-revalidate';

location / {
try_files $uri $uri/ /index.html;
try_files $uri $uri/ /index.html;
}

# allow caching of any file from the following directories
location ~ ^/(js|img|css)/ {
expires 30d;
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
expires 30d;
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}

# allow caching of any static file
location /static/ {
alias /usr/src/app/memberportal/membermatters/static/;
expires 30d;
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
alias /usr/src/app/memberportal/membermatters/static/;
expires 30d;
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}

location ~ ^/(api|admin) {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_real_ip;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_redirect off;
proxy_pass http://app_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $http_x_real_ip;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_redirect off;
proxy_pass http://app_server;
}

location /ws/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_pass http://app_server;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
1 change: 0 additions & 1 deletion docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ variables from. You'll need at least the following:

```
# /usr/app/env.list
PORTAL_DOMAIN=https://demo.membermatters.org
PORTAL_ENV=Production
```

Expand Down
3 changes: 1 addition & 2 deletions docs/POST_INSTALL_STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ A summary of the settings is available below. Most settings have a more detailed
* "ENTITY_TYPE" - [Deprecated]
* "GOOGLE_ANALYTICS_PROPERTY_ID" - Enter your Google Analytics Tracking ID to enable Google Analytics Tracking.
* "API_SECRET_KEY" - Secret key used to authenticate some requests from third party access control devices.
* "DEFAULT_MEMBER_TYPE" - The ID of the default member type to use when signing up.

#### Signup
* "INDUCTION_ENROL_LINK" - URL to enrol in the Canvas LMS induction course.
Expand Down Expand Up @@ -102,7 +101,7 @@ A summary of the settings is available below. Most settings have a more detailed
* "STRIPE_PUBLISHABLE_KEY" - the publishable Stripe key.
* "STRIPE_SECRET_KEY" - the secret Stripe key.
* "STRIPE_WEBHOOK_SECRET" - the webhook secret to authenticate webhook requests are really from Stripe.
* "ENABLE_STRIPE_MEMBERSHIP_PAYMENTS" - enable the "Membership Tiers" menu page on the front end so members can sign up with the Stripe billing integration. NOTE: make sure you configure these first from the "Admin Tools" > "Membership Tiers" page.
* "ENABLE_STRIPE_MEMBERSHIP_PAYMENTS" - enable the "Membership Plan" menu page on the front end so members can sign up with the Stripe billing integration. NOTE: make sure you configure these first from the "Admin Tools" > "Membership Plans" page.
* "STRIPE_MEMBERBUCKS_TOPUP_OPTIONS" - the options a member can see when on the MemberBucks top up page (in cents).

#### Trello Integration
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to MemberMatters's documentation!
Welcome to MemberMatters' documentation!
=========================================

.. toctree::
Expand Down
51 changes: 16 additions & 35 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const { resolve } = require('path');
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
Expand All @@ -12,49 +11,31 @@ module.exports = {
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#eslint
// Needed to make the parser take into account 'vue' files
extraFileExtensions: ['.vue'],
parser: '@typescript-eslint/parser',
project: resolve(__dirname, './tsconfig.json'),
extraFileExtensions: [".vue"],
parser: "@typescript-eslint/parser",
tsconfigRootDir: __dirname,
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module' // Allows for the use of imports
sourceType: "module", // Allows for the use of imports
},

env: {
browser: true
browser: true,
},

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',

// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',
// consider disabling this class of rules if linting takes too long

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/essential', // Priority A: Essential (Error Prevention)
// 'plugin:vue/strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier',
'prettier/@typescript-eslint',
'prettier/vue'
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-essential", // Priority A: Essential (Error Prevention)
"prettier",
],

plugins: [
// required to apply rules which need type information
'@typescript-eslint',
"@typescript-eslint",

// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
// required to lint *.vue files
'vue'
"vue",

// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
Expand All @@ -67,19 +48,19 @@ module.exports = {
__statics: true,
process: true,
Capacitor: true,
chrome: true
chrome: true,
},

// add your custom rules here
rules: {
'prefer-promise-reject-errors': 'off',
"prefer-promise-reject-errors": "off",

// TypeScript
quotes: ['warn', 'double', { avoidEscape: true }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
quotes: ["warn", "double", { avoidEscape: true }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
},
};
1 change: 0 additions & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
.npmrc
Loading

0 comments on commit 02b4f23

Please sign in to comment.