Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requset merge #11

Merged
merged 57 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
bbbb99a
Feat: AI text generater
dongree Aug 2, 2023
09dad47
Merge remote-tracking branch 'origin/develop' into develop
dongree Aug 3, 2023
61757ab
Chore: userName -> authorName
dongree Aug 3, 2023
689599c
Chore: userId -> authorId
dongree Aug 4, 2023
98806e2
Style: button 스타일 수정 및 추가
dongree Aug 5, 2023
1a6b979
Feat: 중복확인, 코드인증 API 연동
dongree Aug 6, 2023
3be2b61
Style: layout 보완
dongree Aug 6, 2023
343dd79
Chore: console.log() 제거
dongree Aug 6, 2023
329b40e
Style: button hover 적용
dongree Aug 7, 2023
49509da
Feat: 회원가입 validation 추가
dongree Aug 7, 2023
8d72eb2
Style: Login page UI 개선
dongree Aug 7, 2023
c526fcc
Test: IsValidBtn test code 작성
dongree Aug 7, 2023
f3ac683
Feat: Login error message 추가
dongree Aug 8, 2023
9c1e808
Chore: validation api response type 추가
dongree Aug 8, 2023
e01014b
Feat: description 생성, 메모카드ui 수정
dongree Aug 8, 2023
8ece779
Style: layout 양쪽 padding추가
dongree Aug 8, 2023
1a3d971
Feat: email validation check
dongree Aug 8, 2023
d20646a
feat: History 기능 구현
comolove Aug 8, 2023
88767ce
Merge pull request #8 from Funssion-SWM/history
comolove Aug 8, 2023
f781ed6
fix: history api url in CSR
comolove Aug 8, 2023
c7ed12c
fix: History가 이전 월의 정보를 가져오는 버그 수정
comolove Aug 8, 2023
b9925ee
Merge pull request #9 from Funssion-SWM/fix
comolove Aug 8, 2023
70fa0f7
Style: pretendard font 변경, editor style 보완
dongree Aug 8, 2023
c930021
Chore: rename colorcircle
dongree Aug 8, 2023
de9e277
Test: ColorCircle test code 작성
dongree Aug 8, 2023
2c2bdf2
Feat: 내 정보 등록 페이지 만들기
dongree Aug 9, 2023
fb5481c
Feat: 내 정보 수정 page - 외부 접근 제어
dongree Aug 9, 2023
dbca66d
Test: Bluebtn2 test code 작성, BlueBtn test code 수정
dongree Aug 9, 2023
0a1ea05
Feat: 프로필 정보 설정 API 연동
dongree Aug 10, 2023
c060fbc
Feat: Header profileImg 보여주기
dongree Aug 10, 2023
14b8257
Fix: 프로필 설정 API 수정
dongree Aug 10, 2023
4132815
Fix: header profileimgUrl null일 때 기본이미지 보이게 하기
dongree Aug 10, 2023
f64d8ce
Fix: 유저 정보 가져오기2 api url 변경
dongree Aug 10, 2023
bb1c59a
Fix: header islogin 로직 수정
dongree Aug 10, 2023
a6fbac2
Feat: Modal Logic 구현, logout modal
dongree Aug 11, 2023
3ddec05
Fix: SignupResponse 수정
dongree Aug 11, 2023
11720e5
feat: like, unlike api 연동
comolove Aug 11, 2023
0986506
Merge branch 'develop' into likes
dongree Aug 12, 2023
0e7a4ef
Merge pull request #10 from Funssion-SWM/likes
dongree Aug 12, 2023
88b8730
Fix: 좋아요 관련 로직, UI 수정
dongree Aug 12, 2023
0f83f69
Feat: Modal 처리
dongree Aug 12, 2023
d8f52b9
Feat: 마이페이지 이미지, 자기소개 연동, 회원정보 수정 추가 작업 필요
dongree Aug 12, 2023
72ab883
Feat: Landing 페이지 만들기
dongree Aug 12, 2023
0da7704
Style: responsive style 설정
dongree Aug 13, 2023
5bf0dac
Chore: landing page 경로 수정
dongree Aug 13, 2023
ae98e67
Fix: 좋아요 수정
dongree Aug 13, 2023
b196360
Chore: key에 NEXT_PUBLIC 추가
dongree Aug 13, 2023
ceff9d3
Fix: 경로 수정
dongree Aug 13, 2023
cc697b9
Fix: getMemos - imagepath 연결, profile setting api 수정
dongree Aug 13, 2023
993f115
Styels: Header UI 수정
dongree Aug 13, 2023
115b13c
Fix: editor form validation check
dongree Aug 13, 2023
b53b6ed
Chore: Loading 추가
dongree Aug 13, 2023
361afb6
Fix: mypage api 연동 및 수정
dongree Aug 13, 2023
6a42622
Chore: replace favicon
dongree Aug 13, 2023
b995407
Fix: 마이페이지 자기소개 UI 조정
dongree Aug 13, 2023
34f892b
Feat: Footer 만들기
dongree Aug 13, 2023
e8099ac
Chore: memo text placeholder 수정, open ai prompt 수정
dongree Aug 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
experimental: {
appDir: true,
},
}

