README.md 3.58 KB
Newer Older
Jakob Sinclair's avatar
Jakob Sinclair committed
1
# MemberPort
Jakob Sinclair's avatar
Jakob Sinclair committed
2

3
A membership management system, written in Python with the [Tornado web-framework](https://www.tornadoweb.org/en/stable/) and [ORY Kratos](https://www.ory.sh/kratos) as the authentication and identification handler.
4

5
## Deployment
6

7 8 9 10 11 12 13 14 15 16 17 18 19
This project uses [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/). Every docker image in use can be found in the `docker-compose.yml` file. To build the `member-port` docker image use the command:

```
docker build . --no-cache -t member-port:latest
```

This will update all the python dependencies to their latest versions. To run the project, simply run:

```
docker-compose up
```

If you want to remove all Docker volumes afterwards then run:
20

21 22 23 24 25
```
docker-compose down -v
docker-compose rm -fsv
```

26 27
## Development

Jakob Sinclair's avatar
Jakob Sinclair committed
28
The default Docker setup is configured as a development environment currently. After running MemberPort for the first time, a config file will be created: `config/config.ini`. In this config file, set debug mode on:
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

```
debug = on
```

To setup up the database with the default values, use the following:

```
[PostgreSQL]
hostname = postgres-db
dbname = memberportdb
username = super
password = super
```

Jakob Sinclair's avatar
Jakob Sinclair committed
44
By default MemberPort should be available on `http://127.0.0.1:8888/`.
45 46 47

The Tornado server will restart automatically with debug mode on when a change to a source file is detected.

48 49 50 51
### Assets

Webpack is used to bundle Javascript and Sass files. Install nodejs and run `npm i` when setting up the project. To compile the assets on every file change run `npm run watch`.

Jakob Sinclair's avatar
Jakob Sinclair committed
52 53 54 55 56 57 58 59
### Unit tests

You can run tests with this command:

```
python -m app.test.runtests
```

60
## Contribution
61

62 63 64 65 66 67 68 69 70 71 72
This section will describe how to contribute to this project.

### Issues

Issues should be created for bug fixes, suggestions, requirements, discussions etc. Use appropiate labels for the issues.

Currently there are 7 design sections and each issue should be tagged with an appropiate section. The sections are:

- Administration, change settings, creating reports, export members etc
- Communication, sending messages to members etc
- General, features that do not fit the other sections
Jakob Sinclair's avatar
Jakob Sinclair committed
73
- Geography, municipalities, countries, areas etc
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
- Membership, handling of memberships in the system
- Organization, choose names for organizations, deal with settings for each organization etc
- Roles, permission management etc

### Merge requests

All changes need to be submitted though pull requests and the issue should be referenced.

- Create a new branch with a name related to the issue
- Create a merge request from the branch to the `develop` branch
- Wait for a code review
- If the changes are approved, they will be merged

### Commit messages

The commit message should follow this standard:

```
tag: Short description (issue number)

Long description
```

* tag: What type of change it is, e.g. feature, refactor, bugfix.
  - feat: new functionallity
  - fix: fixes erroneous functionallity
  - refactor: no functionallity change but nicer looking code
  - config: changes to the build process, e.g. docker etc
  - docs: documentation changes
  - ci: changes to the continuous integration
  - misc: other changes, e.g. README
* issue number: Which issue it relates to, must begin with a hashtag.
* Short description: Should not be longer than 70 characters. Should be written in imperative mood.
* Long description: OPTIONAL, if a longer description is needed write in whatever format you want.

#### Example

```
docs: Add a contribution guide to README (#3)
```
114 115 116

## License

Jakob Sinclair's avatar
Jakob Sinclair committed
117
MemberPort is licensed under GNU GPLv3. For more information, see the file `LICENSE`.