# [ARCHITECTURE] Website structure
[](https://hackmd.io/0dh9taMIQeidOYiwYMYEvg)
[TOC]
## API
### UrlShortener V1
```
url: https://redcraft.org/api/v1/urls
description: get list url
methode: GET
result: JSON:[
shortened: {
token: acces_name,
url: string
}
]
```
```
url: https://redcraft.org/api/v1/url
description: set list url
methode: POST
params post (JSON):
- token: str, token to provider
- shortened: str|null, choise shortened if null, hash is generate to shortene,
- url: str, url to redirect
result:
if err: JSON: [
{
'err': str err
}
]
if success: JSON: [
{
'response': True|,
'shortened': shortened
}
]
```
```
url: https://redcraft.org/r/<str:shortened>
description: redirect to url
methode: GET
```
### Skin V1
```
url: https://redcraft.org/api/v1/skin/template/<str:ref>
params url:
- ref: uuid or username to player
description: get template to player
methode: GET
params get:
- size: int, size to img skin
params:
- size: int, size to img skin
- outer: bool, if print outer in skin
return:
if succes: img.png
if error: JSON: {'err': err}
```
```
url: https://redcraft.org/api/v1/skin/head/<str:ref>
params url: {
ref: uuid or username to player
}
description: get head to player
methode: GET
params:
- size: int, size to img skin
- outer: bool, if print outer in skin
return:
if succes: img.png
if error: JSON: {'err': err}
```
```
url: https://redcraft.org/api/v1/skin/body/<str:ref>
params url: {
ref: uuid or username to player
}
description: get full skin face to player
methode get: GET
params:
- size: int, size width to img skin
- outer: bool, if print outer in skin
params:
- size: int, size to img skin
- outer: bool, if print outer in skin
return:
if succes: img.png
if error: JSON: {'err': err}
```
## Pages
### Home (MVP) :heavy_check_mark:
Presentation of the server
- Welcome header
- Basic server presentation
- News
- Deeper presentation of the servers
- Staff list
### Contact (MVP) :heavy_check_mark:
Form to send a message to the staff
First, a select
**Contact form**
- {pseudo}
- {discord_username}
- {message}
### Vote (MVP) :heavy_check_mark:
List of all sites where you can vote for the server
### Stats :negative_squared_cross_mark:
- Server statistics
- Player statistics (searching for them)
### Livemaps :negative_squared_cross_mark:
### Rules & References (MVP) :heavy_check_mark:
- Code of conduct
- Server rules
- Access to the wall of shame page
- Licenses
Minecraft and Discord Server Rules Overview
References used for creating the website (& server ?)
- [Fontawesome license](https://fontawesome.com/license)
### Donations (MVP) :writing_hand:
#### Donation form
- {sum}
- {pseudo}
- Shown only if is_anonymous is false
- {is_anonymous}
- {is_gift}
- {reciever}
- Shown only if is_gift is true
- {message}
- {bonus_code}
The gift code is checked when the submit button is clicked.
A cookie is set with all the informations about the donation.
If the page is loaded with the cookie, all the informations in the form are set.
#### Donation informations
#### Donation processed :heavy_check_mark:
The donation has been made sucessfuly. Returns pseudo, message and sum.
A button allows the user to go back to the donation page.
The cookie containing all the information is deleted.
#### Donation failed :heavy_check_mark:
The donation has failed, button to go back to donation page
(when the button is clicked, the form in the donation page is filled)
### (not in navbar) Staff :negative_squared_cross_mark:
Accessible from homepage
### (not in navbar) Articles (MVP) :negative_squared_cross_mark:
Page regrouping all the articles of the server
--> Reference : https://www.codeply.com/go/u7fEDdUbXg/bootstrap-article-list
Accessible from homepage
### (not in navbar) Wall of shame :negative_squared_cross_mark:
List of all the banned people.
Accessible from rules page
### (not in navbar)about and FAQ (MVP) :writing_hand:
Gives a presentaiton of the RedCraft project with a FAQ
Accesible from the Footer
### (not in navbar) recommandations for alternate browsers :negative_squared_cross_mark:
If the website is visited by an old browser (IE)
### (not in navbar) Staff & conbtributors (MVP) :negative_squared_cross_mark:
- Administrators
- Contributors
- Active staff
The page is available trough the homepage, in the "staff" section