├── public ├── sass │ ├── mdb │ │ ├── _custom.scss │ │ └── free │ │ │ ├── _breadcrumb.scss │ │ │ ├── _deprecated.scss │ │ │ ├── _list-group.scss │ │ │ ├── _dropdowns.scss │ │ │ ├── _msc.scss │ │ │ ├── _jumbotron.scss │ │ │ ├── _badge.scss │ │ │ ├── _collapse.scss │ │ │ ├── _progress.scss │ │ │ ├── data │ │ │ ├── _prefixer.scss │ │ │ ├── _functions.scss │ │ │ ├── _mixins.scss │ │ │ ├── _variables.scss │ │ │ └── _colors.scss │ │ │ ├── _tables.scss │ │ │ ├── _cards-basic.scss │ │ │ ├── _carousel-basic.scss │ │ │ ├── _footer.scss │ │ │ ├── _pagination.scss │ │ │ ├── _global.scss │ │ │ ├── _masks.scss │ │ │ ├── _buttons.scss │ │ │ ├── _typography.scss │ │ │ ├── _helpers.scss │ │ │ ├── _waves.scss │ │ │ ├── _navbar.scss │ │ │ ├── _forms-basic.scss │ │ │ └── _modals.scss │ └── mdb.scss ├── img │ ├── campo.png │ ├── logo.png │ ├── mock.png │ ├── escudo.png │ ├── overlays │ │ ├── 01.png │ │ ├── 02.png │ │ ├── 03.png │ │ ├── 04.png │ │ ├── 05.png │ │ ├── 06.png │ │ ├── 07.png │ │ ├── 08.png │ │ └── 09.png │ ├── lightbox │ │ ├── preloader.gif │ │ ├── default-skin.png │ │ └── default-skin.svg │ └── svg │ │ ├── arrow_left.svg │ │ └── arrow_right.svg ├── font │ └── roboto │ │ ├── Roboto-Bold.eot │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-Bold.woff │ │ ├── Roboto-Light.eot │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-Thin.eot │ │ ├── Roboto-Thin.ttf │ │ ├── Roboto-Thin.woff │ │ ├── Roboto-Bold.woff2 │ │ ├── Roboto-Light.woff │ │ ├── Roboto-Light.woff2 │ │ ├── Roboto-Medium.eot │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-Medium.woff │ │ ├── Roboto-Regular.eot │ │ ├── Roboto-Regular.ttf │ │ ├── Roboto-Thin.woff2 │ │ ├── Roboto-Medium.woff2 │ │ ├── Roboto-Regular.woff │ │ └── Roboto-Regular.woff2 ├── css │ ├── futiba-interno.css │ ├── futiba.css │ └── style.css └── js │ └── popper.min.js ├── .gitattributes ├── support_files ├── db_scheema │ ├── futibaclub.mwb │ └── futibaclub.sql ├── screenshot │ └── futibaclub.webp └── templates │ ├── grupos.html │ └── home.html ├── npm ├── config.js ├── setup.js └── encryptedRedisClient.js ├── utils ├── crypto.js ├── mailer.js └── safe.js ├── middleware.js ├── .gitignore ├── views ├── _partials │ ├── page │ │ ├── header.ejs │ │ └── footer.ejs │ ├── painel │ │ ├── header.ejs │ │ └── footer.ejs │ ├── navbar.ejs │ └── menu-items.ejs ├── account │ ├── sign-in.ejs │ ├── profile.ejs │ └── new.ejs ├── groups.ejs ├── admin │ └── games.ejs ├── ranking.ejs ├── home.ejs └── group.ejs ├── docker-compose.yml.example ├── .env.example ├── package.json ├── ranking.js ├── README.md ├── index.js ├── admin.js ├── account.js └── groups.js /public/sass/mdb/_custom.scss: -------------------------------------------------------------------------------- 1 | // Your custom style -------------------------------------------------------------------------------- /public/sass/mdb/free/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | // Breadcrumbs 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.js linguist-vendored=false 3 | -------------------------------------------------------------------------------- /public/img/campo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/campo.png -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/logo.png -------------------------------------------------------------------------------- /public/img/mock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/mock.png -------------------------------------------------------------------------------- /public/img/escudo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/escudo.png -------------------------------------------------------------------------------- /public/img/overlays/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/01.png -------------------------------------------------------------------------------- /public/img/overlays/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/02.png -------------------------------------------------------------------------------- /public/img/overlays/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/03.png -------------------------------------------------------------------------------- /public/img/overlays/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/04.png -------------------------------------------------------------------------------- /public/img/overlays/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/05.png -------------------------------------------------------------------------------- /public/img/overlays/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/06.png -------------------------------------------------------------------------------- /public/img/overlays/07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/07.png -------------------------------------------------------------------------------- /public/img/overlays/08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/08.png -------------------------------------------------------------------------------- /public/img/overlays/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/overlays/09.png -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Bold.eot -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Light.eot -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Thin.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Thin.eot -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /public/img/lightbox/preloader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/lightbox/preloader.gif -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Medium.eot -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Regular.eot -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /public/img/lightbox/default-skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/img/lightbox/default-skin.png -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /public/font/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/public/font/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /support_files/db_scheema/futibaclub.mwb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/support_files/db_scheema/futibaclub.mwb -------------------------------------------------------------------------------- /support_files/screenshot/futibaclub.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vs0uz4/futibaclub/HEAD/support_files/screenshot/futibaclub.webp -------------------------------------------------------------------------------- /public/sass/mdb/free/_deprecated.scss: -------------------------------------------------------------------------------- 1 | // Buttons 2 | // .btn-mdb was replaced by .btn-mdb-color 3 | 4 | @include make-button('mdb', map-get($mdb-color, base)); -------------------------------------------------------------------------------- /public/sass/mdb/free/_list-group.scss: -------------------------------------------------------------------------------- 1 | .media .media-left { 2 | padding: 0 10px 10px 0; 3 | img { 4 | @extend .z-depth-1-half; 5 | } 6 | } 7 | 8 | .list-group a:hover { 9 | transition: 0.5s; 10 | } -------------------------------------------------------------------------------- /public/img/svg/arrow_left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/svg/arrow_right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /npm/config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | require('dotenv').config() 4 | 5 | const config = { 6 | host: process.env.REDIS_HOST || 'localhost', 7 | port: process.env.REDIS_PORT || 6379, 8 | password: process.env.REDIS_PASSWORD || 'secret' 9 | } 10 | 11 | module.exports = config 12 | -------------------------------------------------------------------------------- /public/sass/mdb/free/_dropdowns.scss: -------------------------------------------------------------------------------- 1 | // Dropdowns free 2 | .dropdown { 3 | .dropdown-menu { 4 | .dropdown-item { 5 | &:hover, 6 | &:active, 7 | &:focus { 8 | color: #1d1e1f; 9 | background-color: #f7f7f9; 10 | } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /utils/crypto.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const bcrypt = require("bcrypt") 4 | 5 | const saltRounds = process.env.SALT_ROUNDS || 10 6 | const salt = bcrypt.genSaltSync(saltRounds) 7 | 8 | const crypto = (password) => { 9 | return bcrypt.hashSync(password, salt); 10 | } 11 | 12 | module.exports = crypto 13 | -------------------------------------------------------------------------------- /public/sass/mdb/free/_msc.scss: -------------------------------------------------------------------------------- 1 | // Miscellaneous free 2 | 3 | // White border 4 | .table-inverse { 5 | th, 6 | td, 7 | thead th { 8 | border-color: $table-inverse-color-border; 9 | } 10 | } 11 | 12 | // Edge Headers 13 | .edge-header { 14 | display:block; 15 | height:278px; 16 | background-color:#ccc; 17 | } 18 | 19 | .free-bird { 20 | margin-top:-100px; 21 | } -------------------------------------------------------------------------------- /public/sass/mdb/free/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | // Jumbtotron 2 | .jumbotron { 3 | background-color: $white; 4 | padding: 2rem; 5 | &.m-1, 6 | &.m-2, 7 | &.m-3 { 8 | z-index: 50; 9 | position: relative; 10 | margin-left: 3%; 11 | margin-right: 3%; 12 | } 13 | &.m-1 { 14 | margin-top: -20px; 15 | } 16 | &.m-2 { 17 | margin-top: -30px; 18 | } 19 | &.m-3 { 20 | margin-top: -40px; 21 | } 22 | } -------------------------------------------------------------------------------- /public/sass/mdb/free/_badge.scss: -------------------------------------------------------------------------------- 1 | //Badges 2 | .badge { 3 | color: #fff; 4 | } 5 | 6 | @each $name, $color in $material-colors { 7 | .badge-#{$name} { 8 | background-color: $color; 9 | } 10 | } 11 | 12 | .badge-pill { 13 | padding-right: $badge-pill-padding-x; 14 | padding-left: $badge-pill-padding-x; 15 | @include border-radius($badge-pill-border-radius); 16 | } 17 | 18 | .badge-warning { 19 | color: #FFF !important; 20 | } -------------------------------------------------------------------------------- /middleware.js: -------------------------------------------------------------------------------- 1 | module.exports = (req, res, next) => { 2 | if (req.url.includes('/admin') && (!req.session.user || req.session.user.role === 'user')) { 3 | res.locals.url = req.url 4 | res.redirect('/') 5 | } else if (req.url.includes('/groups') && (!req.session.user)) { 6 | res.locals.url = req.url 7 | res.redirect('/sign-in') 8 | } else if (req.session.user) { 9 | res.locals.url = req.url 10 | res.locals.user = req.session.user 11 | next() 12 | } else { 13 | res.locals.url = req.url 14 | next() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /npm/setup.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const redis = require('redis') 4 | const config = require('./config') 5 | const Safe = require('../utils/safe') 6 | const EncryptedRedisClient = require('./encryptedRedisClient') 7 | let key = process.env.ENCRYPTED_KEY 8 | let iv = process.env.ENCRYPTED_IV 9 | 10 | const client = redis.createClient(config) 11 | 12 | client.on('connect', () => { 13 | console.log('Redis Client Connected!') 14 | }) 15 | 16 | client.on('error', (err) => { 17 | console.log('Something went wrong ' + err) 18 | }) 19 | 20 | const encClient = new EncryptedRedisClient(client, new Safe(this.key, this.iv)) 21 | 22 | module.exports = encClient 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editors and IDEs 9 | .vscode/ 10 | .idea/ 11 | 12 | # Database scheema backup file 13 | support_files/db_scheema/*.bak 14 | 15 | # Dependency directories 16 | node_modules/ 17 | 18 | # Others directories 19 | mysql/ 20 | 21 | # Optional npm cache directory 22 | .npm 23 | 24 | # Optional eslint cache 25 | .eslintcache 26 | 27 | # Optional REPL history 28 | .node_repl_history 29 | 30 | # Yarn Integrity file 31 | .yarn-integrity 32 | 33 | # dotenv environment variables file 34 | .env 35 | 36 | # docker-compose orchestration file 37 | docker-compose.yml 38 | 39 | # anotations 40 | anotations.txt -------------------------------------------------------------------------------- /views/_partials/page/header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
${options.message}
` // html body 24 | } 25 | 26 | // send mail with defined transport object 27 | const transporterMailed = await transporter.sendMail(mailOptions) 28 | 29 | const reply = { 30 | error: null, 31 | messageId: transporterMailed.messageId, 32 | previewUrl: nodemailer.getTestMessageUrl(transporterMailed) 33 | } 34 | 35 | return reply 36 | } else { 37 | const err = 'Mailer : Parametros {account} e {options} para criação de mailer indefinidos' 38 | 39 | const reply = { 40 | error: err, 41 | messageId: null, 42 | previewUrl: null 43 | } 44 | 45 | return reply 46 | } 47 | } 48 | 49 | module.exports = init 50 | -------------------------------------------------------------------------------- /public/sass/mdb/free/_pagination.scss: -------------------------------------------------------------------------------- 1 | .pagination { 2 | .page-link { 3 | background-color: transparent; 4 | font-size: 0.8rem; 5 | } 6 | .active .page-link { 7 | border-radius: 2px; 8 | transition: all 0.2s linear; 9 | @extend.z-depth-1; 10 | &:hover { 11 | color: #fff; 12 | } 13 | } 14 | } 15 | 16 | // Circle pagination 17 | .pagination { 18 | &.pagination-circle { 19 | .page-link { 20 | border-radius: 50%; 21 | margin-left: 2px; 22 | margin-right: 2px; 23 | &:hover { 24 | border-radius: 50%; 25 | } 26 | } 27 | .active .page-link { 28 | border-radius: 50%; 29 | } 30 | } 31 | } 32 | 33 | .pagination .page-link { 34 | border: 0; 35 | transition: all 0.3s linear; 36 | &:hover { 37 | transition: all 0.3s linear; 38 | background-color: #eee; 39 | } 40 | &:focus { 41 | background-color: transparent; 42 | } 43 | } 44 | 45 | .pagination { 46 | &.pg-blue { 47 | .active .page-link { 48 | background-color: $primary-color; 49 | } 50 | } 51 | &.pg-red { 52 | .active .page-link { 53 | background-color: $danger-color; 54 | } 55 | } 56 | &.pg-teal { 57 | .active .page-link { 58 | background-color: $default-color; 59 | } 60 | } 61 | &.pg-darkgrey { 62 | .active .page-link { 63 | background-color: $special-color; 64 | } 65 | } 66 | &.pg-dark { 67 | .active .page-link { 68 | background-color: $elegant-color; 69 | } 70 | } 71 | &.pg-bluegrey { 72 | .active .page-link { 73 | background-color: #3F729B; 74 | } 75 | } 76 | &.pg-amber { 77 | .active .page-link { 78 | background-color: #ff6f00; 79 | } 80 | } 81 | &.pg-purple { 82 | .active .page-link { 83 | background-color: #5e35b1; 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /views/account/sign-in.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <% include ../_partials/painel/header %> 7 | 8 | 9 | 10 |
2 |
3 |
5 |
6 |
7 |
| # | 38 |Grupo | 39 |Relação | 40 |Ações | 41 |
|---|---|---|---|
| <%= group.id %> | 47 |<%= group.name %> | 48 |49 | <% switch (group.role) { 50 | case 'owner' : %> 51 | Proprietário 52 | <% break 53 | case 'pending' : %> 54 | Pendente 55 | <% break 56 | case 'user' : %> 57 | Usuário 58 | <% break 59 | } %> 60 | | 61 |62 | Ver 63 | <% if(group.role === 'owner') { %> 64 | Excluir 65 | <% } %> 66 | <% if(!group.role) { %> 67 | Participar 68 | <% } %> 69 | | 70 |
Nenhum Grupo Encontrado.
76 | <% } %> 77 |Nenhum Jogo Encontrado.
76 | <% } %> 77 || # | 34 |Grupo | 35 |Pontuação | 36 |
|---|---|---|
| <%= groupRanking.id %> | 42 |<%= groupRanking.name %> | 43 |<%= groupRanking.score ? groupRanking.score : 0 %> | 44 |
| # | 56 |Usuário | 57 |Pontuação | 58 |
|---|---|---|
| <%= userRanking.id %> | 64 |<%= userRanking.name %> | 65 |<%= userRanking.score ? userRanking.score : 0 %> | 66 |
Nenhum Resultado foi Encontrado.
75 | <% } %> 76 |
22 | | # | 25 |Usuário | 26 |Relação | 27 |Ações | 28 |
|---|---|---|---|
| <%= pending.id %> | 34 |<%= pending.name %> | 35 |36 | <% switch (pending.role) { 37 | case 'owner' : %> 38 | Proprietário 39 | <% break 40 | case 'pending' : %> 41 | Pendente 42 | <% break 43 | case 'user' : %> 44 | Usuário 45 | <% break 46 | } %> 47 | | 48 |49 | Permitir 50 | Negar 51 | | 52 |
Sua Aprovação Ainda Encontra-se Pendente.
60 | <% } else { %> 61 |
69 | | # | 95 |Grupo | 96 |Pontos | 97 |
|---|---|---|
| 1 | 102 |Peladeiros da noite | 103 |500 | 104 |
| 2 | 107 |Masters of None | 108 |400 | 109 |
| 3 | 112 |Filhos do Pelé | 113 |300 | 114 |