├── .nvmrc ├── .yarnrc.yml ├── .prettierrc ├── packages ├── app │ ├── screens │ │ ├── onboarding │ │ │ └── OnboardingStack.js │ │ ├── landing │ │ │ ├── TestScreen.js │ │ │ ├── LandingStack.js │ │ │ ├── ForgotPasswordScreen.js │ │ │ └── LandingScreen.js │ │ ├── group │ │ │ ├── tabs │ │ │ │ ├── NewsletterScreen.js │ │ │ │ ├── LeaderboardScreen.js │ │ │ │ ├── MembersScreen.js │ │ │ │ ├── EventsScreen.js │ │ │ │ └── AboutScreen.js │ │ │ ├── GroupStack.js │ │ │ ├── GuildCard.js │ │ │ ├── event_overview │ │ │ │ └── EventOverviewScreen.js │ │ │ ├── GroupScreen.js │ │ │ └── GuildList.js │ │ ├── explore │ │ │ ├── ExploreScreen.js │ │ │ └── ExploreStack.js │ │ └── feed │ │ │ ├── feed_tabs │ │ │ ├── Profile.js │ │ │ └── Settings.js │ │ │ ├── FeedStack.js │ │ │ ├── FeedDrawer.js │ │ │ └── FeedScreen.js │ ├── assets │ │ ├── icon.png │ │ ├── favicon.png │ │ ├── splash.png │ │ ├── more-icon.png │ │ ├── no-pfp-icon.png │ │ ├── adaptive-icon.png │ │ ├── test-club-icon.png │ │ ├── test-club-banner.png │ │ ├── test_card_banner.png │ │ ├── eye-line-on.js │ │ ├── eye-line-off.js │ │ └── google-icon.js │ ├── __tests__ │ │ ├── todo.test.js │ │ ├── FeedDrawer.test.js │ │ ├── GroupScreen.test.js │ │ └── Login.test.js │ ├── utils │ │ ├── constants.js │ │ ├── SecureStore.js │ │ ├── datalayer.js │ │ ├── UserContext.js │ │ ├── useGoogleLogin.js │ │ ├── EventContext.js │ │ ├── FeedContext.js │ │ └── GuildContext.js │ ├── jsconfig.json │ ├── .expo-shared │ │ └── assets.json │ ├── .gitignore │ ├── index.js │ ├── jest.config.js │ ├── .eslintrc.json │ ├── babel.config.js │ ├── components │ │ ├── Screen.js │ │ ├── EventCard │ │ │ ├── FaceIcon.js │ │ │ ├── RegisterButton.js │ │ │ ├── EventCardRegistration.js │ │ │ └── EventCardText.js │ │ ├── DividerWithText.js │ │ ├── MemberCard │ │ │ ├── RoundedIcon.js │ │ │ ├── MemberFunctions.js │ │ │ ├── MemberCard.js │ │ │ └── ProfilePopup.js │ │ ├── GroupScreen │ │ │ ├── GroupTag.js │ │ │ ├── GroupIcon.js │ │ │ ├── GroupHeader.js │ │ │ ├── GroupMediaIcon.js │ │ │ ├── GroupHeaderInfo.js │ │ │ └── GroupTabs.js │ │ ├── Button.js │ │ ├── EventOverview │ │ │ ├── EventOverviewRegister.js │ │ │ └── EventOverviewText.js │ │ └── TextInput.js │ ├── eas.json │ ├── metro.config.js │ ├── jest-setup.js │ ├── app.config.js │ ├── package.json │ └── Root.js └── server │ ├── prisma │ ├── prisma.js │ ├── migrations │ │ ├── migration_lock.toml │ │ ├── 20240428205018_user_onboarding_fields │ │ │ └── migration.sql │ │ ├── 20240429022141_unique_user_email │ │ │ └── migration.sql │ │ ├── 20240428201142_update_model_names_and_maps │ │ │ └── migration.sql │ │ ├── 20240428195602_update_enum_values │ │ │ └── migration.sql │ │ └── 0_init │ │ │ └── migration.sql │ ├── seed.js │ └── schema.prisma │ ├── jest.config.js │ ├── utils │ ├── s3.js │ ├── flattener.js │ ├── prismaTS.ts │ ├── token.js │ └── redis.js │ ├── __tests__ │ ├── prisma_mock.js │ └── controllers │ │ ├── users.test.js │ │ ├── auth.test.js │ │ ├── events.test.js │ │ └── guilds.test.js │ ├── .eslintrc.json │ ├── index.js │ ├── package.json │ ├── validators │ ├── images.js │ ├── auth.js │ └── users.js │ ├── controllers │ ├── users.js │ ├── images.js │ ├── guilds.js │ ├── events.js │ └── auth.js │ ├── scripts │ └── database.sql │ └── routes │ └── api │ ├── users.js │ └── images.js ├── .commitlintrc.json ├── assets └── banner.png ├── .prettierignore ├── .husky ├── pre-commit ├── commit-msg └── post-checkout ├── .lintstagedrc.json ├── .yarnrc ├── .gitignore ├── .eslintrc.json ├── .github └── CODEOWNERS ├── package.json ├── README.md └── scripts └── run.js /.nvmrc: -------------------------------------------------------------------------------- 1 | v20.11.1 -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSameLine": true 3 | } 4 | -------------------------------------------------------------------------------- /packages/app/screens/onboarding/OnboardingStack.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@commitlint/config-conventional"] 3 | } 4 | -------------------------------------------------------------------------------- /assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/assets/banner.png -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/node_modules/ 2 | .vscode/ 3 | **/.expo/ 4 | **/.expo-shared/ 5 | **/assets/ -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | yarn lint-staged 5 | -------------------------------------------------------------------------------- /packages/app/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/icon.png -------------------------------------------------------------------------------- /packages/app/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/favicon.png -------------------------------------------------------------------------------- /packages/app/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/splash.png -------------------------------------------------------------------------------- /packages/app/assets/more-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/more-icon.png -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit ${1} 5 | -------------------------------------------------------------------------------- /packages/app/assets/no-pfp-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/no-pfp-icon.png -------------------------------------------------------------------------------- /packages/app/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/adaptive-icon.png -------------------------------------------------------------------------------- /packages/app/assets/test-club-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/test-club-icon.png -------------------------------------------------------------------------------- /packages/app/assets/test-club-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/test-club-banner.png -------------------------------------------------------------------------------- /packages/app/assets/test_card_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cppsea/icebreak/HEAD/packages/app/assets/test_card_banner.png -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "*.{js,jsx,ts,tsx,html,css}": "eslint --fix", 3 | "*.{js,json,jsx,ts,tsx,md,html,css}": "prettier --write" 4 | } 5 | -------------------------------------------------------------------------------- /packages/app/__tests__/todo.test.js: -------------------------------------------------------------------------------- 1 | import { test, expect } from "jest"; 2 | 3 | test("test", () => { 4 | expect(true).toBe(true); 5 | }); 6 | -------------------------------------------------------------------------------- /.husky/post-checkout: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | git pull 5 | yarn 6 | yarn workspace server prisma generate 7 | -------------------------------------------------------------------------------- /packages/app/utils/constants.js: -------------------------------------------------------------------------------- 1 | const URL = "https://4289-2606-40-8eb7-24-00-c60-3a7b.ngrok-free.app"; 2 | 3 | export const ENDPOINT = `${URL}/api`; 4 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | yarn-path ".yarn/releases/yarn-1.22.19.cjs" 6 | -------------------------------------------------------------------------------- /packages/app/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@app/*": ["./*"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/server/prisma/prisma.js: -------------------------------------------------------------------------------- 1 | const { PrismaClient } = require("@prisma/client"); 2 | const prisma = new PrismaClient(); 3 | module.exports = prisma; 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .vscode 3 | node_modules/ 4 | yarn-error.log 5 | .expo/ 6 | **.env 7 | package-lock.json 8 | .yarn/cache/ 9 | .yarn/install-state.gz 10 | .env.* -------------------------------------------------------------------------------- /packages/server/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" -------------------------------------------------------------------------------- /packages/app/.expo-shared/assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, 3 | "40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/app/screens/landing/TestScreen.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { View } from "react-native"; 3 | 4 | function TestScreen() { 5 | return ; 6 | } 7 | 8 | export default TestScreen; 9 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "script", 4 | "ecmaVersion": 2023 5 | }, 6 | "env": { 7 | "node": true 8 | }, 9 | "extends": ["prettier", "eslint:recommended"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | **.env 13 | 14 | # macOS 15 | .DS_Store 16 | -------------------------------------------------------------------------------- /packages/app/screens/group/tabs/NewsletterScreen.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { View } from "react-native"; 3 | 4 | function NewsletterScreen() { 5 | return ; 6 | } 7 | 8 | export default NewsletterScreen; 9 | -------------------------------------------------------------------------------- /packages/app/screens/group/tabs/LeaderboardScreen.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { View } from "react-native"; 3 | 4 | function LeaderboardScreen() { 5 | return ; 6 | } 7 | 8 | export default LeaderboardScreen; 9 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | packages/app @MinT-Napkin 2 | packages/server @lxkedinh 3 | 4 | # exclude "packages/app/utils/constants.js" from having a code owner 5 | # because it's constantly overwritten automatically by Ngrok 6 | packages/app/utils/constants.js 7 | -------------------------------------------------------------------------------- /packages/server/prisma/migrations/20240428205018_user_onboarding_fields/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "users" ADD COLUMN "age" INTEGER, 3 | ADD COLUMN "interests" TEXT[], 4 | ADD COLUMN "pronouns" "user_pronoun" NOT NULL DEFAULT 'They/Them/Their'; 5 | -------------------------------------------------------------------------------- /packages/server/jest.config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | testPathIgnorePatterns: [ 3 | "/node_modules/", 4 | "/__tests__/prisma_mock.js", 5 | ], 6 | setupFilesAfterEnv: ["/__tests__/prisma_mock.js"], 7 | }; 8 | 9 | module.exports = config; 10 | -------------------------------------------------------------------------------- /packages/server/utils/s3.js: -------------------------------------------------------------------------------- 1 | const { S3Client } = require("@aws-sdk/client-s3"); 2 | const s3Client = new S3Client({ region: "us-west-1" }); 3 | 4 | const s3ImagesUrlRegex = 5 | /^https:\/\/icebreak-assets\.s3\.us-west-1\.amazonaws\.com\/.*\.jpg$/; 6 | 7 | module.exports = { s3Client, s3ImagesUrlRegex }; 8 | -------------------------------------------------------------------------------- /packages/app/screens/explore/ExploreScreen.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Text } from "react-native"; 3 | 4 | import Screen from "@app/components/Screen"; 5 | 6 | function ExploreScreen() { 7 | return ( 8 | 9 | explore 10 | 11 | ); 12 | } 13 | export default ExploreScreen; 14 | -------------------------------------------------------------------------------- /packages/server/prisma/migrations/20240429022141_unique_user_email/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - A unique constraint covering the columns `[email]` on the table `users` will be added. If there are existing duplicate values, this will fail. 5 | 6 | */ 7 | -- CreateIndex 8 | CREATE UNIQUE INDEX "users_email_key" ON "users"("email"); 9 | -------------------------------------------------------------------------------- /packages/app/index.js: -------------------------------------------------------------------------------- 1 | import { registerRootComponent } from 'expo'; 2 | 3 | import Root from './Root'; 4 | 5 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 6 | // It also ensures that whether you load the app in Expo Go or in a native build, 7 | // the environment is set up appropriately 8 | registerRootComponent(Root); -------------------------------------------------------------------------------- /packages/server/__tests__/prisma_mock.js: -------------------------------------------------------------------------------- 1 | const { mockDeep, mockReset } = require("jest-mock-extended"); 2 | const prisma = require("../prisma/prisma"); 3 | const prismaMock = prisma; 4 | 5 | jest.mock("../prisma/prisma", () => mockDeep()); 6 | 7 | beforeEach(() => { 8 | mockReset(prismaMock); 9 | }); 10 | 11 | module.exports = { prismaMock }; 12 | -------------------------------------------------------------------------------- /packages/app/jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('jest').Config} */ 2 | const config = { 3 | verbose: true, 4 | preset: "react-native", 5 | setupFiles: ["./jest-setup.js"], 6 | transformIgnorePatterns: [ 7 | "/node_modules/(?!(jest-)?react-native|@react-native-community|@react-navigation)", 8 | ], 9 | }; 10 | 11 | module.exports = config; 12 | -------------------------------------------------------------------------------- /packages/app/utils/SecureStore.js: -------------------------------------------------------------------------------- 1 | import * as SecureStore from "expo-secure-store"; 2 | 3 | export async function save(key, value) { 4 | await SecureStore.setItemAsync(key, value); 5 | } 6 | 7 | export async function getValueFor(key) { 8 | let result = await SecureStore.getItemAsync(key); 9 | return result; 10 | } 11 | 12 | export async function remove(key) { 13 | await SecureStore.deleteItemAsync(key); 14 | } 15 | -------------------------------------------------------------------------------- /packages/app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["react", "react-native"], 3 | "env": { 4 | "react-native/react-native": true 5 | }, 6 | "parserOptions": { 7 | "sourceType": "module", 8 | "ecmaVersion": 2023, 9 | "ecmaFeatures": { "jsx": true } 10 | }, 11 | "extends": [ 12 | "prettier", 13 | "eslint:recommended", 14 | "plugin:react-native/all", 15 | "plugin:react/recommended" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/server/utils/flattener.js: -------------------------------------------------------------------------------- 1 | // Flattens all object properties to the outermost level 2 | function flatten(obj) { 3 | return Object.entries(obj).reduce((acc, [key, value]) => { 4 | return { 5 | ...acc, 6 | ...(typeof value === "object" && value !== null && !Array.isArray(value) 7 | ? flatten(value) 8 | : { [key]: value }), 9 | }; 10 | }, {}); 11 | } 12 | 13 | module.exports = { flatten }; 14 | -------------------------------------------------------------------------------- /packages/app/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(false); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: [ 6 | [ 7 | require.resolve("babel-plugin-module-resolver"), 8 | { 9 | include: ["."], 10 | root: ["."], 11 | alias: { 12 | "@app": ".", 13 | }, 14 | }, 15 | ], 16 | "react-native-reanimated/plugin", 17 | ], 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /packages/server/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "sourceType": "script", 4 | "ecmaVersion": 2023 5 | }, 6 | "env": { 7 | "node": true 8 | }, 9 | "extends": ["prettier", "eslint:recommended"], 10 | "overrides": [ 11 | { 12 | "files": ["__tests__/**", "prisma/prisma_mock.js"], 13 | "plugins": ["jest"], 14 | "extends": ["plugin:jest/recommended"], 15 | "env": { 16 | "jest/globals": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /packages/app/components/Screen.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { SafeAreaView, StatusBar } from "react-native"; 3 | import PropTypes from "prop-types"; 4 | 5 | function Screen(props) { 6 | const { children, ...rest } = props; 7 | 8 | return ( 9 | 10 | 11 | {children} 12 | 13 | ); 14 | } 15 | 16 | Screen.propTypes = { 17 | children: PropTypes.node, 18 | }; 19 | 20 | export default Screen; 21 | -------------------------------------------------------------------------------- /packages/app/eas.json: -------------------------------------------------------------------------------- 1 | { 2 | "cli": { 3 | "version": ">= 7.6.0" 4 | }, 5 | "build": { 6 | "development": { 7 | "developmentClient": true, 8 | "distribution": "internal" 9 | }, 10 | "development-ios-simulator": { 11 | "developmentClient": true, 12 | "distribution": "internal", 13 | "ios": { 14 | "simulator": true 15 | } 16 | }, 17 | "preview": { 18 | "distribution": "internal" 19 | }, 20 | "production": {} 21 | }, 22 | "submit": { 23 | "production": {} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/app/screens/explore/ExploreStack.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { createNativeStackNavigator } from "@react-navigation/native-stack"; 3 | 4 | import ExploreScreen from "./ExploreScreen"; 5 | 6 | const Explore = createNativeStackNavigator(); 7 | 8 | function ExploreStack() { 9 | return ( 10 | 13 | 14 | 15 | ); 16 | } 17 | 18 | export default ExploreStack; 19 | -------------------------------------------------------------------------------- /packages/app/utils/datalayer.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | import * as SecureStore from "./SecureStore"; 3 | import { ENDPOINT } from "./constants"; 4 | 5 | const server = axios.create({ 6 | baseURL: ENDPOINT, 7 | }); 8 | 9 | // get user info for local auth only 10 | export async function getUserInfo(token) { 11 | const { data: response } = await server.get("/auth/user", { 12 | headers: { 13 | Authorization: token, 14 | }, 15 | }); 16 | 17 | return response; 18 | } 19 | 20 | export async function logoutUser() { 21 | await SecureStore.remove("accessToken"); 22 | await SecureStore.remove("refreshToken"); 23 | } 24 | -------------------------------------------------------------------------------- /packages/app/components/EventCard/FaceIcon.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { StyleSheet, Image } from "react-native"; 3 | import PropTypes from "prop-types"; 4 | 5 | function FaceIcon(props) { 6 | const styles = StyleSheet.create({ 7 | imageStyle: { 8 | borderRadius: 18, 9 | height: 36, 10 | transform: [{ translateX: 30 - props.index * 20 }], 11 | width: 36, 12 | }, 13 | }); 14 | 15 | return ( 16 | 21 | ); 22 | } 23 | 24 | FaceIcon.propTypes = { 25 | iconUrl: PropTypes.string, 26 | index: PropTypes.number, 27 | }; 28 | 29 | export default FaceIcon; 30 | -------------------------------------------------------------------------------- /packages/app/assets/eye-line-on.js: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import Svg, { Path } from "react-native-svg"; 3 | 4 | const EyeOn = (props) => ( 5 | 12 | 13 | 17 | 18 | ); 19 | export default EyeOn; -------------------------------------------------------------------------------- /packages/app/screens/feed/feed_tabs/Profile.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { View, Button, Text, StyleSheet } from "react-native"; 3 | import PropTypes from "prop-types"; 4 | 5 | // Placeholder profile screen 6 | function Profile({ navigation }) { 7 | return ( 8 | 9 |