module.exports = nextConfig
output: 'standalone',
experimental: {
appDir: true,
},
images: {
remotePatterns: [
{ protocol: 'https', hostname: 's3.ap-northeast-2.amazonaws.com' },
],
},
};

module.exports = nextConfig;

// Injected content via Sentry wizard below

const { withSentryConfig } = require("@sentry/nextjs");
const { withSentryConfig } = require('@sentry/nextjs');

module.exports = withSentryConfig(
module.exports,
Expand All @@ -22,8 +26,8 @@ module.exports = withSentryConfig(
// Suppresses source map uploading logs during build
silent: true,

org: "funssion",
project: "funssion-front-dev",
org: 'funssion',
project: 'funssion-front-dev',
},
{
// For all available options, see:
Expand All @@ -36,7 +40,7 @@ module.exports = withSentryConfig(
transpileClientSDK: true,

// Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
tunnelRoute: "/monitoring",
tunnelRoute: '/monitoring',

// Hides source maps from generated client bundles
hideSourceMaps: true,
Expand Down
121 changes: 119 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,27 @@
"eslint-config-next": "13.4.7",
"lucide-react": "^0.259.0",
"next": "^13.2.4",
"openai-edge": "^1.2.2",
"postcss": "8.4.24",
"react": "^18.2.0",
"react-calendar": "^4.6.0",
"react-dom": "18.2.0",
"react-icons": "^4.10.1",
"react-spinners": "^0.13.8",
"sonner": "^0.6.2",
"tailwind-merge": "^1.13.2",
"tailwindcss": "3.3.2",
"tailwindcss-animate": "^1.0.6",
"tiptap-markdown": "^0.8.1",
"typeit-react": "^2.6.4",
"typescript": "5.1.3"
},
"devDependencies": {
"@tailwindcss/line-clamp": "^0.4.4",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/react-test-renderer": "^18.0.0",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"react-test-renderer": "^18.2.0",
Expand Down
68 changes: 68 additions & 0 deletions src/app/api/generate/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { Configuration, OpenAIApi } from 'openai-edge';
import { OpenAIStream, StreamingTextResponse } from 'ai';

const config = new Configuration({
apiKey: process.env.NEXT_PUBLIC_OPENAI_API_KEY,
});
const openai = new OpenAIApi(config);

export const runtime = 'edge';

export async function POST(req: Request): Promise<Response> {
// if (
// // process.env.NODE_ENV != 'development' &&
// // process.env.KV_REST_API_URL &&
// // process.env.KV_REST_API_TOKEN
// false
// ) {
// const ip = req.headers.get('x-forwarded-for');
// const ratelimit = new Ratelimit({
// redis: kv,
// limiter: Ratelimit.slidingWindow(50, '1 d'),
// });

// const { success, limit, reset, remaining } = await ratelimit.limit(
// `novel_ratelimit_${ip}`
// );

// if (!success) {
// return new Response('You have reached your request limit for the day.', {
// status: 429,
// headers: {
// 'X-RateLimit-Limit': limit.toString(),
// 'X-RateLimit-Remaining': remaining.toString(),
// 'X-RateLimit-Reset': reset.toString(),
// },
// });
// }
// }
let { prompt } = await req.json();
const response = await openai.createChatCompletion({
model: 'gpt-3.5-turbo',
messages: [
{
role: 'system',
content:
'You are an AI writing assistant that continues existing text based on context from prior text. ' +
'Give more weight/priority to the later characters than the beginning ones. ' +
'Limit your response to no more than 400 characters, but make sure to construct complete sentences.',
},
{
role: 'user',
content: prompt,
},
],
temperature: 0.7,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
stream: true,
n: 1,
});

// Convert the response into a friendly text-stream
const stream = OpenAIStream(response);

// Respond with the stream
return new StreamingTextResponse(stream);
}
17 changes: 10 additions & 7 deletions src/app/create/memo/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import EditorForm from '@/components/EditorForm';
import LayoutWrapper from '@/components/shared/LayoutWrapper';
import { getMemoById } from '@/service/memos';

type Props = {
Expand All @@ -11,13 +12,15 @@ export default async function CreateMemoPage({ params: { slug } }: Props) {
const { memoTitle, memoColor, memoText } = await getMemoById(slug);

return (
<EditorForm
preTitle={memoTitle}
preContent={JSON.parse(memoText)}
preColor={memoColor}
alreadyExists={false}
memoId={slug}
/>
<LayoutWrapper paddingY="sm:py-10" bgColor="bg-soma-grey-10">
<EditorForm
preTitle={memoTitle}
preContent={JSON.parse(memoText)}
preColor={memoColor}
alreadyExists={false}
memoId={slug}
/>
</LayoutWrapper>
);
}

Expand Down
Loading