Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into fix/#104-1st-qa-minseo

# Conflicts:
#	app/src/main/java/com/teumteum/teumteum/presentation/mypage/recommend/RecommendScreen.kt
#	app/src/main/java/com/teumteum/teumteum/presentation/mypage/setting/viewModel/MyPageViewModel.kt
#	app/src/main/java/com/teumteum/teumteum/util/SignupUtils.kt
  • Loading branch information
Mnseo committed Feb 16, 2024
2 parents fbe4d5c + f1673a6 commit bf8331e
Show file tree
Hide file tree
Showing 22 changed files with 370 additions and 45 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/debug_builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#name: TeumTeum Push Builder
#
#on:
# push:
# branches: [ main ]
#
#defaults:
# run:
# shell: bash
# working-directory: .
#
#jobs:
# build:
# name: APK Builder When Push
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
#
# - name: Gradle cache
# uses: actions/cache@v2
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
# restore-keys: |
# ${{ runner.os }}-gradle-
# - name: set up JDK 17
# uses: actions/setup-java@v1
# with:
# java-version: 17
#
# - name: Change gradlew permissions
# run: chmod +x ./gradlew
#
# - name: Create Local Properties
# run: touch local.properties
#
# - name: Access Local Properties
# env:
# base_url: ${{ secrets.BASE_URL }}
# image_url: ${{ secrets.IMAGE_URL }}
# kakao_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }}
# naver_redirect_url: ${{ secrets.KAKAO_REDIRECT_URL }}
# kakao_api_key: ${{ secrets.KAKAO_API_KEY }}
# naver_api_key: ${{ secrets.NAVER_API_KEY }}
# run: |
# echo base.url=\"$base_url\" >> local.properties
# echo image.url=\"$image_url\" >> local.properties
# echo kakao.redirect=\"$kakao_redirect_url\" >> local.properties
# echo naver.redirect=\"$naver_redirect_url\" >> local.properties
# echo kakao.key=\"$kakao_api_key\" >> local.properties
# echo naver.key=\"$naver_api_key\" >> local.properties
#
# - name: Access Firebase Service
# run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json
#
# - name: Build debug APK
# run: ./gradlew assembleDebug --stacktrace
#
# - name: On Success
# if: ${{ success() }}
# uses: MeilCli/slack-upload-file@v1
# with:
# slack_token: ${{ secrets.SLACK_BOT_TOKEN}}
# channels: ${{ secrets.SLACK_CHANNEL_ID}}
# file_path: 'app/build/outputs/apk/debug/app-debug.apk'
# file_name: 'TeumTeum.apk'
# file_type: 'apk'
# initial_comment: '🎉 TeumTeum이 슬랙으로 들어왔습니다.'
#
# - name: On Failed, Notify in Slack
# if: ${{ failure() }}
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_COLOR: '#ff0000'
# SLACK_ICON: https://play-lh.googleusercontent.com/jUeDnP2wd29y48wolu5a8j08PX3Zt-wsftTVuSR8gYgHI00sq7Zsq2jWx1icTdsISw=w240-h480-rw
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
# SLACK_TITLE: 'TEUMTEUM/Android debug build Fail❌'
# MSG_MINIMAL: true
# SLACK_USERNAME: TEUMTEUM_ANDROID
# SLACK_MESSAGE: 'APK 생성 중 에러가 발생했습니다. 에러를 확인해주세요'
#
143 changes: 141 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# <b> TeumTeum-Android Repository </b>
<img src="https://github.com/depromeet/teum-teum-server/assets/91249216/70e21198-48c2-4ea1-9d87-3e619c4c3217" width="120" height="120" align="left"/>

