Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodiegoss committed Feb 15, 2021
2 parents 2b41532 + fd01e19 commit cf2868a
Show file tree
Hide file tree
Showing 111 changed files with 1,857 additions and 588 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Repository Policy
All contributions to ARte must be tracked by an issue and at least one pull request. To start work on an issue you must fork ARte repository, pick an issue and when you have did your first commit on your fork you have to create a pull request to ARte devel branch so we can see your work in progress. The pull request name must follow this pattern: {STATE} {ISSUE NUMBER} - {ISSUE NAME}. Where {STATE} is the state of the pull request, all pull requests must be created with [WIP] tag and when you think you resolved the issue change to [REVIEW]. Example of pull request name: [WIP] 435 - Refactor create method.
All contributions to ARte must be tracked by an issue and at least one pull request. To start working on an issue you must fork ARte repository, create or pick an issue. Also check that there is no issue that already adheres to what you intend to post. To create your branch, follow the pattern: `feature/issueID-issue-title`. When you have did your first commit on your fork you have to create a pull request to ARte devel branch so we can see your work in progress. The pull request name must follow this pattern: `{STATE} {ISSUE NUMBER} - {ISSUE NAME}`. Where {STATE} is the state of the pull request, all pull requests must be created with [WIP] tag and when you think you resolved the issue change to [REVIEW]. Example of pull request name: [WIP] 435 - Refactor create method.

