Skip to content

Commit

Permalink
Merge pull request #243 from Nexters/release/1.5.0
Browse files Browse the repository at this point in the history
Release/1.5.0
  • Loading branch information
mangbaam authored May 9, 2024
2 parents 0c7c430 + 4d0d72c commit 4c6d3f3
Show file tree
Hide file tree
Showing 89 changed files with 1,876 additions and 1,064 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/pull-request-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Android Pull Request CI

on:
pull_request:
branches: [ develop ]

jobs:
unit_test:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'

- name: set up Android SDK
uses: android-actions/setup-android@v2

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run unit tests
env:
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
run: |
echo "$KEYSTORE" | base64 -d > ./app/boolti-keystore.keystore
echo "$KEYSTORE_PROPERTIES" > keystore.properties
echo "$LOCAL_PROPERTIES" > local.properties
echo "$GOOGLE_SERVICES" | base64 -d > ./app/google-services.json
./gradlew test --stacktrace
- name: Publish Test Results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "**/test-results/**/*.xml"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ google-services.json
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand Down
46 changes: 38 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# 핫한 공연 예매의 시작 불티

- 플레이 스토어 : https://play.google.com/store/apps/details?id=com.nexters.boolti
- 앱 스토어 : https://apps.apple.com/kr/app/%EB%B6%88%ED%8B%B0/id6476589322
- 주최자용 웹 : https://boolti.in
불티로 밴드 공연의 주최, 예매, QR 입장을 관리해 보세요!

| Type | Link |
| --- | --- |
| 플레이 스토어 | https://play.google.com/store/apps/details?id=com.nexters.boolti |
| 앱 스토어 | https://apps.apple.com/kr/app/%EB%B6%88%ED%8B%B0/id6476589322 |
| 주최자용 웹 | https://boolti.in |

</br>

Expand All @@ -14,7 +18,19 @@

</br></br>

## Android developers
## Animations

| Home | Ticktes |
| ------------- | ------------- |
| <img width="200" src="https://github.com/Nexters/Boolti/assets/35232655/66c2ada2-7079-4704-b9a4-237b2c8e2769" /> | <img width="200" src="https://github.com/Nexters/Boolti/assets/35232655/37b8640a-38bb-4e03-adad-6931998082a4"/> |

</br>

## Architecture

