├── .editorconfig ├── .eslintrc.js ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .lycheeignore ├── .nvmrc ├── .prettierignore ├── .tool-versions ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── apps ├── app │ ├── .env.local.sample │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── components │ │ ├── AppMenu │ │ │ ├── index.tsx │ │ │ └── style.module.css │ │ ├── Auth │ │ │ ├── index.ts │ │ │ ├── withAuth.tsx │ │ │ └── withoutAuth.tsx │ │ ├── Availability │ │ │ └── index.tsx │ │ ├── Badge │ │ │ ├── index.js │ │ │ └── style.module.css │ │ ├── Belt │ │ │ ├── index.js │ │ │ └── style.module.css │ │ ├── Document │ │ │ └── index.js │ │ ├── Emoji │ │ │ └── index.tsx │ │ ├── Event │ │ │ ├── EventInfo.js │ │ │ └── index.js │ │ ├── Koi │ │ │ └── index.js │ │ ├── LectureForm │ │ │ └── index.js │ │ ├── Login │ │ │ ├── index.js │ │ │ └── style.module.css │ │ ├── Navbar │ │ │ ├── index.js │ │ │ └── style.module.css │ │ ├── Ninja │ │ │ └── index.js │ │ ├── NinjaForm │ │ │ └── index.js │ │ ├── Notification │ │ │ └── index.js │ │ ├── Profile │ │ │ ├── index.tsx │ │ │ └── style.module.css │ │ ├── Register │ │ │ ├── index.tsx │ │ │ └── style.module.css │ │ ├── Signup │ │ │ ├── index.tsx │ │ │ └── style.module.css │ │ └── Visibility │ │ │ └── index.tsx │ ├── hooks │ │ ├── badges │ │ │ ├── index.tsx │ │ │ ├── useBadge.tsx │ │ │ └── useBadges.tsx │ │ └── events │ │ │ ├── index.ts │ │ │ ├── useEvent.tsx │ │ │ └── useEvents.tsx │ ├── layouts │ │ ├── AppLayout │ │ │ ├── index.js │ │ │ └── style.module.css │ │ ├── AuthenticationLayout │ │ │ ├── index.js │ │ │ └── style.module.css │ │ ├── ContentLayout │ │ │ ├── index.js │ │ │ └── style.module.css │ │ └── withCustomLayout.js │ ├── lib │ │ ├── belt.tsx │ │ ├── images.js │ │ ├── social.tsx │ │ └── utils.tsx │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── 404.tsx │ │ ├── 500.tsx │ │ ├── _app.tsx │ │ ├── _document.tsx │ │ ├── admin │ │ │ ├── event.tsx │ │ │ ├── event │ │ │ │ └── [id].tsx │ │ │ ├── guardians.tsx │ │ │ ├── lectures │ │ │ │ ├── [id].js │ │ │ │ ├── index.tsx │ │ │ │ └── presences │ │ │ │ │ └── index.tsx │ │ │ ├── mentors.tsx │ │ │ ├── ninjas.tsx │ │ │ └── users.tsx │ │ ├── badge │ │ │ ├── [id].tsx │ │ │ └── style.module.css │ │ ├── badges.js │ │ ├── confirm.js │ │ ├── event │ │ │ ├── [id].tsx │ │ │ └── style.module.css │ │ ├── events.js │ │ ├── files │ │ │ ├── index.js │ │ │ └── new.js │ │ ├── forgot.tsx │ │ ├── inactive.js │ │ ├── index.tsx │ │ ├── lecture │ │ │ └── [id].tsx │ │ ├── lectures │ │ │ └── [role] │ │ │ │ └── [id].tsx │ │ ├── login.js │ │ ├── ninjas │ │ │ ├── edit │ │ │ │ └── [id].js │ │ │ ├── index.tsx │ │ │ └── new.js │ │ ├── profile │ │ │ └── [role] │ │ │ │ └── [id].tsx │ │ ├── register.js │ │ ├── reset.tsx │ │ ├── settings.tsx │ │ └── signup.js │ ├── postcss.config.js │ ├── public │ │ ├── favicon.ico │ │ ├── humans.txt │ │ ├── img │ │ │ ├── logo-draw-white.svg │ │ │ ├── logo-lettering-dark.svg │ │ │ ├── logo-lettering-light.svg │ │ │ └── logo.svg │ │ ├── koi │ │ │ ├── CD-Character-Female-1-1.png │ │ │ ├── CD-Character-Female-1-10.png │ │ │ ├── CD-Character-Female-1-11.png │ │ │ ├── CD-Character-Female-1-2.png │ │ │ ├── CD-Character-Female-1-3.png │ │ │ ├── CD-Character-Female-1-4.png │ │ │ ├── CD-Character-Female-1-5.png │ │ │ ├── CD-Character-Female-1-6.png │ │ │ ├── CD-Character-Female-1-7.png │ │ │ ├── CD-Character-Female-1-8.png │ │ │ ├── CD-Character-Female-1-9.png │ │ │ ├── CD-Character-Female-2-1.png │ │ │ ├── CD-Character-Female-2-10.png │ │ │ ├── CD-Character-Female-2-11.png │ │ │ ├── CD-Character-Female-2-2.png │ │ │ ├── CD-Character-Female-2-3.png │ │ │ ├── CD-Character-Female-2-4.png │ │ │ ├── CD-Character-Female-2-5.png │ │ │ ├── CD-Character-Female-2-6.png │ │ │ ├── CD-Character-Female-2-7.png │ │ │ ├── CD-Character-Female-2-8.png │ │ │ ├── CD-Character-Female-2-9.png │ │ │ ├── CD-Character-Female-3-1.png │ │ │ ├── CD-Character-Female-4-1.png │ │ │ ├── CD-Character-Male-1-1.png │ │ │ ├── CD-Character-Male-1-10.png │ │ │ ├── CD-Character-Male-1-11.png │ │ │ ├── CD-Character-Male-1-2.png │ │ │ ├── CD-Character-Male-1-3.png │ │ │ ├── CD-Character-Male-1-4.png │ │ │ ├── CD-Character-Male-1-5.png │ │ │ ├── CD-Character-Male-1-6.png │ │ │ ├── CD-Character-Male-1-7.png │ │ │ ├── CD-Character-Male-1-8.png │ │ │ ├── CD-Character-Male-1-9.png │ │ │ ├── CD-Character-Male-3-1.png │ │ │ ├── CD-Character-Male-4-1.png │ │ │ ├── CoderDojoBraga_lettering_dark.png │ │ │ ├── CoderDojoBraga_lettering_light.png │ │ │ ├── Foto-de-Capa4.png │ │ │ ├── Ninja_Amarelo.png │ │ │ ├── Ninja_Azul.png │ │ │ ├── Ninja_Branco.png │ │ │ ├── Ninja_Laranja.png │ │ │ ├── Ninja_Preto.png │ │ │ ├── Ninja_Roxo.png │ │ │ ├── Ninja_Verde.png │ │ │ ├── Ninja_Vermelho.png │ │ │ ├── conversation.png │ │ │ ├── fish1 │ │ │ │ ├── fin.svg │ │ │ │ ├── fish_normal.svg │ │ │ │ ├── turn_hard.svg │ │ │ │ ├── turn_medium.svg │ │ │ │ └── turn_soft.svg │ │ │ ├── fish2 │ │ │ │ ├── fin.svg │ │ │ │ ├── fish_normal.svg │ │ │ │ ├── turn_hard.svg │ │ │ │ ├── turn_medium.svg │ │ │ │ └── turn_soft.svg │ │ │ ├── fish3 │ │ │ │ ├── fin.svg │ │ │ │ ├── fish_normal.svg │ │ │ │ ├── turn_hard.svg │ │ │ │ ├── turn_medium.svg │ │ │ │ └── turn_soft.svg │ │ │ ├── fish4 │ │ │ │ ├── fin.svg │ │ │ │ ├── fish_normal.svg │ │ │ │ ├── turn_hard.svg │ │ │ │ ├── turn_medium.svg │ │ │ │ └── turn_soft.svg │ │ │ ├── fish5 │ │ │ │ ├── fin.svg │ │ │ │ ├── fish_normal.svg │ │ │ │ ├── turn_hard.svg │ │ │ │ ├── turn_medium.svg │ │ │ │ └── turn_soft.svg │ │ │ ├── hands_up.png │ │ │ ├── hardware.png │ │ │ ├── head_man.png │ │ │ ├── keyboard.png │ │ │ ├── logo-esquerda.png │ │ │ ├── map.png │ │ │ ├── palete.png │ │ │ ├── pc.png │ │ │ ├── plant.svg │ │ │ ├── raspberry.png │ │ │ ├── robot.png │ │ │ ├── shadow.png │ │ │ ├── silhouette │ │ │ │ ├── fin.png │ │ │ │ ├── fish_normal.png │ │ │ │ ├── turn_hard.png │ │ │ │ ├── turn_medium.png │ │ │ │ └── turn_soft.png │ │ │ ├── smile.png │ │ │ ├── space.png │ │ │ ├── star.png │ │ │ ├── twins.png │ │ │ ├── wheel.png │ │ │ └── world.png │ │ └── vendor │ │ │ └── koi-animation.min.js │ ├── styles │ │ ├── Dashboard.module.css │ │ ├── Forms.module.css │ │ ├── Home.module.css │ │ ├── antd.less │ │ ├── globals.css │ │ ├── koi │ │ │ ├── fish1-animation.css │ │ │ ├── fish2-animation.css │ │ │ ├── fish3-animation.css │ │ │ ├── fish4-animation.css │ │ │ ├── fish5-animation.css │ │ │ ├── koi-animation.css │ │ │ └── silhouette-animation.css │ │ └── tailwind.css │ └── tsconfig.json ├── blog │ ├── .env.local.sample │ ├── .eslintrc.js │ ├── README.md │ ├── _posts │ │ ├── bogosort.md │ │ ├── choosing-first-language.md │ │ ├── jess-2022.md │ │ └── template.txt │ ├── components │ │ ├── Author │ │ │ └── index.tsx │ │ ├── Entry │ │ │ └── index.tsx │ │ ├── Featured │ │ │ └── index.tsx │ │ ├── Markdown │ │ │ ├── index.tsx │ │ │ └── style.module.css │ │ ├── Menu │ │ │ └── index.tsx │ │ ├── Pagination │ │ │ └── index.tsx │ │ ├── Post │ │ │ └── index.tsx │ │ └── Topic │ │ │ └── index.tsx │ ├── lib │ │ ├── blog.ts │ │ └── types.ts │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── 404.tsx │ │ ├── 500.tsx │ │ ├── _app.tsx │ │ ├── author │ │ │ └── [username].tsx │ │ ├── index.tsx │ │ ├── posts │ │ │ └── [slug].tsx │ │ └── topic │ │ │ └── [topic].tsx │ ├── postcss.config.js │ ├── public │ │ ├── favicon.ico │ │ ├── humans.txt │ │ └── img │ │ │ ├── logo-draw-white.svg │ │ │ ├── logo-lettering-dark.svg │ │ │ ├── logo-lettering-light.svg │ │ │ ├── logo.svg │ │ │ └── team │ │ │ ├── jess.jpg │ │ │ ├── mario.jpg │ │ │ ├── ninja.jpg │ │ │ ├── ruiasribeiro.jpg │ │ │ └── ruioliveira02.jpg │ ├── styles │ │ ├── antd.css │ │ ├── antd.less │ │ └── globals.css │ └── tsconfig.json ├── maintenance │ ├── .eslintrc.json │ ├── .gitignore │ ├── README.md │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── 404.tsx │ │ ├── _app.tsx │ │ └── index.tsx │ ├── postcss.config.js │ ├── public │ │ ├── favicon.ico │ │ └── img │ │ │ └── logo.svg │ ├── styles │ │ ├── Home.module.css │ │ └── globals.css │ └── tsconfig.json └── web │ ├── .env.local.sample │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── _docs │ └── terms-of-service.tex │ ├── components │ ├── Belt │ │ ├── Belt.tsx │ │ ├── Ninja.tsx │ │ └── index.ts │ ├── Champion │ │ └── index.js │ ├── Communication │ │ └── index.tsx │ ├── Developer │ │ └── index.tsx │ ├── Hero │ │ ├── Hero.tsx │ │ └── index.ts │ ├── Member │ │ └── index.tsx │ ├── Mentor │ │ └── index.tsx │ ├── Schedule │ │ └── index.js │ └── Speaker │ │ └── index.js │ ├── data │ ├── activities_day_one.json │ ├── activities_day_two.json │ ├── curriculum.ts │ ├── faqs.json │ ├── speakers.json │ └── team.json │ ├── lib │ └── types.ts │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── pages │ ├── 404.tsx │ ├── 500.tsx │ ├── _app.tsx │ ├── codercamp-23.tsx │ ├── curriculum.tsx │ ├── dojocon.tsx │ ├── faqs.tsx │ ├── index.tsx │ ├── recruitment.tsx │ └── team.tsx │ ├── postcss.config.js │ ├── public │ ├── docs │ │ └── terms-of-service.pdf │ ├── favicon.ico │ ├── fonts │ │ └── bankai │ │ │ └── bankai.otf │ ├── humans.txt │ └── img │ │ ├── code.svg │ │ ├── codercamp.png │ │ ├── codercamp_horario.png │ │ ├── half_logo.svg │ │ ├── logo-draw-white.svg │ │ ├── logo-lettering-dark.svg │ │ ├── logo-lettering-light.svg │ │ ├── logo.svg │ │ ├── mentor.jpg │ │ ├── projects │ │ └── number.png │ │ └── team │ │ ├── adrianafrazao.png │ │ ├── afonsocarpinteiro.jpg │ │ ├── afonsodionisio.jpg │ │ ├── afonsomartins.jpg │ │ ├── afonsopimenta.jpg │ │ ├── analeite.png │ │ ├── anarita.png │ │ ├── andreiacardoso.jpg │ │ ├── andremota.png │ │ ├── bernardgeorges.jpg │ │ ├── carlosribeiro.jpg │ │ ├── catarinacruz.jpg │ │ ├── danielpereira.jpg │ │ ├── diogolameira.png │ │ ├── diogomatos.jpg │ │ ├── diogoneto.png │ │ ├── eduardofaria.png │ │ ├── eduardoreis.png │ │ ├── filipefelicio.jpg │ │ ├── filiperodrigues.jpg │ │ ├── franciscacosta.png │ │ ├── gersonjunior.jpg │ │ ├── goncalocosta.jpg │ │ ├── guardapedropereira.jpg │ │ ├── guilhermevara.png │ │ ├── gustavocastro.png │ │ ├── gustavopereira.jpg │ │ ├── heitorfernandes.jpg │ │ ├── heldergomes.jpg │ │ ├── henriquepereira.jpg │ │ ├── humbertogomes.jpg │ │ ├── jessicafernandes.jpg │ │ ├── jno.png │ │ ├── joanabranco.jpg │ │ ├── joanafernandes.png │ │ ├── joanapereira.png │ │ ├── joaoalvim.jpg │ │ ├── joaocoelho.jpg │ │ ├── joaolobo.jpg │ │ ├── jorgeteixeira.png │ │ ├── josefonte.jpg │ │ ├── joselopes.jpg │ │ ├── joséoliveira.jpg │ │ ├── juliopinto.jpg │ │ ├── lararegina.jpg │ │ ├── luisfelicio.jpg │ │ ├── luispereira.jpg │ │ ├── manelcarvalho.jpg │ │ ├── mariavale.jpg │ │ ├── mariorodrigues.jpg │ │ ├── martagoncalves.jpg │ │ ├── martarodrigues.png │ │ ├── martasilva.jpg │ │ ├── martimferreira.jpg │ │ ├── nelsonalmeida.jpg │ │ ├── ninja.jpg │ │ ├── nunocosta.png │ │ ├── nunofernandes.jpg │ │ ├── pedrolopes.jpg │ │ ├── pedropereira.jpg │ │ ├── pedrosousa.png │ │ ├── ricardolucena.jpg │ │ ├── ritacamacho.png │ │ ├── roberto.jpg │ │ ├── rodrigocasalnovo.png │ │ ├── rodrigopereira.jpg │ │ ├── ruilopes.jpg │ │ ├── ruioliveira.jpg │ │ ├── ruipinto.png │ │ ├── ruiribeiro.png │ │ ├── sarasilva.jpg │ │ ├── simaoquintela.jpg │ │ ├── tales.png │ │ ├── tiagorodrigues.png │ │ ├── vitorlelis.jpg │ │ └── zitaduarte.jpg │ ├── styles │ ├── antd.less │ ├── globals.css │ └── index.module.css │ └── tsconfig.json ├── netlify.toml ├── package-lock.json ├── package.json ├── packages ├── bokkenjs │ ├── index.ts │ ├── lib │ │ ├── admin │ │ │ ├── admin.ts │ │ │ └── index.ts │ │ ├── api.ts │ │ ├── auth │ │ │ ├── auth.ts │ │ │ └── index.ts │ │ ├── availabilities │ │ │ ├── availabilities.ts │ │ │ └── index.ts │ │ ├── badges │ │ │ ├── badges.ts │ │ │ └── index.ts │ │ ├── enrollments │ │ │ ├── enrollments.ts │ │ │ └── index.ts │ │ ├── events │ │ │ ├── events.ts │ │ │ └── index.ts │ │ ├── files │ │ │ ├── files.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── lectures │ │ │ ├── index.ts │ │ │ └── lectures.ts │ │ ├── locations │ │ │ ├── index.ts │ │ │ └── locations.ts │ │ ├── skills │ │ │ ├── index.ts │ │ │ └── skills.ts │ │ ├── teams │ │ │ ├── index.ts │ │ │ └── teams.ts │ │ └── users │ │ │ ├── guardians.ts │ │ │ ├── index.ts │ │ │ ├── mentors.ts │ │ │ ├── ninjas.ts │ │ │ ├── types.ts │ │ │ └── users.ts │ ├── package.json │ └── tsconfig.json ├── eslint-config-coderdojobraga │ ├── index.js │ └── package.json ├── tailwind-config-coderdojobraga │ ├── package.json │ └── tailwind.config.js ├── tsconfig │ ├── README.md │ ├── base.json │ ├── jslibrary.json │ ├── nextjs.json │ ├── package.json │ └── react-library.json └── ui │ ├── components │ ├── Auth │ │ ├── AuthContext.tsx │ │ ├── AuthProvider.tsx │ │ ├── index.ts │ │ ├── types.ts │ │ └── useAuth.tsx │ ├── ErrorPage │ │ └── index.tsx │ ├── Theme │ │ ├── ThemeContext.tsx │ │ ├── ThemeProvider.tsx │ │ ├── ThemeToggle │ │ │ ├── ThemeToggle.tsx │ │ │ ├── index.ts │ │ │ └── style.module.css │ │ ├── index.ts │ │ ├── types.ts │ │ └── useTheme.tsx │ ├── index.ts │ └── landing │ │ ├── Footer │ │ ├── Footer.tsx │ │ ├── config.tsx │ │ ├── index.ts │ │ └── types.ts │ │ ├── Header │ │ ├── Header.tsx │ │ ├── MobileNavBar │ │ │ ├── MobileNavBar.tsx │ │ │ ├── index.ts │ │ │ └── style.module.css │ │ ├── NavBar │ │ │ ├── NavBar.tsx │ │ │ ├── index.ts │ │ │ └── style.module.css │ │ ├── config.ts │ │ ├── index.ts │ │ └── utils.ts │ │ └── index.ts │ ├── index.ts │ ├── package.json │ └── tsconfig.json ├── reviewpad.yml └── turbo.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | max_line_length = 80 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | max_line_length = 0 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["coderdojobraga"], 4 | settings: { 5 | next: { 6 | rootDir: ["apps/*/"], 7 | }, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | types: [opened, synchronize] 9 | 10 | jobs: 11 | build: 12 | name: Build 13 | timeout-minutes: 15 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | node-version: [16.x] 19 | 20 | steps: 21 | - name: Check out code 22 | uses: actions/checkout@v3 23 | with: 24 | fetch-depth: 2 25 | 26 | - name: Setup Node.js environment 27 | uses: actions/setup-node@v3 28 | with: 29 | node-version: ${{ matrix.node }} 30 | cache: "npm" 31 | 32 | - name: Install dependencies 33 | run: npm ci 34 | 35 | - name: Build 36 | run: npm run build 37 | 38 | link-checker: 39 | name: Link Checker 40 | timeout-minutes: 2 41 | runs-on: ubuntu-latest 42 | steps: 43 | - uses: actions/checkout@v3 44 | 45 | - name: Link Checker 46 | uses: lycheeverse/lychee-action@v1 47 | with: 48 | args: --require-https --no-progress --exclude-path package-lock.json --exclude-path apps/app/lib/social.tsx --exclude-path packages/ui/components/landing/Footer/config.tsx './**/*.md' './**/*.html' './**/*.json' './**/*.tsx' './**/*.ts' './**/*.js' './**/*.tex' 49 | fail: true 50 | env: 51 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # vercel 2 | .vercel 3 | 4 | # netlify 5 | .netlify 6 | 7 | # turbo 8 | .turbo 9 | 10 | # dependencies 11 | node_modules 12 | .pnp 13 | .pnp.js 14 | 15 | # testing 16 | coverage 17 | 18 | # next.js 19 | .next/ 20 | out/ 21 | build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # local env files 34 | .env.* 35 | !.env.*.sample 36 | -------------------------------------------------------------------------------- /.lycheeignore: -------------------------------------------------------------------------------- 1 | http:\/\/localhost:.* 2 | https:\/\/fonts\.gstatic\.com 3 | https:\/\/fonts\.googleapis\.com 4 | npm@8\.15\.0 5 | https:\/\/twitter\.com 6 | 7 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 16.17.0 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | .netlify 3 | .turbo 4 | node_modules 5 | coverage 6 | .next/ 7 | out/ 8 | build 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | .pnpm-debug.log* 13 | *.min.js 14 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | nodejs 16.17.0 2 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 CoderDojo Braga 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /apps/app/.env.local.sample: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_API_URL=http://localhost:4000 2 | WEB_URL=http://localhost:3000 3 | BLOG_URL=http://localhost:3001 4 | APP_URL=http://localhost:3002 5 | -------------------------------------------------------------------------------- /apps/app/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["coderdojobraga"], 4 | }; 5 | -------------------------------------------------------------------------------- /apps/app/.gitignore: -------------------------------------------------------------------------------- 1 | # compiled 2 | styles/antd.css 3 | .env -------------------------------------------------------------------------------- /apps/app/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | First, run the development server: 4 | 5 | ```bash 6 | yarn dev 7 | ``` 8 | 9 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 10 | 11 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. 12 | 13 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. 14 | 15 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. 16 | 17 | ## Learn More 18 | 19 | To learn more about Next.js, take a look at the following resources: 20 | 21 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 22 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 23 | 24 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 25 | 26 | ## Deploy on Vercel 27 | 28 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js. 29 | 30 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 31 | -------------------------------------------------------------------------------- /apps/app/components/AppMenu/style.module.css: -------------------------------------------------------------------------------- 1 | .logo { 2 | width: 90%; 3 | margin-top: 20px; 4 | margin-left: 5%; 5 | cursor: pointer; 6 | } 7 | 8 | .logo_collapsed { 9 | width: 60%; 10 | margin: auto; 11 | margin-top: 20px; 12 | cursor: pointer; 13 | } 14 | 15 | .user { 16 | display: flex; 17 | flex-direction: column; 18 | align-items: center; 19 | justify-content: center; 20 | padding-top: 50px; 21 | padding-bottom: 35px; 22 | text-align: center; 23 | text-transform: capitalize; 24 | } 25 | 26 | .avatar { 27 | margin-bottom: 5px; 28 | } 29 | 30 | .menu { 31 | display: flex; 32 | flex-direction: column; 33 | height: 100vh; 34 | overflow: auto; 35 | background-color: #fff; 36 | } 37 | 38 | .menu * { 39 | max-width: 100%; 40 | } 41 | 42 | .primary { 43 | flex-grow: 1; 44 | height: max-content; 45 | } 46 | 47 | .secondary { 48 | height: max-content; 49 | padding-bottom: 10px; 50 | } 51 | -------------------------------------------------------------------------------- /apps/app/components/Auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./withAuth"; 2 | export * from "./withoutAuth"; 3 | -------------------------------------------------------------------------------- /apps/app/components/Auth/withAuth.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/router"; 2 | import { useAuth } from "@coderdojobraga/ui"; 3 | import { EUser } from "bokkenjs"; 4 | 5 | export function withAuth(WrappedComponent: any) { 6 | // eslint-disable-next-line react/display-name 7 | return (props: any) => { 8 | const router = useRouter(); 9 | const { user } = useAuth(); 10 | 11 | if (!user) { 12 | router.replace("/login"); 13 | return null; 14 | } 15 | 16 | if (router.pathname !== "/confirm" && !user.verified) { 17 | router.replace("/confirm"); 18 | return null; 19 | } 20 | 21 | if (router.pathname !== "/inactive" && !user.active) { 22 | router.replace("/inactive"); 23 | return null; 24 | } 25 | 26 | if (router.pathname !== "/register" && user.active && !user.registered) { 27 | router.replace("/register"); 28 | return null; 29 | } 30 | 31 | if (user.active && router.pathname === "/inactive") { 32 | router.replace("/"); 33 | return null; 34 | } 35 | 36 | if (router.pathname.startsWith("/admin") && user.role != EUser.Organizer) { 37 | router.replace("/404"); 38 | return null; 39 | } 40 | 41 | return ; 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /apps/app/components/Auth/withoutAuth.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/router"; 2 | import { useAuth } from "@coderdojobraga/ui"; 3 | 4 | export function withoutAuth(WrappedComponent: any) { 5 | // eslint-disable-next-line react/display-name 6 | return (props: any) => { 7 | const router = useRouter(); 8 | const { user } = useAuth(); 9 | 10 | if (user) { 11 | if (user.registered) { 12 | router.replace(`/`); 13 | } else { 14 | router.replace("/register"); 15 | } 16 | 17 | return null; 18 | } 19 | 20 | return ; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /apps/app/components/Availability/index.tsx: -------------------------------------------------------------------------------- 1 | import { Avatar, List, Row, Switch, Typography } from "antd"; 2 | import Link from "next/link"; 3 | 4 | const { Title } = Typography; 5 | 6 | function Availability({ title, mentors, available, setAvailable }: any) { 7 | return ( 8 | <> 9 | 10 | 11 | {title} ({mentors.length}) 12 | 13 | setAvailable(!available)} 17 | /> 18 | 19 | ( 23 | 24 | 25 | } 27 | title={`${mentor.first_name} ${mentor.last_name}`} 28 | description={mentor.notes ? `Notas: ${mentor.notes}` : ""} 29 | /> 30 | 31 | 32 | )} 33 | /> 34 | 35 | ); 36 | } 37 | 38 | export default Availability; 39 | -------------------------------------------------------------------------------- /apps/app/components/Badge/index.js: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | import { Card, Skeleton } from "antd"; 3 | import styles from "./style.module.css"; 4 | 5 | const { Meta } = Card; 6 | 7 | const Badge = ({ id, image, name, description, loading = false }) => { 8 | return ( 9 | 10 | 11 | 19 | ) : ( 20 | /* eslint-disable @next/next/no-img-element */ 21 | {description} 22 | ) 23 | } 24 | > 25 | 26 | 27 | 28 | 29 | ); 30 | }; 31 | 32 | export default Badge; 33 | -------------------------------------------------------------------------------- /apps/app/components/Badge/style.module.css: -------------------------------------------------------------------------------- 1 | .card { 2 | margin: 10px 0; 3 | } 4 | 5 | .image { 6 | padding: 20px; 7 | } 8 | -------------------------------------------------------------------------------- /apps/app/components/Belt/index.js: -------------------------------------------------------------------------------- 1 | import { Tag } from "antd"; 2 | import { BELT_PT } from "~/lib/belt"; 3 | 4 | import styles from "./style.module.css"; 5 | 6 | export default function Belt({ belt }) { 7 | const isWhite = belt === "white"; 8 | 9 | return ( 10 | 15 | {!belt ? BELT_PT[""] : BELT_PT[belt]} 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /apps/app/components/Belt/style.module.css: -------------------------------------------------------------------------------- 1 | .capitalize { 2 | text-transform: capitalize; 3 | } 4 | 5 | .nobelt { 6 | background: #fff; 7 | border-style: dashed; 8 | } 9 | -------------------------------------------------------------------------------- /apps/app/components/Emoji/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { 2 | CSSProperties, 3 | ClassAttributes, 4 | PropsWithChildren, 5 | } from "react"; 6 | 7 | interface Props { 8 | style?: CSSProperties; 9 | className?: any; 10 | label: string; 11 | } 12 | 13 | const Emoji = ({ 14 | label, 15 | style, 16 | className, 17 | children, 18 | }: PropsWithChildren) => ( 19 | 20 | {children} 21 | 22 | ); 23 | 24 | export default Emoji; 25 | -------------------------------------------------------------------------------- /apps/app/components/Koi/index.js: -------------------------------------------------------------------------------- 1 | import Script from "next/script"; 2 | 3 | function Koi() { 4 | if (window.innerWidth <= 1030) { 5 | return null; 6 | } 7 | return ( 8 | <> 9 |