Skip to content

Commit

Permalink
Merge branch 'develop' into feat/issue-754
Browse files Browse the repository at this point in the history
  • Loading branch information
Go-Jaecheol authored Dec 29, 2023
2 parents 360771a + c6e61aa commit 01684c2
Show file tree
Hide file tree
Showing 226 changed files with 5,371 additions and 1,605 deletions.
114 changes: 103 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,107 @@
# 2023-fun-eat
<div align="center">

## 팀원 👨‍👨‍👧‍👧👩‍👦‍👦
<br>

| Frontend | Frontend | Frontend |
|:-------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|
| <img src="https://avatars.githubusercontent.com/u/55427367?v=4" width=130px alt="타미"> | <img src="https://avatars.githubusercontent.com/u/80464961?v=4" width=130px alt="해온"> | <img src="https://avatars.githubusercontent.com/u/78616893?v=4" width=130px alt="황펭"> |
| [타미](https://github.com/xodms0309) | [해온](https://github.com/hae-on) | [황펭](https://github.com/Leejin-Yang) |
<img src="https://github.com/woowacourse-teams/2023-fun-eat/assets/80464961/85396306-1d3e-4d8e-8763-0e28e2a8be04" width="520px" />

| Backend | Backend | Backend | Backend |
|:--------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------:|
| <img src="https://avatars.githubusercontent.com/u/79046106?v=4" width=130px alt="로건"/> | <img src="https://avatars.githubusercontent.com/u/33208246?v=4" width=130px alt="망고"/> | <img src="https://avatars.githubusercontent.com/u/91522259?v=4" width=130px alt="오잉"/> | <img src="https://avatars.githubusercontent.com/u/91244090?v=4" width=130px alt="우가"> |
| [로건](https://github.com/70825) | [망고](https://github.com/Go-Jaecheol) | [오잉](https://github.com/hanueleee) | [우가](https://github.com/wugawuga) |
<br>
<br>

<br><br><br>
<b>궁금해? 맛있을걸? 먹어봐! <br>
🍙 편의점 음식 리뷰 & 꿀조합 공유 서비스 🍙</b>

<br>

[![Application](http://img.shields.io/badge/funeat.site-D8EAFF?style=for-the-badge&logo=aHR0cHM6Ly9naXRodWIuY29tL3dvb3dhY291cnNlLXRlYW1zLzIwMjMtZnVuLWVhdC9hc3NldHMvODA0NjQ5NjEvOWI1OWY3NzktY2M5MS00MTJhLWE3NDUtZGQ3M2IzY2UxZGNk&logoColor=black&link=https://funeat.site/)](https://funeat.site/)
[![WIKI](http://img.shields.io/badge/-GitHub%20WiKi-FFEC99?style=for-the-badge&logoColor=black&link=https://github.com/woowacourse-teams/2023-fun-eat/wiki)](https://github.com/woowacourse-teams/2023-fun-eat/wiki)
[![Release](https://img.shields.io/github/v/release/woowacourse-teams/2023-fun-eat?style=for-the-badge&color=FFCFCF)](https://github.com/woowacourse-teams/2023-fun-eat/releases/tag/v1.3.0)

</div>

<br>

# 🥄 서비스 소개

![1_메인페이지](https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/9663f7b5-cd38-4f06-86fb-c6636fc364c6)

<br>

## 1. 편의점마다 특색있는 음식 궁금해?

![5_상품목록](https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/03fb9955-61fa-4228-a270-ce9dffc710c6)
![6_상품상세](https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/694bc8db-74bd-4fa1-b499-900cd27f5028)
![4_검색](https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/6a157e08-79d8-450b-9511-ffa461000a22)

<br>
<br>

## 2. 솔직한 리뷰를 보면 더 맛있을걸?

![2_리뷰](https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/4bf5ecd7-df08-45d0-b592-8629f3a4e3e6)

<br>
<br>

## 3. 생각지 못했던 꿀조합, 먹어봐!

![3_꿀조합](https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/8e560b40-d039-47ce-ad29-5e244cba4bf2)

<br>
<br>

# 🛠️ 기술 스택

### 백엔드

<div align="center">
<img src='https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/5b60393a-ffbf-4595-bb4c-166d091a7998' width="400px" alt="BE_기술스택"/>
</div>

<br/>

### 프론트엔드

<div align="center">
<img src='https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/e3d76698-aaa4-4eea-a878-8c03f3faf395' width="400px" alt="FE_기술스택"/>
</div>

<br/>

### 인프라

<div align="center">
<img src='https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/79399085-1245-4af4-be20-2d5402d53da7' width="400px" alt="인프라_기술스택"/>
</div>

<br>
<br>

# 인프라 구조

### CI/CD

<div align="center">
<img src="https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/3fbef028-d216-4abe-ab4f-c531b099dd33" alt="cicd">
</div>

### 구조

<div align="center">
<img src="https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/3bbb9d40-f525-43ab-8ec2-ade6e6a07139" alt="인프라 구조" />
</div>

<br>
<br>

# 👨‍👨‍👧‍👧👩‍👦‍👦 팀원

| Frontend | Frontend | Frontend | Backend | Backend | Backend | Backend |
| :-------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: |
| <img src="https://avatars.githubusercontent.com/u/55427367?v=4" width=200px alt="타미"> | <img src="https://avatars.githubusercontent.com/u/80464961?v=4" width=200px alt="해온"> | <img src="https://avatars.githubusercontent.com/u/78616893?v=4" width=200px alt="황펭"> | <img src="https://avatars.githubusercontent.com/u/79046106?v=4" width=200px alt="로건"/> | <img src="https://avatars.githubusercontent.com/u/33208246?v=4" width=200px alt="망고"/> | <img src="https://avatars.githubusercontent.com/u/91522259?v=4" width=200px alt="오잉"/> | <img src="https://avatars.githubusercontent.com/u/91244090?v=4" width=200px alt="우가"/> |
| [🐰 타미](https://github.com/xodms0309) | [🌞 해온](https://github.com/hae-on) | [🐧 황펭](https://github.com/Leejin-Yang) | [😺 로건](https://github.com/70825) | [🥭 망고](https://github.com/Go-Jaecheol) | [👻 오잉](https://github.com/hanueleee) | [🍖 우가](https://github.com/wugawuga) |

<br>

<div align="center">
<img src="https://github.com/woowacourse-teams/2023-fun-eat/assets/55427367/27ba38de-34b4-4925-a554-9bed89089984" alt="팀소개"/>
</div>
3 changes: 2 additions & 1 deletion backend/src/main/java/com/funeat/FuneatApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import com.funeat.common.repository.BaseRepositoryImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@EnableAsync
@SpringBootApplication
@EnableJpaRepositories(repositoryBaseClass = BaseRepositoryImpl.class)
public class FuneatApplication {

public static void main(String[] args) {
SpringApplication.run(FuneatApplication.class, args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public class AdminProductSpecification {

private static final List<Class<Long>> COUNT_RESULT_TYPES = List.of(Long.class, long.class);

private AdminProductSpecification() {
}

public static Specification<Product> searchBy(final ProductSearchCondition condition) {
return (root, query, criteriaBuilder) -> {
if (!COUNT_RESULT_TYPES.contains(query.getResultType())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

public class AdminReviewSpecification {

private AdminReviewSpecification() {
}

public static Specification<Review> searchBy(final ReviewSearchCondition condition) {
return (root, query, criteriaBuilder) -> {
if (query.getResultType() != Long.class && query.getResultType() != long.class) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.funeat.banner.application;

import com.funeat.banner.domain.Banner;
import com.funeat.banner.dto.BannerResponse;
import com.funeat.banner.persistence.BannerRepository;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class BannerService {

private final BannerRepository bannerRepository;

public BannerService(final BannerRepository bannerRepository) {
this.bannerRepository = bannerRepository;
}

public List<BannerResponse> getAllBanners() {
final List<Banner> findBanners = bannerRepository.findAllByOrderByIdDesc();

return findBanners.stream()
.map(BannerResponse::toResponse)
.collect(Collectors.toList());
}
}
38 changes: 38 additions & 0 deletions backend/src/main/java/com/funeat/banner/domain/Banner.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.funeat.banner.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class Banner {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String link;

private String image;

protected Banner() {
}

public Banner(final String link, final String image) {
this.link = link;
this.image = image;
}

public Long getId() {
return id;
}

public String getLink() {
return link;
}

public String getImage() {
return image;
}
}
32 changes: 32 additions & 0 deletions backend/src/main/java/com/funeat/banner/dto/BannerResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.funeat.banner.dto;

import com.funeat.banner.domain.Banner;

public class BannerResponse {

private final Long id;
private final String link;
private final String image;

private BannerResponse(final Long id, final String link, final String image) {
this.id = id;
this.link = link;
this.image = image;
}

public static BannerResponse toResponse(final Banner banner) {
return new BannerResponse(banner.getId(), banner.getLink(), banner.getImage());
}

public Long getId() {
return id;
}

public String getLink() {
return link;
}

public String getImage() {
return image;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.funeat.banner.persistence;

import com.funeat.banner.domain.Banner;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;

public interface BannerRepository extends JpaRepository<Banner, Long> {

List<Banner> findAllByOrderByIdDesc();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.funeat.banner.presentation;

import com.funeat.banner.dto.BannerResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;

@Tag(name = "08.Banner", description = "배너 관련 API 입니다.")
public interface BannerApiController {

@Operation(summary = "배너 전체 조회", description = "배너 전체를 조회한다.")
@ApiResponse(
responseCode = "200",
description = "배너 전체 조회 성공."
)
@GetMapping
ResponseEntity<List<BannerResponse>> getBanners();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.funeat.banner.presentation;

import com.funeat.banner.application.BannerService;
import com.funeat.banner.dto.BannerResponse;
import java.util.List;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BannerController implements BannerApiController {

private final BannerService bannerService;

public BannerController(final BannerService bannerService) {
this.bannerService = bannerService;
}

@GetMapping("/api/banners")
public ResponseEntity<List<BannerResponse>> getBanners() {
final List<BannerResponse> responses = bannerService.getAllBanners();

return ResponseEntity.ok(responses);
}
}
59 changes: 59 additions & 0 deletions backend/src/main/java/com/funeat/comment/domain/Comment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.funeat.comment.domain;

import com.funeat.member.domain.Member;
import com.funeat.recipe.domain.Recipe;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Comment {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String comment;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "recipe_id")
private Recipe recipe;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "member_id")
private Member member;

@Column(nullable = false)
private LocalDateTime createdAt = LocalDateTime.now();

protected Comment() {
}

public Comment(final Recipe recipe, final Member member, final String comment) {
this.recipe = recipe;
this.member = member;
this.comment = comment;
}

public Long getId() {
return id;
}

public String getComment() {
return comment;
}

public Member getMember() {
return member;
}

public LocalDateTime getCreatedAt() {
return createdAt;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.funeat.comment.persistence;

import com.funeat.comment.domain.Comment;
import com.funeat.common.repository.BaseRepository;
import org.springframework.data.jpa.repository.JpaRepository;

public interface CommentRepository extends JpaRepository<Comment, Long>, BaseRepository<Comment, Long> {
}
Loading

0 comments on commit 01684c2

Please sign in to comment.