diff --git a/docker-compose.yml b/docker-compose.yml index 04e8f569..d7eb28c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,5 +27,14 @@ services: ports: - 8000:8000 + documentation: + restart: always + build: ./ + command: "mkdocs serve" + volumes: + - .:/opt/project + ports: + - "8001:8001" + volumes: db: diff --git a/docs/api/memberships.md b/docs/api/memberships.md new file mode 100644 index 00000000..d96266e5 --- /dev/null +++ b/docs/api/memberships.md @@ -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. \ No newline at end of file diff --git a/docs/api/retreats.md b/docs/api/retreats.md new file mode 100644 index 00000000..6f1e963d --- /dev/null +++ b/docs/api/retreats.md @@ -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 \ No newline at end of file diff --git a/docs/use_cases/wait_queue_management.md b/docs/api/wait_queue_management.md similarity index 99% rename from docs/use_cases/wait_queue_management.md rename to docs/api/wait_queue_management.md index d67c085c..58dc4a6a 100644 --- a/docs/use_cases/wait_queue_management.md +++ b/docs/api/wait_queue_management.md @@ -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 diff --git a/docs/emails/getting_started.md b/docs/emails/getting_started.md new file mode 100644 index 00000000..48e024ce --- /dev/null +++ b/docs/emails/getting_started.md @@ -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 \ No newline at end of file diff --git a/docs/emails/templates.md b/docs/emails/templates.md new file mode 100644 index 00000000..41c1b216 --- /dev/null +++ b/docs/emails/templates.md @@ -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 diff --git a/docs/getting_started/docker.md b/docs/getting_started/docker.md new file mode 100644 index 00000000..e1251127 --- /dev/null +++ b/docs/getting_started/docker.md @@ -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/) diff --git a/docs/getting_started/virtualenv.md b/docs/getting_started/virtualenv.md new file mode 100644 index 00000000..b6d0f0d5 --- /dev/null +++ b/docs/getting_started/virtualenv.md @@ -0,0 +1,2 @@ +!!! danger + This section is not documented and any contribution on this part of the documentation is welcome \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..2e7f1dbb --- /dev/null +++ b/docs/index.md @@ -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. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..4ea9a81f --- /dev/null +++ b/mkdocs.yml @@ -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 © 2020, Thesez-Vous. +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 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 843acd45..bc36363b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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