![2046](https://github.com/depromeet/TeumTeum-Android/assets/89737271/6a51c5f5-f809-4a2d-a8d3-684b82e80afc)
# Teum-Teum

> 사람 사이의 ****을 이어주는 IT 커리어 네트워킹 서비스 `repo:server`
![Build](https://img.shields.io/github/actions/workflow/status/depromeet/teum-teum-server/integration-tester.yml?branch=develop&style=for-the-badge&logo=github&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/test_success_density/depromeet_teum-teum-server?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/quality_gate/depromeet_teum-teum-server/develop?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/github/v/release/depromeet/teum-teum-server?include_prereleases&style=for-the-badge&color=36B2FF)

[![download](https://img.shields.io/badge/playstore-download-brightgreen?style=social&logo=googleplay&color=36B2FF)](https://play.google.com/store/apps/details?id=com.teumteum.teumteum&pcampaignid=web_share) [![instagram](https://img.shields.io/badge/instagram-click-brightgreen?style=social&logo=instagram&color=36B2FF)](https://www.instagram.com/teumteum_official/) [![behance](https://img.shields.io/badge/behance-click-brightgreen?style=social&logo=behance&color=36B2FF)](https://www.behance.net/gallery/191510163/%08TEUMTEUM-IT-Career-Growth-Networking-Service)

---

<p align="center" width="100%">
<img width="49%" alt="MOBILE_1" src="https://github.com/depromeet/teum-teum-server/assets/91249216/c8c97700-b1a0-4393-ab14-edcf077627cb">
<img width="49%" alt="MOBILE_2" src="https://github.com/depromeet/teum-teum-server/assets/91249216/52a606d7-77dd-48fc-9f2f-3bb1a130ad75">
</p>
<p align="center" width="100%">
<img width="49%" alt="MOBILE_3" src="https://github.com/depromeet/teum-teum-server/assets/91249216/015f52bb-7e76-45f5-ba8f-aa9d92d133dd">
<img width="49%" alt="MOBILE_4" src="https://github.com/depromeet/teum-teum-server/assets/91249216/589184e0-bd3d-4583-9315-2b1ad3c624ad">
</p>
<p align="center" width="100%">
<img width="49%" alt="MOBILE_5" src="https://github.com/depromeet/teum-teum-server/assets/91249216/3dd859ef-ed72-45c7-8f82-6c5a92f33fa5">
<img width="49%" alt="MOBILE_6" src="https://github.com/depromeet/teum-teum-server/assets/91249216/642bff83-30ae-4ff6-aa01-53561ce00db3">
</p>
<p align="center" width="100%">
<img width="49%" alt="MOBILE_7" src="https://github.com/depromeet/teum-teum-server/assets/91249216/7d66866d-b07f-4ebf-8699-feffa8c6b8fd">
<img width="49%" alt="MOBILE_8" src="https://github.com/depromeet/teum-teum-server/assets/91249216/5aa5c9e9-6e02-43b0-a2e3-81f6aff298b5">
</p>

<br>

Expand All @@ -10,3 +35,117 @@
|<img width="400" src="https://github.com/depromeet/TeumTeum-Android/assets/89737271/513cb651-bc4a-4b91-85f3-5090da6cfc4a.jpg">|<img width="400" src="https://github.com/depromeet/TeumTeum-Android/assets/89737271/0714242e-d7b2-4a11-848b-061b399c1fff.jpg">|<img width="400" src="https://github.com/depromeet/TeumTeum-Android/assets/89737271/1f573b6c-b209-4a5f-9a26-2999ea4f8d70.jpg">|<img width="400" src="https://github.com/depromeet/TeumTeum-Android/assets/89737271/14c3fb00-70cc-43a2-94c2-fe04b5225701.jpg">|
|**모임 참여 & 유저 리뷰**|**공통 관심사 찾기**|**모임 생성 & 마이페이지**|**로그인 & 자기소개 카드**|

<br>

## Tech Stack ⚒️
- Clean Architecture
- Multi-Module

- MVVM
- Repository Pattern

- Compose + XML
- Hilt

- Coroutine
- Version Catalog

- Kotlin - Flow
- GitHub Action CI / CD

<br>

## System Architecture 💻

### Architecture (with Data flow)
![image](https://github.com/depromeet/TeumTeum-Android/assets/100370200/b914bf6d-d052-46be-ba05-a841673f38c0)


### MODULE
```
🗃️app
┣ 📂di
┣ 📂presentation
┣ 📂util
🗃️build-logic
┣ 📂convention
🗃️core
┣ 📂base
🗃️data
┣ 📂datasource
┣ 📂local
┣ 📂model
┃ ┣ 📂response
┃ ┣ 📂request
┣ 📂repository
┣ 📂remote
┃ ┣ 📂interceptor
┃ ┣ 📂service
┣ 📂util
🗃️domain
┣ 📂entity
┣ 📂repository
```

<br>

## 틈틈을 소개합니다 🎉

틈틈은 IT 업계에서 커리어 성장을 위해 노력하는 '갓생러'들을 만날 수 있는 네트워킹 플랫폼이에요.
함께 스터디를 하거나 모여서 각자 작업을 하며 다양한 네트워킹 활동을 할 수 있어요.

처음 만나는 사이라 어색함이 느껴질 때는 '친해지기' 기능을 활용해 관심사를 파악하고,
함께 즐겁게 대화를 나누며 서로의 틈을 채워 가까워질 수 있어요!

IT 직군의 다양한 개성을 지닌 사람들과 네트워킹하며 커리어를 성장시켜 보는 것은 어떨까요?

<br>

## 틈틈을 처음 사용하시나요? 😎
![Untitled](https://github.com/depromeet/TeumTeum-Android/assets/100370200/7ce79833-06aa-40a3-afd1-18f0dc37601b)

### ☝️ Step 01 소개서를 만들고 간편하게 소개해 보세요
- 관심사와 목표가 담겨 있는 소개서를 만들어요.
- 모임에 참여할 때 소개서로 간편하게 자신을 소개 할 수 있어요.

<br>

![Untitled2](https://github.com/depromeet/TeumTeum-Android/assets/100370200/4d716950-d3c8-47b0-bef5-890396188598)

### ✌️ Step 02 원하는 모임에 참여해 보세요
- 틈틈에서는 스터디부터 모각작까지 다양한 카테고리의 모임에 참여할 수 있어요.
- 참여자들의 소개서를 미리 확인하고, 믿을 수 있는 모임을 시작해 보세요.

<br>

![Untitled3](https://github.com/depromeet/TeumTeum-Android/assets/100370200/a455a546-b573-4470-ba27-80fb49184cc9)

### 🤟 Step 03 함께 성장할 근처의 친구를 찾아봐요
- 내가 사는 곳 근처, 혹은 회사 근처에서 친구를 만날 수 있어요.
- 내 주변의 친구와 함께 커리어 성장을 위한 모임을 시작해 보세요.

<br>

![Untitled4](https://github.com/depromeet/TeumTeum-Android/assets/100370200/97252e07-9822-4c40-abd0-dcb153524c0c)

### 🤟 Step 04 서로의 관심사를 발견해요
- 소개서에 작성한 관심사를 기반으로 모임 참여자들의 관심사를 확인해 보세요.
- 기기를 흔들면 모임 참여자들의 다양한 관심사 사이의 틈을 채울 수 있어요.
- chat GPT가 많은 사람들이 공통적으로 관심을 가지고 있는 주제를 알려줄거에요.


<br>

![Untitled5](https://github.com/depromeet/TeumTeum-Android/assets/100370200/432f3ec9-32d1-4749-badb-7a49cec6ec12)

### 🖖 Step 05 밸런스 게임으로 친해져요
- 공통 관심사와 관련된 다양한 대화 주제를 확인하고, 대화를 시작해봐요.
- 어색한 순간도 잠시, 밸런스 게임을 통해 빠르게 친해질 수 있어요.

<br>

![Untitled6](https://github.com/depromeet/TeumTeum-Android/assets/100370200/1a5d824f-5231-419f-a9ed-813128b247a0)

### 🖖 Step 06 모임 후 리뷰를 통해 더 나은 네트워킹 환경을 만들어가요
- 모임이 끝난 후 다음날에 유저 리뷰를 작성할 수 있어요.
- 유저 리뷰를 작성하고 더 나은 네트워킹 환경을 만들어봐요.
15 changes: 13 additions & 2 deletions app/src/main/java/com/teumteum/teumteum/MyApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ package com.teumteum.teumteum

import android.app.Application
import android.content.Context
import androidx.appcompat.app.AppCompatDelegate
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import androidx.lifecycle.ProcessLifecycleOwner
import dagger.hilt.android.HiltAndroidApp
import timber.log.Timber

@HiltAndroidApp
class MyApp : Application() {
class MyApp : Application(), LifecycleObserver {

override fun onCreate() {
super.onCreate()
Expand All @@ -18,9 +21,17 @@ class MyApp : Application() {
}
setUpFlipper()
appContext = applicationContext
ProcessLifecycleOwner.get().lifecycle.addObserver(this)
}

@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
fun onAppBackgrounded() { isForeground = false }

@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
fun onAppForegrounded() { isForeground = true}

companion object {
lateinit var appContext: Context
var isForeground = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.teumteum.data.model.request.toDeviceToken
import com.teumteum.data.service.UserService
import com.teumteum.domain.TeumTeumDataStore
import com.teumteum.domain.entity.Message
import com.teumteum.domain.repository.UserRepository
import com.teumteum.teumteum.R
import com.teumteum.teumteum.presentation.splash.SplashActivity
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -30,6 +31,9 @@ class TeumMessagingService : FirebaseMessagingService() {
@Inject
lateinit var userService: UserService

@Inject
lateinit var userRepository: UserRepository

override fun onNewToken(token: String) {
super.onNewToken(token)

Expand All @@ -51,22 +55,25 @@ class TeumMessagingService : FirebaseMessagingService() {
}
}

override fun onMessageReceived(message: RemoteMessage) {
super.onMessageReceived(message)
override fun handleIntent(intent: Intent?) {
super.handleIntent(intent)

if (dataStore.onNotification) {
if (dataStore.isLogin) {
val alertMessage = Message("", "", "")
if (message.data.isNotEmpty()) {
alertMessage.title = message.notification?.title.toString()
alertMessage.body = message.notification?.body.toString()
alertMessage.type = message.data["type"].toString()
}
if (alertMessage.type == END_MEETING) {
alertMessage.meetingId = message.data["meetingId"]?.toLong()
alertMessage.participants = message.data["participants"]?.toList()?.map { it.digitToInt() }
intent?.let {
val alertMessage = Message("", "", "")
alertMessage.title = intent.getStringExtra("title").toString()
alertMessage.body = intent.getStringExtra("body").toString()
alertMessage.type = intent.getStringExtra("type").toString()
if (alertMessage.type == END_MEETING) {
alertMessage.meetingId = intent.getStringExtra("meetingId")?.toLong()
alertMessage.participants =
intent.getStringExtra("participants")?.split(",")?.map { it.toInt() }
val userId = userRepository.getUserInfo()?.id?.toInt()
if (alertMessage.participants?.contains(userId) == true && alertMessage.participants?.size!! > 2)
sendNotificationAlarm(alertMessage)
} else if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage)
}
if (alertMessage.title.isNotEmpty()) sendNotificationAlarm(alertMessage)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class ReviewFriendDetailFragment :
private fun initClick() {
val friendDetail = ReviewFriend(id, characterId, name, job)
binding.btnReview.setOnSingleClickListener {
viewModel.addSelectDetailFriendList(friendDetail)
if (viewModel.currentFriendIndex < viewModel.selectFriendList.size) {
viewModel.addSelectDetailFriendList(friendDetail)
(requireActivity() as? ReviewActivity)?.nextFriendDetailFragment()
} else {
viewModel.postRegisterReview()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.teumteum.domain.entity.ReviewFriend
import com.teumteum.domain.repository.GroupRepository
import com.teumteum.domain.repository.UserRepository
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
Expand All @@ -12,13 +13,14 @@ import kotlinx.coroutines.launch

@HiltViewModel
class ReviewViewModel @Inject constructor(
private val repository: GroupRepository
private val repository: GroupRepository,
private val userRepository: UserRepository
) : ViewModel() {
private var _selectFriendList = listOf<ReviewFriend>()
val selectFriendList get() = _selectFriendList

private var _selectDetailFriendList = mutableListOf<ReviewFriend>()
val selectDetailFriendList get() = _selectFriendList
val selectDetailFriendList get() = _selectDetailFriendList

var meetingId: Long? = null

Expand All @@ -34,15 +36,23 @@ class ReviewViewModel @Inject constructor(
}

fun addSelectDetailFriendList(selectFriendDetail: ReviewFriend) {
_selectDetailFriendList.removeAll { it.id == selectFriendDetail.id }
_selectDetailFriendList.add(selectFriendDetail)
}

private fun filterReviewFriendList(list: List<ReviewFriend>): List<ReviewFriend> {
val friendList = list.toMutableList()
val myUserId = userRepository.getUserInfo()?.id
friendList.removeAll { it.id == myUserId }
return friendList
}

fun getReviewFriendList() {
meetingId?.let { id ->
viewModelScope.launch {
repository.getReviewFriendList(id)
.onSuccess {
_moimFriendList.value = it
.onSuccess { list ->
_moimFriendList.value = filterReviewFriendList(list)
}
}
}
Expand Down
Loading

0 comments on commit bf8331e

Please sign in to comment.