Coder Social home page Coder Social logo

sigs-unb / core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matheusrich/sigs-gces

1.0 3.0 7.0 8.51 MB

Project SIGS

License: MIT License

Dockerfile 0.18% Ruby 53.91% JavaScript 3.31% CoffeeScript 1.77% CSS 4.03% HTML 32.21% Gherkin 3.81% Shell 0.77%

core's Introduction

SIGS - Sistema Inteligente de Gestão de Salas

SIGS-image

Build Status Maintainability Test Coverage Ruby Rails MIT License

SIGS is a Ruby on Rails website project design for UnB (University of Brasília). The project aims to facilitate and automate the process of allocation of university rooms by city officials, coordinators and other stakeholders. For more informations see the The Wiki Project (wrote in brazilian portuguese).

Further information about how to contribute and information about the project community, you may also want to read our Contributing document and our Code of Conduct, we strongly recommend.

Features

To see the features of the project Click Here.

License

To see the license of the project Click Here

Getting Started

The SIGS project uses Docker to isolate both the staging and production environment, the staging environment is also used to test new features and corrections. With Docker Compose both environments cited can be easily run with a few commands in your terminal (you should install and set up Docker and Docker Compose on your machine, see steps below). You may also run SIGS via rails serve, for this, you should enter the SIGS folder and run it as a normal rails web app, but we strongly recommend to not do so, if you still want to run this way, do it at your own risk.

Set up using Docker

  • Install Docker

  • Install Docker Compose

  • Build the container image

    • Development Environment

      $ docker-compose -f docker-compose-dev.yml build
      
    • Production Environment

      $ docker-compose -f docker-compose-prod.yml build
      
  • Run the container

    • Development Environment

      $ docker-compose -f docker-compose-dev.yml up -d
      
    • Production Environment

      $ docker-compose -f docker-compose-prod.yml up -d
      
    • Homolog Environment

      $ docker-compose -f docker-compose-homolog.yml up -d
      

    OBS: The option -d is used to run SIGS in background mode, so, this way, you can still use your terminal after starting the docker of SIGS. If you want to see the container log just remove the -d option

  • Set up the Database

    To create the database, run the migration and populate it with fictional data

      $ docker-compose run web rails db:create db:migrate db:seed
    
  • Open the internet browser in http://localhost:3000/.

Running Tests

Cucumber

docker exec sigs bundle exec rake cucumber

RSpec

bundle exec rspec

Rubocop

bundle exec rubocop

Set up Production

  1. Change environment variables on production.env file

  2. If you want to get auto letsencrypt certificates uncomment nginx config.

#server {
#    listen 80;
#    server_name $SIGS_DOMAIN;

#    location / {
#        return 301 https://$host$request_uri;
#    }

#    location /.well-known/acme-challenge/ {
#        root /var/www/certbot;
#    }
#}

