Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
RignonNoel committed Jun 18, 2020
1 parent 325b0a4 commit fb7b4f5
Show file tree
Hide file tree
Showing 11 changed files with 268 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,14 @@ services:
ports:
- 8000:8000

documentation:
restart: always
build: ./
command: "mkdocs serve"
volumes:
- .:/opt/project
ports:
- "8001:8001"

volumes:
db:
27 changes: 27 additions & 0 deletions docs/api/memberships.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Duration

Membership are most of the time defined to 1 year in Thesez-Vous but you're free to define a different duration to each
memberships of the platform. This allow you, for example, to create a membership of 3 month only or of 2 years.

## Limitation on academic levels

All the membership created inside the platform are available on conditions based on user's academic level. You can
set it available to only one or multiple membership but it's also possible to set it available to everybody by adding
no one academic level in the academic level field of the membership.

!!! warning
User can define his academic level during his registration but have no way to edit it after. It's a limitation
since some users can submit error on their profile during the registration or can have some changes in their
status in the future.

## Renewal of membership

There is no auto-renewal of membership in the platform but members have the right to renew their membership 30
days before the end of their memberships.

When user renew before the end of his memberships the new membership will be the one selected of the user but the
duration will be the duration of membership selected in addition to the time remaining of the old membership.

!!! warning
If user bought a membership for 10$ and renew 30 days before to a membership at 100$ he got 30 days of a
better membership without paying the difference. You always need to keep that in mind in case of specific usage.
48 changes: 48 additions & 0 deletions docs/api/retreats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Limitation on memberships

Retreats can be limited to specific memberships in order to force user buy membership before access specific retreat.

You can limit retreat to one or multiple memberships, or you can let it available to everyone by not selecting
any memberships in the memberships field of the retreat.

!!! tip
Limitation on memberships work on membership already active on the user but also on membership in his cart at
the moment he buy the retreat. This allow the user to buy a specific membership AND a retreat limiter to this
specific membership at the same time with only one financial transaction.

## Hidden retreat

Hidden retreats are retreat only available by invitation links that are not public as long as everybody share
it properly. They are exactly as a default retreat but they are only available from the invitations link.

To create an hidden retreat you just need to create a retreat and define it as `hidden` in its attributes

## Invitation link

Invitation link allow user to reserve the retreat from a specific link and can contain some privileges to help sales.
They are used in multiples context as for reserve place for a subset of user or to handle hidden retreat.

When you create a retreat invitation, you will need to ask you some questions:

**What is a proper internal name to be able to differentiate each invitation link**

It's important to have a good management of the links since deadlines and money are to take in context

**How many people can reserve place from this link at maximum**

It's really important in case your retreat is an hidden retreat since it will not be available from the default
flow of the platform.

**Do you want this invitation to have reserved place in the retreat**

If you active this option it will block the invitation link number of places on the default flow, so people using
the link are sure to have the number of place defined in the link even if people without link tried to reserve
places before them.

## virtual retreat

Virtual retreats are a type of retreat that allow user to access video-conference link in case they reserve a place
to the retreat.

The link of the video-conference is visible 30 minutes before the beginning of the retreat, in order to let him some
time of setup if necessary
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Wait Queue Management

This document is here to illustrate the wait queue functionnality of this system.
This document is here to illustrate the wait queue functionnality of the system.

## Terminology

Expand Down
15 changes: 15 additions & 0 deletions docs/emails/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Getting started with emails

Thesez-Vous platform allow you to use multiple Email Service Provider and to custom every email sent by the platform.

## ESP supported

Since we use Anymail for all our sending of email you can use any ESP officially supported in
its documentation [Anymail documentation][anymail-supported-esp]

!!! Note
Since SendinBlue is our loved choice for internal development, it's the only one ESP fully tested
with the platform. However, if you have a problem with one of the other ESP supported by Anymail, feel free
to contact the support team to evaluate the problem and enhance the support to your favorite ESP.

[anymail-supported-esp]: https://anymail.readthedocs.io/en/stable/esps/#supported-esps
95 changes: 95 additions & 0 deletions docs/emails/templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Email templates

Here is the list of all variables you can use in your Email Service Provider for each email template used inside
the project.

!!! warning
Multiple emails are not migrated to ESP's template and need a developer to be updated at this time. If one of the
emails you want to change is not listed here do not hesitate to contact the support team to plan the migration
of the email you need.

## WELCOME_VIRTUAL_RETREAT
This email is sent when a user reserve a place to a virtual retreat

| Variable | Description |
| --- | --- |
| USER_FIRST_NAME | -
| USER_LAST_NAME | -
| USER_EMAIL | -
| RETREAT_NAME | -
| RETREAT_START_DATE | Format examples: 3 janvier 2020 (in french only)
| RETREAT_START_TIME | Format examples: 1h30, 12h30, 1h00, 1h05
| RETREAT_END_DATE | Format examples: 3 janvier 2020 (in french only)
| RETREAT_END_TIME | Format examples: 1h30, 12h30, 1h00, 1h05
| LINK_TO_BE_PREPARED | Link to know how to prepare
| LINK_TO_USER_PROFILE | -

## WELCOME_PHYSICAL_RETREAT
This email is sent when a user reserve a place to a physical retreat