## Coding Style
Make sure you are following our code style when submiting a pull request, following the style you make the process of reviewing your pull request better.
Expand All @@ -8,7 +8,7 @@ Make sure you are following our code style when submiting a pull request, follow
We use [flake8](http://flake8.pycqa.org/en/latest/) standard rules and [pep8](https://www.python.org/dev/peps/pep-0008/?) for code style.

### JavaScript code
We use [standardjs](https://standardjs.com/) for code style
We use [standardjs](https://standardjs.com/) for code style.

### HTML and Jinja2
Elements ids must init with the word "id" followed by a underscore and the name of the id e.g. ```html id="id_menu-bar"```. Elements classes only have the name e.g. ```html class="menu-bar"```
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Report a bug to help us improve Jandig

---

**Describe the bug**
A clear and concise description of what the bug is.

**To reproduce the bug**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll the screen until '....'
4. See the error

**Expected behavior**
A clear and concise description of what was expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Please, tell us which device/browser is used when finding the bug):**
- OS: [ex.: iOS], Browser [ex.: chrome], Version [ex.: 22]

**Additional Information**
Add other information about the problem here, if necessary.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Description:
Describe your issue briefly, inserting information necessary for understanding.

### Acceptance criteria:
Describe what the issue needs to fulfill to be considered finalized.

-

### Tasks:
Checklist of actions to be taken.

- [ ]

14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description

A clear and concise description of what was made.

## Resolves (Issues)

Issues that have been resolved with this PR.

## General tasks performed
* Task 1
* Task 2

### Have you confirmed the application builds locally without error? See [here](https://github.com/memeLab/Jandig#running).
- [ ] Yes
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ We are a small team based in Brazil :D talk to us on [Telegram](https://t.me/joi
* @kisobral - [GitHub](https://github.com/KiSobral), [Instagram](https://www.instagram.com/hugsob/)
* @rhuancpq - [GitHub](https://github.com/Rhuancpq), [Twitter](https://twitter.com/rhuancpq)
* @thiagohersan - [GitHub](https://github.com/thiagohersan)
* @manuengsf - [Github](https://github.com/manuengsf)
* @darmsDD - [Github](https://github.com/darmsDD)
* @MatheusBlanco - [Github](https://github.com/MatheusBlanco)
* @devsalula - [Github](https://github.com/devsalula)
* @shayanealcantara [Github](https://github.com/shayanealcantara)
* @victoralvesgomide - [Github](https://github.com/victoralvesgomide)

### Collab
We are looking for artists (both illustrators and animators) to create great content and help us testing the platform, people to translate our website from Portuguese to English (and vice versa), and developers to help us with the platform, please contact us via the Telegram channel or an issue on GitHub!
Expand All @@ -35,10 +41,10 @@ You can find interviews and references to Jandig in the press [here](http://meme
To contribute to Jandig ARte it would be awesome if you read [Contributing](https://github.com/memeLab/ARte/blob/master/.github/CONTRIBUTING.md) and our [Code of conduct](https://github.com/memeLab/ARte/blob/master/.github/CODE_OF_CONDUCT.md). After a good read you are ready to move foward!

### Prerequisites
We use docker and docker-compose to ensure a consistent development environment and to make the deploy process as painless possible, so all you need on your development tools to run Jandig ARte is [Docker](https://www.docker.com/) and [Docker-Compose](https://docs.docker.com/compose/overview/).
We use docker and docker-compose to ensure a consistent development environment and to make the deploy process as painless as possible, so all you need on your development tools to run Jandig ARte is [Docker](https://www.docker.com/) and [Docker-Compose](https://docs.docker.com/compose/overview/).

### Installing
Docker has good documentation on their website for installing docker and docker-compose for different operating systems like [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) and [Debian](https://docs.docker.com/install/linux/docker-ce/debian/). To install docker-compose choose your operating system [here](https://docs.docker.com/compose/install/)
Docker has good documentation on their website for installing docker and docker-compose for different operating systems like [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) and [Debian](https://docs.docker.com/install/linux/docker-ce/debian/). To install docker-compose choose your operating system [here](https://docs.docker.com/compose/install/).

### Running
To run Jandig ARte all you need to do is:
Expand All @@ -54,13 +60,18 @@ docker-compose -f docker/docker-compose.yml up
```
If you get any error saying ``permission denied`` try run the command with sudo.
```
sudo docker-compose up -f docker/docker-compose.yml
sudo docker-compose -f docker/docker-compose.yml up
```

Jandig ARte server will run at localhost. To test modifications you just need to run a web browser and access [localhost:8000](localhost:8000). If you want to test on a mobile device, you will need a https connection, we recommend [ngrok](https://www.npmjs.com/package/ngrok) to generate a https link for you.

- `sudo npm install -G ngrok`
- `ngrok http 8000`

ngrok will prompt 3 links, select the one with `https` at beginning
```
sudo snap install ngrok
ngrok http 8000
```

ngrok will prompt 3 links:

![usage](https://user-images.githubusercontent.com/12930004/54871980-ab41da00-4d9b-11e9-8b80-bb1d4bec420d.png)

Select the one with `https` at beginning.
113 changes: 113 additions & 0 deletions docs/architecture-document.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Revision History

|Version | description| Author(s) | date |
|--------|------------|-----------|------|
|1.0|Initial version|Victor Gomide & Emanuel Holanda|05/10/2020|
|1.1|New diagrams in PlantUml| VIctor Gomide & Emanuel Holanda |24/10/2020|


# Software Architecture Document (SAD)
## Introduction

This document provides a complete architectural overview of the Jandig ARte project. In it, you’ll find the goals and constraints of architecture, the use-case view, the logical view, among others.


### Scope

This document is extremely important for understanding the project as a whole, since architecture is the basis of all software. It is not only suitable for people who want to contribute to the project, but also so that the current team can remember and even change previous architectural decisions.


### Definitions, Acronyms, and Abbreviations

- **SAD:** Software Architecture Document
- **App:** Application
- **MTV:** Model-Template-View
- **PWA:** Progressive Web App


### References

- [Jandig ARte's Wiki](https://github.com/memeLab/Jandig/wiki/Jandig-ARte-architecture)
- [CSUN's Software Architecture Document Template](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjX4638opzsAhXlHrkGHfRtDwkQFjALegQIARAC&url=https%3A%2F%2Fprojects.cecs.pdx.edu%2Fattachments%2Fdownload%2F3180%2FSoftware_Architecture_Document_SF.docx&usg=AOvVaw0aIZsfpWJeIJ52HMgh7nXx)
- [Documento de Arquitetura de Software - Facom/UFU](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwi9m7T2rpzsAhVuF7kGHVbrBYwQFjACegQIARAC&url=http%3A%2F%2Fwww.facom.ufu.br%2F~flavio%2Fpds1%2Ffiles%2F2016-01%2Frup_sad-template-documento-arquitetura.dot&usg=AOvVaw3qyZZysozErnD64wCX-vOy)
- [Documento de Arquitetura de Software RDI-AEE](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiE78LEr5zsAhV7GLkGHSWyAVMQFjAAegQIBRAC&url=http%3A%2F%2Frepositorio.aee.edu.br%2Fbitstream%2Faee%2F1106%2F3%2FTCC2_2018_2_GabrielLeiteDias_MatheusLimadeAlbuquerque_Apendice2.pdf&usg=AOvVaw2wXEOkYpBHmN32ChHHDgOh)
- [The Django Book: Django's Structure](https://djangobook.com/mdj2-django-structure/)

### Overview

In order to explain Jandig ARte's architecture from different points of views, here's an approach of the next topics:

- **Architectural Representation:** architecture of the software as a whole.
- **Architectural Goals and Constraints:** non-functional requirements we want to achieve through Jandig.
- **Use-Case View:** expected behavior from users of Jandig's functionalities.
- **Logical View:** the internal organization of code, its packages, layers and classes.


## Architectural Representation

Project's main programming language is Python, through Django framework. Django uses an exclusive architecture called **MTV (Model-Template-View)**, in which **Model** represents the data layer, **Template** represents user's interface and **View** acts as an intermediary layer between them:

![](images/mtv-architecture-diagram.png)

Jandig ARte is a **Progressive Web App (PWA)**, which means it is an web app that has a similar use to a native mobile app. It uses **PostgreSQL** as database.


## Architectural Goals and Constraints

Jandig was created for providing a low-cost and easy-to-use augmented reality experience to artists and art contemplators. That said, the software must be:

- Easy to learn, use and memorize;
- Usable through a smartphone, allowing more people to use it;
- No previous knowledge of programming necessary for using it;
- Free, or cheap enough;
- Available in different languages, so people around the world can use it;
- Open Source, so community can work together for making it awesome!


## Use-Case View
### Account Access and Management

The diagram below shows how account access and management is done, with users and system as actors. Please note that Visitor is an user that hasn't log in the app.

![](images/use-case-diagram-user.png)


### Artist Role

The following diagram shows the application's features focused on the Artist's role.


![](images/use-case-diagram-artist.png)


### Other Features

Below are shown some other interesting features from Jandig ARte:

![](images/use-case-diagram-features.png)


## Logical View
### Overview

Since the software is Django-based, it contains projects, apps and layers. in Jandig ARte case, we have two main apps: "core" and "users".

![](images/package-diagram-logical-view.png)


### Architecturally Significant Design Packages

#### "Profile" Class Diagram
![](images/class-diagram-profile.png)

#### "Marker" Class Diagram
![](images/class-diagram-marker.png)

#### "Artwork" Class Diagram
![](images/class-diagram-artwork.png)

#### "Object" Class Diagram
![](images/class-diagram-object.png)

#### "Exhibit" Class Diagram
![](images/class-diagram-exhibit.png)
Binary file added docs/images/artwork-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/artwork-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/class-diagram-artwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/class-diagram-exhibit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/class-diagram-marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/class-diagram-object.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/class-diagram-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/exhibition-created.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/exhibition-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/exhibition-main-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/exhibition-select-artwork-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/exhibition-select-artwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/finish-art.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/main-page-jandig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/main-page-logged.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/marker-generator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mtv-architecture-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/package-diagram-logical-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/images/plantUML/class-diagram-artwork.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@startuml

hide circle

class "Artwork (models.Model)" as C {
{field} - author: models.ForeignKey()
{field} - marker: models.ForeignKey()
{field} - augmented: models.ForeignKey()
{field} - title: models.CharField()
{field} - description: models.TextField()
{field} - created_at: models.DateTimeField()
{method} + exhibits_count(self)
{method} + exhibits_list(self)
{method} + in_use(self)
}

@enduml
16 changes: 16 additions & 0 deletions docs/images/plantUML/class-diagram-exhibit.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@startuml

hide circle

class "Exhibit (models.Model)" as C {
{field} - owner: models.ForeignKey()
{field} - name: models.CharField()
{field} - slug: models.CharField()
{field} - artworks: models.ManyToManyField()
{field} - creation_date: models.DateTimeField()
{method} + __str__(self)
{method} + artworks_count(self)
{method} + date(self)
}

@enduml
20 changes: 20 additions & 0 deletions docs/images/plantUML/class-diagram-marker.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml

hide circle

class "Marker (models.Model)" as C {
{field} - owner: models.ForeignKey()
{field} - source: models.ImageField()
{field} - uploaded_at: models.DateTimeField()
{field} - author: models.CharField()
{field} - title: models.CharField()
{field} - patt: models.FileField()
{method} + __str__(self)
{method} + artworks_count(self)
{method} + artworks_list(self)
{method} + exhibits_count(self)
{method} + exhibits_list(self)
{method} + in_use(self)
}

@enduml
31 changes: 31 additions & 0 deletions docs/images/plantUML/class-diagram-object.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@startuml

hide circle

class "Object (models.Model)" as C {
{field} - owner: models.ForeignKey()
{field} - source: models.FileField()
{field} - uploaded_at: models.DateTimeField()
{field} - author: models.CharField()
{field} - title: models.CharField()
{field} - scale: models.CharField()
{field} - position: models.CharField()
{field} - rotation: models.CharField()
{method} + __str__(self)
{method} + artworks_count(self)
{method} + artworks_list(self)
{method} + exhibits_count(self)
{method} + exhibits_list(self)
{method} + in_use(self)
{method} + xproportion(self)
{method} + yproportion(self)
{method} + xscale(self)
{method} + yscale(self)
{method} + fullscale(self)
{method} + xposition(self)
{method} + yposition(self)
}

@enduml


14 changes: 14 additions & 0 deletions docs/images/plantUML/class-diagram-profile.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@startuml

hide circle

class "Profile (models.Model)" as C {
{field} - user: models.OneToOneField()
{field} - bio: models.TextField()
{field} - country: models.CharField()
{field} - personal_site: models.UrlField()
{method} + create_user_profile(sender, instance, created, **kwarg)
{method} + save_user_profile(sender, instance, **kwargs)
}

@enduml
24 changes: 24 additions & 0 deletions docs/images/plantUML/mtv-architecture-diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml

left to right direction

rectangle "Client Side" as C {
rectangle "Django Template" as DT
}

rectangle "Server Side" as S {
rectangle "Django Framework" as DF {
rectangle "App Logic" as AL
rectangle "View Logic" as VL
rectangle "Model" as M
}
database "Database" as DB
}

DT <--> AL
DT <--> VL
AL <--> M
VL <--> M
M <--> DB

@enduml
22 changes: 22 additions & 0 deletions docs/images/plantUML/package-diagram-logical-view.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@startuml

hide circle

package ArTE <<project>> {
package users <<app>> {
package "models.py" as M1 {
class Profile
class Marker
class Artwork
class Object
}
}

package core <<app>> {
package "models.py" as M2 {
class Exhibit
}
}
}

@enduml
Loading

0 comments on commit cf2868a

Please sign in to comment.