![architecture](https://github.com/Nexters/Boolti/assets/35232655/ebc7714c-c954-4758-9551-f60fb78079d9)

## Android Developers

|Android|Android|
|:---:|:---:|
Expand All @@ -23,7 +39,21 @@

</br>

## Other repositories
- iOS Repository : https://github.com/Nexters/Boolti-iOS
- FE Repository : https://github.com/Nexters/boolti-web
- BE Repository : private
## Technical Content
| Author | Title |
| ------------- | -------------|
| 박명범 | [Android Compose HorizontalPager Animations(w. 불티)](https://medium.com/@mangbaam/android-compose-horizontalpager-animations-w-%EB%B6%88%ED%8B%B0-e18ab02458d8) |
| 송준영 | [Compose 중첩 내비게이션의 문제와 해결](https://algosketch.tistory.com/189) |
| 송준영 | [Compose를 이용하여 스크롤 가능한 Appbar 만들기](https://algosketch.tistory.com/186) |
| 송준영 | [핫한 공연 예매의 시작 불티 출시!](https://algosketch.tistory.com/185) |
| 송준영 | [간격이 안 맞아요! (feat. Compose typography)](https://algosketch.tistory.com/184) |

</br>

## Other Repositories

| Part | Link |
| --- | --- |
| iOS | https://github.com/Nexters/Boolti-iOS
| FE | https://github.com/Nexters/boolti-web
| BE | 비공개
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ dependencies {
implementation(projects.domain)
implementation(projects.data)
implementation(projects.presentation)
implementation(projects.tosspayments)

implementation(libs.bundles.coroutines)

Expand Down
35 changes: 28 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.CAMERA" />

<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.screen.landscape" android:required="false" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:name="android.hardware.screen.landscape"
android:required="false" />

<uses-permission android:name="android.permission.INTERNET" />

Expand All @@ -26,7 +34,7 @@
<activity
android:name=".presentation.screen.MainActivity"
android:exported="true"
android:theme="@style/Theme.Boolti" >
android:theme="@style/Theme.Boolti">

<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down Expand Up @@ -59,15 +67,28 @@
android:screenOrientation="fullSensor"
tools:replace="screenOrientation" />

<activity
android:name=".tosspayments.TossPaymentWidgetActivity"
android:exported="false"
android:theme="@style/Theme.AppCompat.NoActionBar" />

<!--suppress AndroidDomInspection -->
<activity
android:name="com.tosspayments.paymentsdk.activity.TossPaymentActivity"
android:exported="false"
android:theme="@style/Theme.AppCompat.NoActionBar" />

<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:host="oauth"
<data
android:host="oauth"
android:scheme="kakao${KAKAO_APP_KEY}" />
</intent-filter>
</activity>
Expand Down
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ plugins {
task("clean", Delete::class) {
delete = setOf(rootProject.buildDir)
}

task("btTest") {
dependsOn(":domain:test", ":data:testDebugUnitTest", ":presentation:testDebugUnitTest")
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.nexters.boolti.data.datasource

import com.nexters.boolti.data.network.api.TicketService
import com.nexters.boolti.data.network.response.TicketDetailDto
import com.nexters.boolti.domain.model.Ticket
import retrofit2.Response
import javax.inject.Inject

internal class TicketDataSource @Inject constructor(
private val apiService: TicketService,
) {
suspend fun getTickets(): List<Ticket> = apiService.getTickets().map { it.toDomain() }
suspend fun getTicket(ticketId: String): Ticket = apiService.getTicket(ticketId).toDomain()
suspend fun getTicket(ticketId: String): Response<TicketDetailDto> = apiService.getTicket(ticketId)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ package com.nexters.boolti.data.datasource
import com.nexters.boolti.data.network.api.TicketingService
import com.nexters.boolti.data.network.request.ReservationInviteTicketRequest
import com.nexters.boolti.data.network.request.ReservationSalesTicketRequest
import com.nexters.boolti.data.network.response.ApprovePaymentResponse
import com.nexters.boolti.data.network.response.CheckInviteCodeResponse
import com.nexters.boolti.data.network.response.ReservationDto
import com.nexters.boolti.domain.model.TicketWithQuantity
import com.nexters.boolti.domain.model.TicketingInfo
import com.nexters.boolti.domain.request.CheckInviteCodeRequest
import com.nexters.boolti.domain.request.OrderIdRequest
import com.nexters.boolti.domain.request.PaymentApproveRequest
import com.nexters.boolti.domain.request.PaymentCancelRequest
import com.nexters.boolti.domain.request.SalesTicketRequest
import com.nexters.boolti.domain.request.TicketingInfoRequest
import retrofit2.Response
Expand All @@ -29,12 +34,12 @@ internal class TicketingDataSource @Inject constructor(
).toDomain()
}

suspend fun requestReservationSalesTicket(request: ReservationSalesTicketRequest): String {
return ticketingService.requestReservationSalesTicket(request).reservationId
suspend fun requestReservationSalesTicket(request: ReservationSalesTicketRequest): Response<ReservationDto> {
return ticketingService.requestReservationSalesTicket(request)
}

suspend fun requestReservationInviteTicket(request: ReservationInviteTicketRequest): String {
return ticketingService.requestReservationInviteTicket(request).reservationId
suspend fun requestReservationInviteTicket(request: ReservationInviteTicketRequest): Response<ReservationDto> {
return ticketingService.requestReservationInviteTicket(request)
}

suspend fun checkInviteCode(request: CheckInviteCodeRequest): Response<CheckInviteCodeResponse> {
Expand All @@ -44,4 +49,17 @@ internal class TicketingDataSource @Inject constructor(
code = request.inviteCode,
)
}

suspend fun requestOrderId(request: OrderIdRequest): String {
return ticketingService.requestOrderId(request).orderId
}

suspend fun approvePayment(request: PaymentApproveRequest): Response<ApprovePaymentResponse> {
return ticketingService.approvePayment(request)
}

suspend fun cancelPayment(request: PaymentCancelRequest): Boolean {
val response = ticketingService.cancelPayment(request)
return response.isSuccessful && response.body() ?: false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.nexters.boolti.data.network.api

import com.nexters.boolti.data.network.response.TicketDetailDto
import com.nexters.boolti.data.network.response.TicketDto
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path

Expand All @@ -12,5 +13,5 @@ internal interface TicketService {
@GET("/app/api/v1/ticket/{ticketId}")
suspend fun getTicket(
@Path("ticketId") ticketId: String,
): TicketDetailDto
): Response<TicketDetailDto>
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ package com.nexters.boolti.data.network.api

import com.nexters.boolti.data.network.request.ReservationInviteTicketRequest
import com.nexters.boolti.data.network.request.ReservationSalesTicketRequest
import com.nexters.boolti.data.network.response.ApprovePaymentResponse
import com.nexters.boolti.data.network.response.CheckInviteCodeResponse
import com.nexters.boolti.data.network.response.OrderIdDto
import com.nexters.boolti.data.network.response.ReservationDto
import com.nexters.boolti.data.network.response.SalesTicketTypeDto
import com.nexters.boolti.data.network.response.TicketingInfoDto
import com.nexters.boolti.domain.request.OrderIdRequest
import com.nexters.boolti.domain.request.PaymentApproveRequest
import com.nexters.boolti.domain.request.PaymentCancelRequest
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
Expand All @@ -29,17 +34,32 @@ internal interface TicketingService {
@POST("/app/api/v1/reservation/sales-ticket")
suspend fun requestReservationSalesTicket(
@Body request: ReservationSalesTicketRequest,
): ReservationDto
): Response<ReservationDto>

@POST("/app/api/v1/reservation/invite-ticket")
suspend fun requestReservationInviteTicket(
@Body request: ReservationInviteTicketRequest,
): ReservationDto
): Response<ReservationDto>

@GET("/app/api/v1/check/invite-code")
suspend fun checkInviteCode(
@Query("showId") showId: String,
@Query("salesTicketTypeId") salesTicketId: String,
@Query("inviteCode") code: String,
): Response<CheckInviteCodeResponse>

@POST("/app/api/v1/order/payment-info")
suspend fun requestOrderId(
@Body request: OrderIdRequest,
): OrderIdDto

@POST("/app/api/v1/order/approve-payment")
suspend fun approvePayment(
@Body request: PaymentApproveRequest,
): Response<ApprovePaymentResponse>

@POST("/app/api/v1/order/cancel-payment")
suspend fun cancelPayment(
@Body request: PaymentCancelRequest
): Response<Boolean>
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.nexters.boolti.data.network.request

import com.nexters.boolti.domain.model.PaymentType
import com.nexters.boolti.domain.request.TicketingRequest
import kotlinx.serialization.Serializable

Expand All @@ -12,25 +11,13 @@ internal data class ReservationSalesTicketRequest(
val ticketCount: Int,
val reservationName: String,
val reservationPhoneNumber: String,
val depositorName: String,
val depositorPhoneNumber: String,
val paymentAmount: Int,
val means: String,
)

internal fun TicketingRequest.Normal.toData(): ReservationSalesTicketRequest = ReservationSalesTicketRequest(
internal fun TicketingRequest.Free.toData(): ReservationSalesTicketRequest = ReservationSalesTicketRequest(
userId = userId,
showId = showId,
salesTicketTypeId = salesTicketTypeId,
ticketCount = ticketCount,
reservationName = reservationName,
reservationPhoneNumber = reservationPhoneNumber,
depositorName = depositorName,
depositorPhoneNumber = depositorPhoneNumber,
paymentAmount = paymentAmount,
means = when (paymentType) {
PaymentType.ACCOUNT_TRANSFER -> "ACCOUNT_TRANSFER"
PaymentType.CARD -> "CARD"
PaymentType.UNDEFINED -> ""
},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.nexters.boolti.data.network.response

import com.nexters.boolti.domain.model.ApprovePaymentResponse
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class ApprovePaymentResponse(
@SerialName("orderId") val orderId: String,
@SerialName("reservationId") val reservationId: String,
) {
fun toDomain(): ApprovePaymentResponse = ApprovePaymentResponse(orderId, reservationId)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.nexters.boolti.data.network.response

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class OrderIdDto(
@SerialName("orderId") val orderId: String,
)
Loading

0 comments on commit 4c6d3f3

Please sign in to comment.