| Variable | Description |
| --- | --- |
| USER_FIRST_NAME | -
| USER_LAST_NAME | -
| USER_EMAIL | -
| RETREAT_NAME | -
| RETREAT_START_TIME | Format examples: 2020-01-25 01:05
| RETREAT_END_TIME | Format examples: 2020-01-25 01:05

## REMINDER_VIRTUAL_RETREAT
This email is sent 1 day before a virtual retreat to all user with a reservation on that retreat

| Variable | Description |
| --- | --- |
| USER_FIRST_NAME | -
| USER_LAST_NAME | -
| USER_EMAIL | -
| RETREAT_NAME | -
| RETREAT_START_DATE | Format examples: 3 janvier 2020 (in french only)
| RETREAT_START_TIME | Format examples: 1h30, 12h30, 1h00, 1h05
| RETREAT_END_DATE | Format examples: 3 janvier 2020 (in french only)
| RETREAT_END_TIME | Format examples: 1h30, 12h30, 1h00, 1h05
| LINK_TO_BE_PREPARED | Link to know how to prepare
| LINK_TO_USER_PROFILE | -

## REMINDER_PHYSICAL_RETREAT
This email is sent 7 days before a physical retreat to all user with a reservation on that retreat

| Variable | Description |
| --- | --- |
| USER_FIRST_NAME | -
| USER_LAST_NAME | -
| USER_EMAIL | -
| RETREAT_NAME | -
| RETREAT_START_TIME | Format examples: 2020-01-25 01:05
| RETREAT_END_TIME | Format examples: 2020-01-25 01:05

## THROWBACK_VIRTUAL_RETREAT
This email is sent 1 day after a virtual retreat to all user with a reservation on that retreat

| Variable | Description |
| --- | --- |
| USER_FIRST_NAME | -
| USER_LAST_NAME | -
| USER_EMAIL | -
| RETREAT_NAME | -
| RETREAT_START_DATE | Format examples: 3 janvier 2020 (in french only)
| RETREAT_START_TIME | Format examples: 1h30, 12h30, 1h00, 1h05
| RETREAT_END_DATE | Format examples: 3 janvier 2020 (in french only)
| RETREAT_END_TIME | Format examples: 1h30, 12h30, 1h00, 1h05
| LINK_TO_REVIEW_FORM | -
| LINK_TO_BE_PREPARED | Link to know how to prepare
| LINK_TO_USER_PROFILE | -

## THROWBACK_PHYSICAL_RETREAT
This email is sent 1 day after a physical retreat to all user with a reservation on that retreat

| Variable | Description |
| --- | --- |
| USER_FIRST_NAME | -
| USER_LAST_NAME | -
| USER_EMAIL | -
| RETREAT_NAME | -
| RETREAT_PLACE | -
| RETREAT_START_TIME | Format examples: 2020-01-25 01:05
| RETREAT_END_TIME | Format examples: 2020-01-25 01:05
31 changes: 31 additions & 0 deletions docs/getting_started/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Getting started with Docker

## Prerequisites

- [Docker](https://docs.docker.com/get-docker/)

## Initialize the project

Start the dev server for local development:

```bash
docker-compose up
```

## Create super admin

!!! danger
This section is not documented and any contribution on this part of the documentation is welcome

## Initial configurations

!!! danger
This section is not documented and any contribution on this part of the documentation is welcome

## Using the services

You can now visit these links to validate the installation:

- The root of the API: [http://localhost:8000/](http://localhost:8000/)
- The admin site: [http://localhost:8000/admin/](http://localhost:8000/admin/)
- The documentation you're reading: [http://localhost:8001/](http://localhost:8001/)
2 changes: 2 additions & 0 deletions docs/getting_started/virtualenv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!!! danger
This section is not documented and any contribution on this part of the documentation is welcome
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Thesez-vous

This documentation is write to help people understand business rules of the platform and technical details.
Some part are present only for developers or technician, but most of it is accessible to everyone.
32 changes: 32 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
site_name: Plateforme Thesez-Vous
site_description: Plateforme de vente et de gestion des membres
repo_name: FJNR-inc/blitz-api
repo_url: https://github.com/FJNR-inc/blitz-api
site_dir: site
copyright: Copyright &copy; 2020, <a href="https://www.thesez-vous.com/">Thesez-Vous</a>.
dev_addr: 0.0.0.0:8001
edit_uri: ''
nav:
- Home: 'index.md'
- Getting started:
- Install with Docker: 'getting_started/docker.md'
- Install manually: 'getting_started/virtualenv.md'
- API:
- Wait queue management: 'api/wait_queue_management.md'
- Membership management: 'api/memberships.md'
- Retreat management: 'api/retreats.md'
- Emails:
- Getting started: 'emails/getting_started.md'
- Templates: 'emails/templates.md'
- Policies:
- Code of conduct: 'CODE_OF_CONDUCT.md'
theme:
name: material
features:
- tabs
palette:
primary: indigo
accent: orange

markdown_extensions:
- admonition
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Documentation tools
mkdocs==1.1.2
mkdocs-material==5.2.3

Django==2.2.12
djangorestframework==3.11.0
django-cors-headers==3.2.1
Expand Down

0 comments on commit fb7b4f5

Please sign in to comment.