전체 글
-
DB설계ai 채팅 2025. 2. 5. 15:35
유저 테이블id(유저 고유 uid)name(닉네임)created_at(가입 날짜)추가 정보 (이름, 닉네임 등)는 public.users 테이블로 관리 가능! 강아지 테이블id(강아지 uid)name(이름)age(나이)created_at(가입 날짜)personality(JSONB) 강아지 성격 정보 (카테고리별 저장) 채팅 테이블id(채팅uid)id(유저 고유 uid)id(강아지 uid)role (누가 말하고 있는지 표시)content(메세지 내용)created_at(생성 날짜) 테이블 간 관계 users (1) ↔ (N) dog_persona → "유저는 여러 강아지를 등록 가능"dog_persona (1) ↔ (N) chat_message → "강아지별 채팅 기록 저장" ✅ 1. users 테..
-
수파베이스 문제채팅 따라하기 2024. 12. 24. 14:13
테이블 문제가 생김 Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contactingthe Supabase Auth server. 우선 진도는 나가야 해서 정책을 약간 수정 후 이후에 수정 사항 추가
-
채팅 따라 하기-2채팅 따라하기 2024. 12. 20. 23:13
https://supabase.com/docs/guides/api/rest/generating-types설치를 해보고 있는데 문제가 해결이 안되고 있다 npx supabase gen types typescript --project-id "" --schema public > src/lib/types/types.tsfailed to retrieve generated types: {"message":"Your account does not have the necessary privileges to access this endpoint. For more details, refer to our documentation https://supabase.com/docs/guides/platform/access-cont..
-
채팅 따라 하기-1채팅 따라하기 2024. 12. 17. 15:57
nextjs + Ts + supabase + shadcn 설정 Console ErrorHydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used- A server/client branch `if (typeof window !== 'undefined')`.- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.- Date formatt..
-
모달 창띄우고 스크롤 금지멈멈-토이프로젝트(next.js)2 2024. 11. 28. 14:30
기존에는const [isMounted, setIsMounted] = useState(false); useEffect(() => {setIsMounted(true); if (!dialogRef.current?.open) { dialogRef.current?.showModal(); dialogRef.current?.scrollTo({ top: 0, }); } }, [value]);isMounted의 값에 따라 서버사이드 렌더링 방지 문제 사항은모달은 정상으로 뜨고 body도 스크롤 되어서 모달이 뜰때 body는 스크롤 금지 useEffect(() => { setIsMounted(true); // 첫 렌더링 이후 상태를 true로 변경 }, []); ..
-
모달 적용 하기nextjs 2024. 11. 15. 18:14
const dialogRef = useRef(null); const [isMounted, setIsMounted] = useState(false); const { num, value, innum } = useStoreModal(); useEffect(() => { setIsMounted(true); if (!dialogRef.current?.open) { dialogRef.current?.showModal(); dialogRef.current?.scrollTo({ top: 0, }); } }, [value]); if (!isMounted) { return null; // 서버 사이드에서는 렌더링하지 않음 } const mo..
-
배포3차-5차멈멈-토이프로젝트(next.js)2 2024. 11. 1. 22:57
에러 .well-known/vercel/flags 못찾는다고 함https://test.vercel.app/.well-known/vercel/flags 404 (Not Found)app/ .well-known/vercel/flags 경로로 폴더 만듬 https://vercel.com/docs/workflow-collaboration/feature-flags/supporting-feature-flags엔드포인트를 위해서 .well-known/vercel/flags 있어야 한다고 함 엔드포인트란? 엔드포인트는 특정 데이터를 가져오거나 보내기 위해 API 서버와 연결되는 주소 1. 사용자가 서비스를 통해 서버에게 정보를 요청함2. 서버가 사용자가 요청한 정보를 처리 하는 url이 api 엔드 포인트 에러570..
-
배포 2차멈멈-토이프로젝트(next.js)2 2024. 10. 31. 23:07
배포 한 후 첫 에러3708.63815dd….js:2 Refused to connect to 'wss://ws-us3.pusher.com/app/7d55ac9…?protocol=7&client=js&version=7.0.6&flash=false' because it violates the following Content Security Policy directive: "connect-src 'self' https://테스트.supabase.co https://apis.data.go.kr".https://developer.mozilla.org/ko/docs/Web/HTTP/CSPContent Security Policy (CSP) 규칙에 의해 특정 웹소켓 연결과 HTTP 요청이 차단되었기 때문에 발생이라는..