server {
    #listen 443 ssl;

    #ssl_certificate /etc/letsencrypt/live/$SIGS_DOMAIN/fullchain.pem;
    #ssl_certificate_key /etc/letsencrypt/live/$SIGS_DOMAIN/privkey.pem;
    #include /etc/letsencrypt/options-ssl-nginx.conf;
    #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
  1. Point DNS record to your External IP
  2. Change your domain and email on docker/prod/init-letencrypt.sh
domains=(example.com)
email="[email protected]" # Adding a valid address is strongly recommended
  1. Run sudo ./docker/prod/init-letencrypt.sh
  2. Run docker-compose -f docker-compose-prod.yml up --build
  3. Open your favorite browser and navigate to your domain

Using the application

Deploy

Deploy SIGS is an easy task, all you have to do is follow these steps:

  • First, clone our repository on your machine:

      $ git clone --depth=50 --branch=develop https://github.com/SIGS-UnB/core.git SIGS-GCES/core
    
  • Now ensure that you have installed Docker and Docker Compose on your machine:

      $ docker --version
      $ Docker version 18.06.1-ce, build e68fc7a # terminal output
      $ docker-compose --version
      $ docker-compose version 1.21.2, build a133471 # terminal output
    

    OBS: This is an example output, the output may vary.

  • (Optional) Configure your docker hub credentials on your .bashrc or .profile file:

      export DOCKERHUB_USER=<your-username>
      export DOCKERHUB_PASS=<your-dockerhub-password>
    

    Save the file and then run on your terminal:

      source ~/.bashrc
    
  • Lastly, run the script deploy file on project's folder:

      bash scprit/deploy.sh
    

    You may run this script time to time to keep your SIGS up-to-date, just stay tuned on project's releases on this link.

    OBS: You should correct the script to the right path on the 'docker compose' file, on line 15 to 17, and if you didn't set up your docker hub login credentials you should, as well, receive an error but that is expected.

Further configuration may be needed (nginx configurations, domain purchase and configurations, machine configurations and so on), but you're free to customize and run SIGS at your own way, remember, this is an open source project!

The project maintainers' deploy is running on a digitalocean droplet that's also easy to do and keep! You can access it from this link.

core's People

Contributors

arthurbdiniz avatar vinypinheiro avatar matias0422 avatar danielmarquesr avatar carlosaragon avatar min-ia avatar matheusrich avatar ateldyfilho avatar drianne avatar lucassoaresouza avatar mlfaa avatar victorcmoura avatar rdadamos avatar jpbusche avatar caionunes avatar wallacybraz avatar sconetto avatar gesielfreitas avatar stefanesouza avatar lucasandrad avatar marcorlk avatar vinisilvacar avatar geovanaramos avatar jhonalves avatar nukdown avatar daluzguilherme avatar hugomartins013 avatar caiogabrielaraujo avatar matheusherique avatar inddiara avatar

Stargazers

Gustavo Carvalho avatar

Watchers

James Cloos avatar  avatar  avatar

core's Issues

Deploy error (sshpass)

Problem description

Travis deploy stage is erroring due to a misbehaving on an installation process

Expected Behavior

The sshpass package should be installed and the deploy should be done

Current Behavior

Travis CI can't install sshpass

Step to Reproduce (for bugs)

  1. Run a Travis CI job
  2. Wait for deploy stage

Screenshots

Not apply

Context

Trying to deploy SIGS

Your Environment

  • Software Version (Release): 1.1
  • Name and version of the browser: Google Chrome 69.0.3497.100
  • Name and version of the Operating System (desktop or mobile): Ubuntu 18.04.1 LTS
  • Link to your project (in case of fork of this project): Not apply

Atualizar os templates e adicionar documentação

Descrição do Problema

Atualizar e revisar os templates de Issue e Pull Request, além de adicionar os demais docs de comunidade para o projeto.

Comportamento Esperado

Não se aplica.

Comportamento Atual

Não se aplica.

Screenshots

Não se aplica.

Mostrar mensagem de inexistência de solicitações abertas

Problem description

Não mostra uma mensagem de que não há solicitações pendentes para o usuário logado.

Expected Behavior

Mostrar uma mensagem indicando que o usuário não possui solicitações. Exemplo: Você não possui solicitações pendentes.

Current Behavior

Mostra a tabela, mas sem nenhuma mensagem ou linha com dados.

Possible Solution

Mostrar a tabela apenas se a lista de solicitações tiver uma

Step to Reproduce (for bugs)

  1. Logar numa conta de usuário.
  2. Entrar na página: https://sigsunb.herokuapp.com/my_solicitations
  3. O usuário não pode ter solicitações pendentes.

Screenshots

screen shot 2018-09-11 at 17 03 26

Context

O usuário não consegue saber se não possui solicitações abertas ou se a tabela apenas não está mostrando.

Banco de dados iniciando depois do Rails

Descrição do Problema

O container do mysql pode ser iniciado depois do container Rails

Comportamento Esperado

O container do mysql deve ser iniciado antes do serviço Rails

Comportamento Atual

Existe o risco do container mysql iniciar depois do container Rails. Como resultado, a aplicação pode ser encerrada por falta de banco de dados disponível.

Correction of parts of reports

Problem description

The room reporting feature does not show the time occupied by each class

Expected Behavior

Case 1

Generate report by room: Where will be shown the class and the busy schedules

Case 2

Generate report by discipline: It will be shown all the times and rooms that that discipline occupies

Case 3

Generate report by discipline: It will be shown all the times and rooms that that class occupies

Case 4

Generate report by Building: It will show the hourly grid of the whole building with the respective classes and schedules of each room

Remove Vagrant Machine and Puppet

Problem description

The vagrant machine isn't on use on this project, so to maintain a clean project repository the team should remove all the configurations and files pertinent. Alongside with the vagrant, the puppet configuration, that presumably is being used to install dependencies and configure the vagrant machine, should be removed too.

Expected Behavior

Not apply.

Current Behavior

Not apply.

Possible Solution

Remove vagrant from the project

Step to Reproduce (for bugs)

Not apply.

Screenshots

Not apply.

Context

Not apply.

Your Environment

  • Software Version (Release): 1.0
  • Name and version of the browser: Chrome
  • Name and version of the Operating System (desktop or mobile): Linux Mint 18
  • Link to your project (in case of fork of this project):

Time indicator on allocation list should be more intuitive

Problem description

Time text on allocation list is formatted in a non intuitive way.

image

Expected Behavior

Time should give the idea of an interval. The following format would be more intuitive: hh:mm - hh:mm

Current Behavior

Time on allocation list presents the following format: hh:mm

Possible Solution

Change time text format to match the expected behaviour

Update README

Problem description

There is a lot of things on README that its necessary to change

Expected Behavior

Clean README

Current Behavior

This that its necessary to remove:

  • Remove Heroku Deploy (its not been used)
  • Re-link License
  • Update Docker commands with dev and prod environments
  • Remove Vagrant Tutorial (its not been used)

Separar o docker-compose

Descrição do Problema

O ambiente docker só está configurado para dev

Comportamento Esperado

Criar docker-compose para ambiente de produção

Comportamento Atual

docker-compose e docker file apenas para ambiente dev

Screenshots

image

image

Show Me The Code 01

Problemas resolvidos

Débitos Técnicos 🚧

  • Melhorar formulário tela de login #7
  • Upload de imagem de perfil para usuários #34
  • Protótipo seguindo matricula web #46
  • Novo design da home baseado no prototipo #47
  • Refatoração da tela de Solicitar Cadastro #56
  • Footer escondendo parte do conteúdo das tabelas #59

Concluído ✅

  • Configurar Test Reporter CC #49
  • Remoção do Vagrant Machine e Puppet #41
  • Mostrar capacidade das salas #38
  • Banco de dados iniciando depois do Rails #31
  • Salvar todas as chaves em um arquivo com gpg #30
  • Refatorar navbar #28
  • Separar a view da navbar e footer da camada da aplicação #24
  • Nome errado Tela novos usuários #22
  • Separar protótipo do projeto #17
  • Reconfigurar as ferramentas de CI/CD #12
  • Atualizar os templates e adicionar documentação #9
  • Atualizar versão das Gems #8
  • Separar o docker-compose #4
  • Deploy contínuo #52
  • Separar predios por campus #37
  • Melhora na experiência de usuário com o filtro de salas #55
  • Indicador de tempo na tabela de alocações deve ser mais intuitivo #13

Add filter to rooms in class management

Problem description

The classes are presented together. Filtering them according to their allocation would facilitate the search.

Expected behavior

There should be filters for the class allocation status.

Current Behavior

There are no filters.

Screenshots

image

Account Creation / Confirmation Email

Problem description

User creating an account does not receive any email

Expected behavior

Once the account is created, you will receive a welcome email

Current Behavior

Account created without email

Screenshots

image

Mostrar capacidade das salas

Problem description

A visualização da capacidade das salas não está aparecendo na lista

Expected Behavior

Que mostre a capacidade de cada sala

Current Behavior

image

Melhorar categorias de turmas

Descrição do Problema

Na tela de edição de turmas, as categorias são listadas de uma forma desorganizada.

Comportamento Esperado

As categorias devem estar listadas de forma organizada, de forma a facilitar a visualização.

Comportamento Atual

Categorias listadas desorganizadamente.

Passos Para Reproduzir o Problema

  1. Logue como [email protected]
  2. Acesse /school_rooms/edit/3

Screenshots

image

Bug filtro por nome e código

Problem description

Os filtros não estão fazendo o trabalho de mostrar especificamente, coloquei pelo nome e por código e apenas uma das salas foi possível filtrar

Expected Behavior

Conseguir filtrar todas as salas pelos seus códigos e nomes específicos

Screenshots

image

Refactor methods in Allocation Controller

Problem description

Make_cell method too large, needs method extraction
rubocop being suppressed before the method

Expected behavior

data allocation separate from make_cell
do not delete rubocop

Current Behavior

make_cell does the data allocation after several other operations

Nome errado Tela novos usuários

Problem description

  • Na tela de registro de usuários ajustar o nome do assistente adm
    image

  • Colocar link para voltar para a tela de login
    image

Expected Behavior

Nomes corretos e link para que o usuário consiga voltar para o login

Separar protótipo do projeto

Problem description

O protótipo está incluso dentro do projeto

Expected Behavior

Apenas o código usado no core no projeto principal

Current Behavior

Protótipo em outro projeto

Screenshots

image

Refatorar navbar

Problem description

Navbar não segue as cores da UnB e poderia ter um design mais interativo

Expected Behavior

Navbar facil de navegar

Current Behavior

image

Possible Solution

Alterar no arquivo css navbar

Atualizar Rails para versão 5.2.1

Atualizar Rails para versão 5.2.1

Esta mudança traz as funcionalidades do ActiveStorage, que permite o upload de arquivos sem o uso de gems.

Register SIGS Domain

Problem description

SIGS staging environment is deployed at DigitalOcean but it didn't have a domain, it's only reachable by its IP, so a domain would be better for SIGS and the project.

Expected Behavior

Access SIGS staging deploy via a human-readable URL

Current Behavior

You can only access it by the machine IP

Possible Solution

Register a domain

Configurar Test Reporter CC

Problem description

A ferramenta do CodeClimate está configurar mas o seu test reporter não está funcionando

Expected Behavior

Ao término da execução do CI um relatório com os testes deveria ser enviado para o CodeClimate

Current Behavior

Não é feito o upload do teste

Possible Solution

Configurar no .travis.yml o test reporter do CC

Context

Manter controlado a cobertura de testes assim como ter uma métrica dos testes implementados na aplicação

Remove popup notifications

Descrição do Problema

Quando volta para a página inicial, uma mensagem "você já está logado" continua aparecendo

Comportamento Esperado

A mensagem deveria aparecer apenas no primeiro acesso a página, ou seja, após o login. Ou não deverá aparecer, já que a página indica que o usuário está logado.

Comportamento Atual

Mensagem "você já está logado" aparece no canto superior direito da tela, a
cada vez que a página inicial é aberta.

Passos Para Reproduzir o Problema

  1. Faça o login
  2. Observe a mensagem azul no canto superior direito da tela.
  3. Acesse outra página da aplicação.
  4. Na navbar, clique em SIGS e observe novamente a mensagem "Usuário já logado", no canto superior direito.

Screenshots

screen shot 2018-09-06 at 16 33 27

improve class editing form

Problem description

In the class editing screen, the form fields fill the entire screen.
Na tela de edição de turmas, os campos dos formulários ocupa toda a tela.

Expected Behavior

O formulário de edição devem ser menores, na proporção do dado esperado.
The editing form should be smaller, in proportion to the expected data.

Current Behavior

Formulário de edição muito grande.
Very large edit form.

Step to Reproduce (for bugs)

Log in as:
Go to:
Logue como: [email protected]
Acesse: /school_rooms/edit/3

Screenshots

Image

Bug filtro de capacidade

Problem description

Ao tentar fazer um filtro de capacidade está levando para uma pagina com
image

Expected Behavior

Conseguir filtrar as salas pela capacidade

Current Behavior

Unprocessable Entity

Footer escondendo parte do conteúdo das tabelas

Problem description

O footer está fixo, o que causa problemas na visualização de alguns componentes.

Expected Behavior

O footer deve acompanhar o conteúdo da página.

Current Behavior

O footer não está acompanhando o conteúdo da página.

Screenshots

Tabela de alocação (Os horários vão até 23h59):
image

Melhorar formulário tela de login

Descrição do Problema

Tela de login muito simples e imagem no fundo não esta "combinando com a pagina"

Comportamento Esperado

Uma tela atraente e fácil de visualizar os campos assim como responsiva

Comportamento Atual

Tela com uma imagem da UnB no fundo campos de input seguindo o material design...

Screenshots

Exemplos a serem seguidos
image

Imagem de perfil

Descrição

Para deixar a aplicação com uma cara mais amigável a imagem de perfil dos coordenadores poderia ajudar.
Além disso para coleta de dados essa feature poderia ajudar a identificar mais fácil

Mapa dinâmico salas UnB

Descrição

A visualização das salas hoje é um pouco dificil, para melhor fazer um mapa dinâmico para realizar a escolha da sala e da disciplina.

Erro ao tentar trocar de senha

Problem description

Tentei troca a senha de um usuário e acabei perdendo o acesso nos outros usuários do sistema

Expected Behavior

Quando trocar a senha de um usuário, não quebrar as senhas dos outros usuários

Current Behavior

Segui uma serie de passos até chegar ao erro, fiz o login pelo usuário teste [email protected], fui até o perfil e mudei minha senha para 1234567, dei um logout e tentei fazer o login com o usuário [email protected], porém não consegui efetuar, algum passo na hora de trocar a senha quebra as senhas dos outros usuários

Possible Solution

Analisar pagina de perfil e ver como é feita a troca da senha na controller

Step to Reproduce (for bugs)

  1. Login com qualquer conta
  2. Trocar senha
  3. Tentar fazer login com outro usuário

Separar predios por campus

Expected Behavior

Que cada prédio tenha um relacionamento com um campus, dessa forma fica mais fácil de fazer os filtros

Current Behavior

Não existe esse relacionamento de campus

Screenshots

image

Reconfigurar as ferramentas de CI/CD

Problem description

Reconfigurar ferramentas de CI/CD e de análise de código, como o Travis e o CodeCIimate

Expected Behavior

Não se aplica.

Current Behavior

Ou não há configuração atual, ou as configurações estão quebradas

Possible Solution

Não se aplica

Step to Reproduce (for bugs)

Não se aplica.

Screenshots

Não se aplica

Context

Manter controle do código e integração de novas funcionalidades/correções de bugs/sugestões e etc.

Your Environment

  • Software Version (Release): N/A
  • Name and version of the browser: N/A
  • Name and version of the Operating System (desktop or mobile): N/A
  • Link to your project (in case of fork of this project): N/A

Show Me The Code 02

Problemas resolvidos

Débitos Técnicos 🚧

  • Novo design da home baseado no protótipo #47
  • Routing to profile page by username #95

Concluído ✅

  • Seeds rooms #96
  • Restructure routes and views of athentication #93
  • Mensagem de diálogo para edição de usuário #84
  • Remove popup notifications #76
  • Register SIGS Domain #86
  • Update README #78 and #82 by: @trevlewis and @sconetto
  • Upload de imagem de perfil para usuários #34
  • Password Strength Meter #73 by: @fer22f
  • Melhorar formulário tela de login #7
  • Refatoração da tela de Solicitar Cadastro #56
  • Mostrar mensagem de inexistência de solicitações abertas #62
  • Footer escondendo parte do conteúdo das tabelas #59
  • Aprimoramento do Deploy #63
  • Protótipo seguindo matricula web #46
  • Error no deploy (sshpass) #70

Atualizar versão das Gems

Descrição do Problema

Verificar se há atualizações das dependências presentes no Gemfile e se é possível atualizar as mesmas sem problemas.

Comportamento Esperado

Não se aplica.

Comportamento Atual

Não se aplica.

Screenshots

Não se aplica.

SIGS Deploy

Problem description

Para fins de testes das novas releases, deve ser feito um deploy do sistema SIGS onde possa ser acessada de qualquer navegador por qualquer integrante da equipe

Expected Behavior

Ser possível acessar a última versão lançada do SIGS para diversas finalidades

Current Behavior

Com a remoção do heroku não é possível testar novas releases

Possible Solution

Configuração e deploy das versões, já integrando com os serviços de integração e entrega contínua

User Edit Password Requirement

Problem description

When a user tries to edit some of his information if he didn't type his password the system only shows a message saying that the edit was not successful.

Expected Behavior

Some dialog should be shown on the screen about the password requirement for doing updates

Current Behavior

No message is displayed about the requirement and the user gets a generic error message

Possible Solution

Add a dialog to say that the password is a requirement for any user modification

Step to Reproduce (for bugs)

  1. Login the system
  2. Go to the user profile
  3. Try to edit something (the name for example)
  4. Press save
  5. The system will not save the edit and will show a generic error message

Context

Trying to change user's information

Your Environment

  • Software Version (Release): 1.1
  • Name and version of the browser: Google Chrome 69.0.3497.100
  • Name and version of the Operating System (desktop or mobile): Ubuntu 18.04.1 LTS
  • Link to your project (in case of fork of this project): Not apply

Trocar a url da página inicial do painel

Problem description

A url da página inicial (após o login) mostra o id do usuário, dando impressão de que a alteração do id é permitida para visualizar dados de outro usuários.

Expected Behavior

A url deve ser mais simples, algo como: /dashboard

Current Behavior

A url apresenta o id do usuário logado: /users/:id

Possible Solution

Criar uma nova rota com o endpoint: /dashboard a qual o usuário terá as informações apenas de sua conta.

Step to Reproduce (for bugs)

  1. Fazer o login com uma conta de usuário.

Screenshots

screen shot 2018-09-11 at 16 34 18

Context

Dá a impressão para os usuários de poderem alterar o id para visualizar os dados de outros usuários.

Your Environment

Não de aplica.

  • Software Version (Release):
    Não se aplica.

Protótipo seguindo matricula web

Problem description

Visto que a aplicação hoje em dia segue um padrão divergente da unb é necessario mudar o layout das telas para que o usuário tenha maior similaridade com aplicações que já foram desenvolvidas pelo CPD

Possible Solution

Protótipo de alta fidelidade

Revisar docker volumes

Descrição do Problema

Existem volumes desnecessários

Comportamento Esperado

Existir apenas volumes necessários

Comportamento Atual

Existe, por exemplo, volume específico para o script de início

Update README

Problem description

Update readme to add deploy stage and some other project information (staging web address and correct some information)

Possible Solution

The update of the readme

Context

To maintain the information up-to-date to all project participants and for the community

Opção dos filtros dropdown não se mantém na lista de salas

Problem description

Ao ser selecionada, a opção do filtro dropdown não se mantém após o carregamento da página.

Expected Behavior

Os filtros deveriam ser mantidos na tela para identificar-se como está acontecendo a formação da lista exibida.

Current Behavior

Os filtros não são mantidos na tela.

Screenshots

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.