├── mobile ├── .gitattributes ├── .env.example ├── src │ ├── @types │ │ ├── png │ │ │ └── index.d.ts │ │ └── navigation │ │ │ └── index.d.ts │ ├── assets │ │ ├── xp.png │ │ ├── gold.png │ │ ├── logo.png │ │ ├── medal.png │ │ ├── pixel.png │ │ ├── trophy.png │ │ ├── wizard.png │ │ ├── BlueLogo.png │ │ ├── map_icon.png │ │ ├── naughty.png │ │ ├── preview.png │ │ ├── SplashLogo.png │ │ ├── correctSong.mp3 │ │ ├── icon_phase.png │ │ ├── menu-trophy.png │ │ ├── pixel-black.png │ │ ├── sunglasses.png │ │ ├── wrongSong.mp3 │ │ ├── finishedGame.mp3 │ │ ├── naughty-black.png │ │ ├── sunglasses-black.png │ │ └── menu-trophy-black.png │ ├── pages │ │ ├── NextSignUp │ │ │ └── INextSignUp.ts │ │ ├── Perfil │ │ │ ├── IPerfil.ts │ │ │ └── StatisticsCard │ │ │ │ ├── styles.ts │ │ │ │ └── index.tsx │ │ ├── Phase │ │ │ ├── styles.ts │ │ │ ├── Practical │ │ │ │ └── IPractical.ts │ │ │ ├── Theoretical │ │ │ │ ├── Header │ │ │ │ │ ├── styles.ts │ │ │ │ │ └── index.tsx │ │ │ │ └── class2.md │ │ │ └── IPhase.ts │ │ ├── Home │ │ │ └── IHome.ts │ │ ├── Achievements │ │ │ ├── ChallengeBar │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── ChallengeCards │ │ │ │ ├── styles.ts │ │ │ │ └── index.tsx │ │ │ ├── styles.ts │ │ │ └── index.tsx │ │ ├── FinishSignUp │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ └── SignIn │ │ │ └── styles.ts │ ├── services │ │ └── api.ts │ ├── Global │ │ └── styles │ │ │ ├── styles.d.ts │ │ │ └── theme.ts │ ├── components │ │ ├── Menu │ │ │ └── styles.ts │ │ ├── Command │ │ │ ├── styles.ts │ │ │ └── index.tsx │ │ ├── ActivityStatusModal │ │ │ ├── styles.ts │ │ │ └── index.tsx │ │ ├── Form │ │ │ ├── Button │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── PasswordInput │ │ │ │ └── styles.ts │ │ │ └── Input │ │ │ │ ├── styles.ts │ │ │ │ └── index.tsx │ │ ├── Editor │ │ │ └── styles.ts │ │ └── Bash │ │ │ └── styles.ts │ ├── utils │ │ ├── tailwindComponents.ts │ │ └── playSound.ts │ ├── routes │ │ ├── CustomTabBarButton │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ └── app.routes.tsx │ └── hooks │ │ └── useCachedResources.tsx ├── android │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values-night │ │ │ │ │ │ └── colors.xml │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── drawable │ │ │ │ │ │ └── splashscreen.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── devlandia │ │ │ │ │ └── generated │ │ │ │ │ └── BasePackageList.java │ │ │ └── debug │ │ │ │ └── AndroidManifest.xml │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ ├── build_defs.bzl │ │ └── BUCK │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── build.gradle │ └── gradle.properties ├── .eslintignore ├── assets │ ├── _splash.png │ └── splash.png ├── ios │ ├── devlandia │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ ├── SplashScreen.imageset │ │ │ │ ├── splashscreen.png │ │ │ │ └── Contents.json │ │ │ ├── SplashScreenBackground.imageset │ │ │ │ ├── background.png │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── main.m │ │ ├── AppDelegate.h │ │ └── Supporting │ │ │ └── Expo.plist │ └── Podfile ├── .buckconfig ├── metro.config.js ├── .editorconfig ├── __tests__ │ └── App.js ├── tsconfig.json ├── index.js ├── app.json ├── babel.config.js ├── tailwind.config.js └── App.tsx ├── backend ├── .dockerignore ├── .eslintignore ├── .gitignore ├── public │ └── home_print.png ├── .env.example ├── src │ ├── config │ │ └── auth.ts │ ├── shared │ │ └── infra │ │ │ ├── prisma │ │ │ └── client.ts │ │ │ ├── http │ │ │ ├── server.ts │ │ │ ├── errors │ │ │ │ ├── PageNotFound.ts │ │ │ │ └── AccessDeniedError.ts │ │ │ ├── routes │ │ │ │ ├── authenticate.routes.ts │ │ │ │ ├── index.ts │ │ │ │ ├── users.routes.ts │ │ │ │ ├── maps.routes.ts │ │ │ │ ├── phases.routes.ts │ │ │ │ ├── game.routes.ts │ │ │ │ └── activity.routes.ts │ │ │ ├── middlewares │ │ │ │ ├── ensureAdmin.ts │ │ │ │ └── ensureAuthenticated.ts │ │ │ └── app.ts │ │ │ └── typeorm │ │ │ ├── index.ts │ │ │ ├── migrations │ │ │ ├── 1639775862490-rename-table-phase-repository.ts │ │ │ ├── 1649982808024-AlterTablePhases.ts │ │ │ ├── 1641247134998-create-column-order-maps.ts │ │ │ ├── 1641247745198-add-column-order-phases.ts │ │ │ ├── 1655497381403-add-column-color-phases.ts │ │ │ ├── 1642029559208-add-column-order-activities.ts │ │ │ ├── 1639840548616-create-column-is-done-in-user-map.ts │ │ │ ├── 1656192232357-add-column-abstracted-name.ts │ │ │ ├── 1639777824268-drop-column-id-in-phases-activities.ts │ │ │ ├── 1638065397847-create-table-maps.ts │ │ │ ├── 1646583020373-add-column-phaseId-activities.ts │ │ │ ├── 1638919395231-create-table-activities.ts │ │ │ ├── 1643553616486-create-table-tips.ts │ │ │ ├── 1646582701234-remove-table-phases-activities.ts │ │ │ ├── 1639522424366-create-table-options.ts │ │ │ ├── 1639006025223-create-table-phase-activity.ts │ │ │ ├── 1642888359282-create-table-default-code.ts │ │ │ ├── 1642599438454-create-table-activity-answer.ts │ │ │ └── 1638406652432-create-table-phases.ts │ │ │ └── seed │ │ │ ├── user.ts │ │ │ ├── admin.ts │ │ │ └── maps.ts │ ├── core │ │ └── domain │ │ │ └── errors │ │ │ └── IAppError.ts │ ├── modules │ │ ├── maps │ │ │ ├── dtos │ │ │ │ ├── ICreateMapDTO.ts │ │ │ │ └── IUpdateMapDTO.ts │ │ │ ├── useCases │ │ │ │ ├── UpdateMap │ │ │ │ │ ├── errors │ │ │ │ │ │ └── MapDoesNotExistsError.ts │ │ │ │ │ ├── UpdateMapController.ts │ │ │ │ │ └── UpdateMapUseCase.ts │ │ │ │ ├── ListMaps │ │ │ │ │ ├── ListMapsUseCase.ts │ │ │ │ │ └── ListMapsController.ts │ │ │ │ └── CreateMap │ │ │ │ │ ├── CreateMapController.ts │ │ │ │ │ ├── CreateMapUseCase.ts │ │ │ │ │ └── CreateMapUseCase.spec.ts │ │ │ ├── repositories │ │ │ │ └── IMapsRepository.ts │ │ │ └── infra │ │ │ │ └── typeorm │ │ │ │ └── entities │ │ │ │ └── Map.ts │ │ ├── activities │ │ │ ├── dtos │ │ │ │ ├── IAddActivitiesToPhaseDTO.ts │ │ │ │ ├── ICreateOptionActivityDTO.ts │ │ │ │ ├── IAddOptionsToActivityDTO.ts │ │ │ │ ├── ICreateOptionDTO.ts │ │ │ │ ├── IUpdateActivityDTO.ts │ │ │ │ └── ICreateActivityDTO.ts │ │ │ ├── repositories │ │ │ │ ├── ITipsRepository.ts │ │ │ │ ├── IOptionsRepository.ts │ │ │ │ ├── IActivitiesOptionsRepository.ts │ │ │ │ ├── IActivitiesRepository.ts │ │ │ │ └── in-memory │ │ │ │ │ ├── InMemoryTipsRepository.ts │ │ │ │ │ ├── InMemoryActivitiesAnswersRepository.ts │ │ │ │ │ ├── InMemoryOptionsRepository.ts │ │ │ │ │ ├── InMemoryActivitiesDefaultCodeRepository.ts │ │ │ │ │ └── InMemoryActivityRepository.ts │ │ │ ├── useCases │ │ │ │ ├── AddOptionsToActivity │ │ │ │ │ ├── errors │ │ │ │ │ │ └── ActivityNotFoundError.ts │ │ │ │ │ └── AddOptionsToActivityController.ts │ │ │ │ ├── UpdateActivity │ │ │ │ │ ├── errors │ │ │ │ │ │ └── ActivityDoesNotExistsError.ts │ │ │ │ │ └── UpdateActivityController.ts │ │ │ │ ├── ListActivities │ │ │ │ │ ├── ListActivitiesUseCase.ts │ │ │ │ │ └── ListActivitiesController.ts │ │ │ │ └── CreateActivity │ │ │ │ │ └── CreateActivityController.ts │ │ │ └── infra │ │ │ │ └── typeorm │ │ │ │ ├── entities │ │ │ │ ├── ActivityAnswer.ts │ │ │ │ ├── ActivityDefaultCode.ts │ │ │ │ ├── Tip.ts │ │ │ │ ├── Option.ts │ │ │ │ └── Activity.ts │ │ │ │ └── repositories │ │ │ │ ├── TipsRepository.ts │ │ │ │ ├── OptionsRepository.ts │ │ │ │ ├── ActivitiesAnswersRepository.ts │ │ │ │ └── ActivitiesDefaultCodeRepository.ts │ │ ├── accounts │ │ │ ├── dtos │ │ │ │ ├── ICreateUserDTO.ts │ │ │ │ └── IUserResponseDTO.ts │ │ │ ├── useCases │ │ │ │ ├── AuthenticateUser │ │ │ │ │ ├── errors │ │ │ │ │ │ └── InvalidEmailOrPassword.ts │ │ │ │ │ ├── AuthenticateUserController.ts │ │ │ │ │ └── AuthenticateUserUseCase.ts │ │ │ │ ├── GetUserProfile │ │ │ │ │ ├── errors │ │ │ │ │ │ └── UserNotFound.ts │ │ │ │ │ ├── GetUserProfileController.ts │ │ │ │ │ └── GetUserProfileUseCase.ts │ │ │ │ └── CreateUser │ │ │ │ │ ├── errors │ │ │ │ │ ├── EmailAlreadyExistsError.ts │ │ │ │ │ └── UsernameAlreadyExistsError.ts │ │ │ │ │ └── CreateUserController.ts │ │ │ ├── repositories │ │ │ │ ├── IUsersRepository.ts │ │ │ │ └── in-memory │ │ │ │ │ └── InMemoryUsersRepository.ts │ │ │ ├── mappers │ │ │ │ └── UserMapper.ts │ │ │ └── infra │ │ │ │ └── typeorm │ │ │ │ ├── entities │ │ │ │ └── User.ts │ │ │ │ └── repositories │ │ │ │ └── UsersRepository.ts │ │ ├── game │ │ │ ├── repositories │ │ │ │ ├── IUsersPhasesRepository.ts │ │ │ │ ├── IUsersMapsRepository.ts │ │ │ │ └── in-memory │ │ │ │ │ ├── InMemoryUsersPhasesRepository.ts │ │ │ │ │ └── InMemoryUsersMapsRepository.ts │ │ │ ├── useCases │ │ │ │ ├── ListTree │ │ │ │ │ └── ListTreeController.ts │ │ │ │ ├── CorrectPhase │ │ │ │ │ └── CorrectPhaseController.ts │ │ │ │ └── HandleNextMap │ │ │ │ │ └── HandleNextMapUseCase.ts │ │ │ └── infra │ │ │ │ └── typeorm │ │ │ │ ├── entities │ │ │ │ ├── UserMap.ts │ │ │ │ └── UserPhase.ts │ │ │ │ └── repositories │ │ │ │ ├── UsersPhasesRepository.ts │ │ │ │ └── UsersMapsRepository.ts │ │ ├── phases │ │ │ ├── useCases │ │ │ │ ├── CreatePhase │ │ │ │ │ ├── errors │ │ │ │ │ │ ├── MapNotFoundError.ts │ │ │ │ │ │ └── InvalidMaxLevelError.ts │ │ │ │ │ └── CreatePhaseController.ts │ │ │ │ ├── ListPhases │ │ │ │ │ ├── ListPhasesController.ts │ │ │ │ │ └── ListPhasesUseCase.ts │ │ │ │ ├── UpdatePhase │ │ │ │ │ ├── errors │ │ │ │ │ │ └── PhaseDoesNotExistsError.ts │ │ │ │ │ ├── UpdatePhaseController.ts │ │ │ │ │ └── UpdatePhaseUseCase.ts │ │ │ │ ├── GetTheoryPhase │ │ │ │ │ ├── GetTheoryPhaseController.ts │ │ │ │ │ └── GetTheoryPhaseUseCase.ts │ │ │ │ └── GetPracticePhase │ │ │ │ │ └── GetPracticePhaseController.ts │ │ │ ├── dtos │ │ │ │ └── ICreatePhaseDTO.ts │ │ │ ├── repositories │ │ │ │ └── IPhasesRepository.ts │ │ │ └── infra │ │ │ │ └── typeorm │ │ │ │ └── entities │ │ │ │ └── Phase.ts │ │ └── utils │ │ │ └── logger.ts │ ├── @types │ │ └── express │ │ │ └── index.d.ts │ └── test │ │ └── factories │ │ ├── MapFactory.ts │ │ ├── ActivityFactory.ts │ │ └── GameFactory.ts ├── prisma │ └── migrations │ │ └── migration_lock.toml ├── Dockerfile ├── .editorconfig ├── ormconfig.json ├── docker-compose.yml ├── tsconfig.json └── README.md ├── dashboard ├── .eslintrc.json ├── src │ ├── styles │ │ └── global.css │ ├── services │ │ └── api.ts │ ├── components │ │ ├── Sidebar │ │ │ ├── index.tsx │ │ │ ├── NavSection.tsx │ │ │ └── NavLink.tsx │ │ ├── Header.tsx │ │ └── Form │ │ │ ├── Button.tsx │ │ │ ├── Input.tsx │ │ │ ├── TextArea.tsx │ │ │ └── InputWithLabel.tsx │ ├── utils │ │ ├── orderArrayByCreatedAt.ts │ │ ├── withSSRGuest.ts │ │ └── withSSRAuth.ts │ └── pages │ │ ├── _app.tsx │ │ └── _document.tsx ├── postcss.config.js ├── next.config.js ├── public │ ├── listMaps.svg │ └── createMaps.svg ├── .gitignore ├── tsconfig.json ├── package.json └── tailwind.config.js ├── public ├── logo.png └── diagram.png ├── LICENSE.txt └── dashboard.md /mobile/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /backend/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode 3 | .git -------------------------------------------------------------------------------- /mobile/.env.example: -------------------------------------------------------------------------------- 1 | BASE_URL=http://:3333 2 | -------------------------------------------------------------------------------- /backend/.eslintignore: -------------------------------------------------------------------------------- 1 | /*.js 2 | node_modules 3 | dist 4 | -------------------------------------------------------------------------------- /mobile/src/@types/png/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.png"; 2 | -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dashboard/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/public/logo.png -------------------------------------------------------------------------------- /public/diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/public/diagram.png -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn-error.log 3 | .env.* 4 | .env 5 | !.env.example -------------------------------------------------------------------------------- /mobile/.eslintignore: -------------------------------------------------------------------------------- 1 | /*.js 2 | node_modules 3 | dist 4 | __tests__ 5 | ios 6 | android 7 | -------------------------------------------------------------------------------- /dashboard/src/styles/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /mobile/assets/_splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/assets/_splash.png -------------------------------------------------------------------------------- /mobile/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/assets/splash.png -------------------------------------------------------------------------------- /mobile/src/assets/xp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/xp.png -------------------------------------------------------------------------------- /mobile/src/assets/gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/gold.png -------------------------------------------------------------------------------- /mobile/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/logo.png -------------------------------------------------------------------------------- /mobile/src/assets/medal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/medal.png -------------------------------------------------------------------------------- /mobile/src/assets/pixel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/pixel.png -------------------------------------------------------------------------------- /mobile/src/assets/trophy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/trophy.png -------------------------------------------------------------------------------- /mobile/src/assets/wizard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/wizard.png -------------------------------------------------------------------------------- /backend/public/home_print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/backend/public/home_print.png -------------------------------------------------------------------------------- /mobile/src/assets/BlueLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/BlueLogo.png -------------------------------------------------------------------------------- /mobile/src/assets/map_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/map_icon.png -------------------------------------------------------------------------------- /mobile/src/assets/naughty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/naughty.png -------------------------------------------------------------------------------- /mobile/src/assets/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/preview.png -------------------------------------------------------------------------------- /mobile/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/debug.keystore -------------------------------------------------------------------------------- /mobile/src/assets/SplashLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/SplashLogo.png -------------------------------------------------------------------------------- /mobile/src/assets/correctSong.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/correctSong.mp3 -------------------------------------------------------------------------------- /mobile/src/assets/icon_phase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/icon_phase.png -------------------------------------------------------------------------------- /mobile/src/assets/menu-trophy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/menu-trophy.png -------------------------------------------------------------------------------- /mobile/src/assets/pixel-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/pixel-black.png -------------------------------------------------------------------------------- /mobile/src/assets/sunglasses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/sunglasses.png -------------------------------------------------------------------------------- /mobile/src/assets/wrongSong.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/wrongSong.mp3 -------------------------------------------------------------------------------- /mobile/src/assets/finishedGame.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/finishedGame.mp3 -------------------------------------------------------------------------------- /mobile/src/assets/naughty-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/naughty-black.png -------------------------------------------------------------------------------- /backend/.env.example: -------------------------------------------------------------------------------- 1 | LOG_DISABLED=true 2 | NODE_ENV=development 3 | LOG_LEVEL=info 4 | DATABASE_HOST=database_devlandia 5 | -------------------------------------------------------------------------------- /backend/src/config/auth.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | secret_token: 'Dvr5p)4gN^F[#nD', 3 | expires_in_token: '1d', 4 | }; 5 | -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | devlandia 3 | -------------------------------------------------------------------------------- /mobile/src/assets/sunglasses-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/sunglasses-black.png -------------------------------------------------------------------------------- /dashboard/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /mobile/src/assets/menu-trophy-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/src/assets/menu-trophy-black.png -------------------------------------------------------------------------------- /mobile/ios/devlandia/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "expo" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /backend/src/shared/infra/prisma/client.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from '@prisma/client'; 2 | 3 | export const prisma = new PrismaClient(); 4 | -------------------------------------------------------------------------------- /dashboard/src/services/api.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export const api = axios.create({ 4 | baseURL: 'http://localhost:3333' 5 | }) -------------------------------------------------------------------------------- /mobile/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /backend/src/core/domain/errors/IAppError.ts: -------------------------------------------------------------------------------- 1 | export interface IAppError extends Error { 2 | message: string; 3 | statusCode: number; 4 | } 5 | -------------------------------------------------------------------------------- /mobile/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /dashboard/src/components/Sidebar/index.tsx: -------------------------------------------------------------------------------- 1 | import { SidebarNav } from "./SidebarNav"; 2 | 3 | export function Sidebar() { 4 | return ( 5 | 6 | ) 7 | } -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /backend/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | #023c69 3 | #ffffff 4 | -------------------------------------------------------------------------------- /mobile/src/pages/NextSignUp/INextSignUp.ts: -------------------------------------------------------------------------------- 1 | export interface UserDataInfos { 2 | userData: { 3 | name: string; 4 | email: string; 5 | user: string; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /dashboard/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | swcMinify: true, 5 | } 6 | 7 | module.exports = nextConfig 8 | -------------------------------------------------------------------------------- /mobile/src/pages/Perfil/IPerfil.ts: -------------------------------------------------------------------------------- 1 | export interface UserInfos { 2 | name: string; 3 | username: string; 4 | biography: string; 5 | total_coins: number; 6 | total_xp: number; 7 | } 8 | -------------------------------------------------------------------------------- /mobile/src/services/api.ts: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | const baseURL = process.env.BASE_URL; 4 | 5 | const api = axios.create({ 6 | baseURL, 7 | }); 8 | 9 | export { api }; 10 | -------------------------------------------------------------------------------- /mobile/ios/devlandia/Images.xcassets/SplashScreen.imageset/splashscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/ios/devlandia/Images.xcassets/SplashScreen.imageset/splashscreen.png -------------------------------------------------------------------------------- /backend/src/modules/maps/dtos/ICreateMapDTO.ts: -------------------------------------------------------------------------------- 1 | interface ICreateMapDTO { 2 | id?: string; 3 | title: string; 4 | description: string; 5 | order: number; 6 | } 7 | 8 | export { ICreateMapDTO }; 9 | -------------------------------------------------------------------------------- /backend/src/modules/maps/dtos/IUpdateMapDTO.ts: -------------------------------------------------------------------------------- 1 | export interface IUpdateMapDTO { 2 | id: string; 3 | 4 | title: string; 5 | 6 | description: string; 7 | 8 | order: number; 9 | } 10 | -------------------------------------------------------------------------------- /backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | 3 | WORKDIR /usr/app 4 | 5 | COPY package.json ./ 6 | 7 | RUN npm install 8 | 9 | COPY . . 10 | 11 | EXPOSE 3333 12 | 13 | CMD ["npm", "run", "dev"] 14 | -------------------------------------------------------------------------------- /backend/src/modules/activities/dtos/IAddActivitiesToPhaseDTO.ts: -------------------------------------------------------------------------------- 1 | interface IAddActivitiesToPhaseDTO { 2 | phase_id: string; 3 | activities_ids: string[]; 4 | } 5 | 6 | export { IAddActivitiesToPhaseDTO }; 7 | -------------------------------------------------------------------------------- /mobile/ios/devlandia/Images.xcassets/SplashScreenBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/404jv/dev-landia/HEAD/mobile/ios/devlandia/Images.xcassets/SplashScreenBackground.imageset/background.png -------------------------------------------------------------------------------- /backend/src/@types/express/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/naming-convention */ 2 | declare namespace Express { 3 | export interface Request { 4 | user: { 5 | id: string; 6 | }; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /backend/src/modules/activities/dtos/ICreateOptionActivityDTO.ts: -------------------------------------------------------------------------------- 1 | interface ICreateOptionActivityDTO { 2 | id?: string; 3 | activity_id: string; 4 | option_id: string; 5 | order: number; 6 | } 7 | 8 | export { ICreateOptionActivityDTO }; 9 | -------------------------------------------------------------------------------- /backend/src/shared/infra/http/server.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | import logger from '@modules/utils/logger'; 3 | 4 | import { app } from './app'; 5 | 6 | app.listen(3333, () => 7 | logger.info('🚀 Server is running at http://localhost:3333') 8 | ); 9 | -------------------------------------------------------------------------------- /mobile/metro.config.js: -------------------------------------------------------------------------------- 1 | // Learn more https://docs.expo.io/guides/customizing-metro 2 | // eslint-disable-next-line @typescript-eslint/no-var-requires 3 | const { getDefaultConfig } = require("expo/metro-config"); 4 | 5 | module.exports = getDefaultConfig(__dirname); 6 | -------------------------------------------------------------------------------- /mobile/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /backend/src/modules/activities/dtos/IAddOptionsToActivityDTO.ts: -------------------------------------------------------------------------------- 1 | interface IAddOptionsToActivityDTO { 2 | activity_id: string; 3 | activityDefaultCodeOptionsIds: string[]; 4 | activityAnswerOptionsIds: string[]; 5 | } 6 | 7 | export { IAddOptionsToActivityDTO }; 8 | -------------------------------------------------------------------------------- /mobile/ios/devlandia/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /backend/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = crlf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /mobile/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /backend/src/modules/activities/repositories/ITipsRepository.ts: -------------------------------------------------------------------------------- 1 | import { Tip } from '../infra/typeorm/entities/Tip'; 2 | 3 | interface ITipsRepository { 4 | create(name: string, activity_id: string): Promise; 5 | deleteByActivityId(id: string): Promise; 6 | } 7 | 8 | export { ITipsRepository }; 9 | -------------------------------------------------------------------------------- /dashboard/src/utils/orderArrayByCreatedAt.ts: -------------------------------------------------------------------------------- 1 | export function order(array: []) { 2 | const sorted = array.sort((a,b) => { 3 | const dateA = new Date(a.created_at); 4 | const dateB = new Date(b.created_at); 5 | 6 | return dateA.getTime() - dateB.getTime(); 7 | }); 8 | 9 | return sorted; 10 | } -------------------------------------------------------------------------------- /mobile/__tests__/App.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import App from '../App'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | renderer.create(); 10 | }); 11 | -------------------------------------------------------------------------------- /mobile/src/Global/styles/styles.d.ts: -------------------------------------------------------------------------------- 1 | import "styled-components"; 2 | import theme from "./theme"; 3 | 4 | declare module "styled-components" { 5 | type ThemeType = typeof theme; 6 | // eslint-disable-next-line @typescript-eslint/no-empty-interface 7 | export interface DefaultTheme extends ThemeType {} 8 | } 9 | -------------------------------------------------------------------------------- /dashboard/public/listMaps.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mobile/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "commonjs", 5 | "jsx": "react-native", 6 | "strict": false, 7 | "esModuleInterop": true, 8 | "skipLibCheck": true, 9 | "forceConsistentCasingInFileNames": true 10 | }, 11 | "extends": "expo/tsconfig.base" 12 | } 13 | -------------------------------------------------------------------------------- /backend/src/modules/accounts/dtos/ICreateUserDTO.ts: -------------------------------------------------------------------------------- 1 | interface ICreateUserDTO { 2 | id?: string; 3 | name: string; 4 | username: string; 5 | email: string; 6 | password: string; 7 | biography?: string; 8 | is_admin?: boolean; 9 | total_xp?: number; 10 | total_coins?: number; 11 | } 12 | 13 | export { ICreateUserDTO }; 14 | -------------------------------------------------------------------------------- /mobile/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'devlandia' 2 | 3 | apply from: '../node_modules/react-native-unimodules/gradle.groovy' 4 | includeUnimodulesProjects() 5 | 6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); 7 | applyNativeModulesSettingsGradle(settings) 8 | 9 | include ':app' 10 | -------------------------------------------------------------------------------- /mobile/ios/devlandia/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | #import 7 | 8 | @interface AppDelegate : UMAppDelegateWrapper 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /mobile/src/pages/Phase/styles.ts: -------------------------------------------------------------------------------- 1 | import styled from "styled-components/native"; 2 | 3 | export const Container = styled.View` 4 | flex: 1; 5 | background-color: ${({ theme }) => theme.colors.background}; 6 | `; 7 | 8 | export const Text = styled.Text` 9 | line-height: 19px; 10 | font-size: 16px; 11 | color: ${({ theme }) => theme.colors.black}; 12 | `; 13 | -------------------------------------------------------------------------------- /backend/src/modules/accounts/dtos/IUserResponseDTO.ts: -------------------------------------------------------------------------------- 1 | interface IUserResponseDTO { 2 | id: string; 3 | name: string; 4 | username: string; 5 | email: string; 6 | is_admin: boolean; 7 | biography: string; 8 | total_xp: number; 9 | total_coins: number; 10 | created_at: Date; 11 | updated_at: Date; 12 | } 13 | 14 | export { IUserResponseDTO }; 15 | -------------------------------------------------------------------------------- /mobile/android/app/src/main/res/drawable/splashscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mobile/src/components/Menu/styles.ts: -------------------------------------------------------------------------------- 1 | import styled from "styled-components/native"; 2 | 3 | export const MenuBar = styled.View` 4 | flex-direction: row; 5 | justify-content: center; 6 | align-items: center; 7 | margin: 8px; 8 | `; 9 | 10 | export const ProgressMenuBar = styled.View` 11 | width: 80%; 12 | background-color: ${({ theme }) => theme.colors.stroke}; 13 | `; 14 | -------------------------------------------------------------------------------- /dashboard/public/createMaps.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/src/shared/infra/http/errors/PageNotFound.ts: -------------------------------------------------------------------------------- 1 | import { IAppError } from '@core/domain/errors/IAppError'; 2 | 3 | export class PageNotFound implements IAppError { 4 | message: string; 5 | statusCode: number; 6 | name: string; 7 | stack?: string; 8 | 9 | constructor() { 10 | this.message = 'Page Not Found'; 11 | this.statusCode = 404; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /mobile/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mobile/index.js: -------------------------------------------------------------------------------- 1 | import "react-native-gesture-handler"; 2 | import { registerRootComponent } from "expo"; 3 | 4 | import App from "./App"; 5 | 6 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 7 | // It also ensures that whether you load the app in Expo Go or in a native build, 8 | // the environment is set up appropriately 9 | registerRootComponent(App); 10 | -------------------------------------------------------------------------------- /backend/src/modules/activities/dtos/ICreateOptionDTO.ts: -------------------------------------------------------------------------------- 1 | enum enOptionType { 2 | JS_FUNCTION = 'js_function', 3 | COMMAND = 'command', 4 | } 5 | 6 | interface ICreateOptionDTO { 7 | id?: string; 8 | name: string; 9 | activity_id?: string; 10 | type: enOptionType; 11 | abstracted_name?: string; 12 | hexadecimal_color: string; 13 | } 14 | 15 | export { ICreateOptionDTO }; 16 | -------------------------------------------------------------------------------- /mobile/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "devlandia", 4 | "slug": "devlandia", 5 | "version": "1.0.0", 6 | "userInterfaceStyle": "light", 7 | "splash": { 8 | "image": "./assets/_splash.png", 9 | "backgroundColor": "#1F6FEB" 10 | }, 11 | "assetBundlePatterns": [ 12 | "**/*" 13 | ], 14 | "android": { 15 | "package": "com.devlandia" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /mobile/src/utils/tailwindComponents.ts: -------------------------------------------------------------------------------- 1 | import { 2 | View as ReactNativeView, 3 | Text as ReactNativeText, 4 | TouchableOpacity as ReactNativeTouchableOpacity, 5 | } from "react-native"; 6 | 7 | import { styled } from "tailwindcss-react-native"; 8 | 9 | export const View = styled(ReactNativeView); 10 | export const Text = styled(ReactNativeText); 11 | export const TouchableOpacity = styled(ReactNativeTouchableOpacity); 12 | -------------------------------------------------------------------------------- /dashboard/src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import "../styles/global.css" 2 | import 'react-toastify/dist/ReactToastify.min.css'; 3 | import type { AppProps } from 'next/app' 4 | import { AuthProvider } from "../contexts/AuthContext" 5 | 6 | function MyApp({ Component, pageProps }: AppProps) { 7 | return ( 8 | 9 | 10 | 11 | ) 12 | } 13 | 14 | export default MyApp 15 | -------------------------------------------------------------------------------- /mobile/ios/devlandia/Supporting/Expo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EXUpdatesSDKVersion 6 | YOUR-APP-SDK-VERSION-HERE 7 | EXUpdatesURL 8 | YOUR-APP-URL-HERE 9 | 10 | 11 | -------------------------------------------------------------------------------- /backend/src/modules/activities/repositories/IOptionsRepository.ts: -------------------------------------------------------------------------------- 1 | import { ICreateOptionDTO } from '../dtos/ICreateOptionDTO'; 2 | import { Option } from '../infra/typeorm/entities/Option'; 3 | 4 | interface IOptionsRepository { 5 | create(data: ICreateOptionDTO): Promise