이름과 한마디를 남기는 미니 방명록 · 강동헌 202204169
Translation pending
SocialTypeScript · ShellGitHub @kang1031OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
이름, 메시지, 작성 시각이 쌓이는 미니 방명록입니다. 회원가입이나 로그인은 없습니다. 글을 쓸 때 정한 비밀번호로만 그 글을 수정하거나 삭제할 수 있습니다. • 작성: 이름(1~20자), 메시지(1~500자), 비밀번호(4~72자)를 입력해 글을 남깁니다. • 조회: 모든 글을 작성 시각 최신순으로 보여줍니다. 시각은 한국 시간 기준입니다. • 수정: 비밀번호가 맞으면 메시지를 고칠 수 있습니다. 이름은 바꿀 수 없습니다. 수정된 글에는 "(수정됨)"과 수정 시각이 붙습니다. • 삭제: 비밀번호가 맞으면 글이 완전히 삭제됩니다. • 비밀번호가 틀리면 수정이나 삭제가 거부되고, 글 카드 안에 안내가 나옵니다. 이미 삭제된 글이면 따로 안내합니다. • Next.js 16 (App Router, Server Actions) + TypeScript • Neon Postgres (@neondatabase/serverless) • Tailwind CSS • Vitest • Vercel 배포 프로젝트 루트에 .env.local 파일을 만들고 Neon 연결 문자열을 넣습니다. 테이블을 만들고 개발 서버를 실행합니다.Read the full README ↗
이름, 메시지, 작성 시각이 쌓이는 미니 방명록입니다. 회원가입이나 로그인은 없습니다. 글을 쓸 때 정한 비밀번호로만 그 글을 수정하거나 삭제할 수 있습니다.
@neondatabase/serverless)npm install
프로젝트 루트에 .env.local 파일을 만들고 Neon 연결 문자열을 넣습니다.
DATABASE_URL=postgres://...neon.tech/neondb?sslmode=require
테이블을 만들고 개발 서버를 실행합니다.
npm run db:init # entries 테이블 생성 (여러 번 실행해도 안전)
npm run dev # http://localhost:3000
npm test
방명록 모듈(lib/guestbook)을 메모리 저장소로 테스트합니다. 작성, 목록 정렬, 입력 검증 경계값, 비밀번호 일치와 불일치, 이미 삭제된 글 처리, 비밀번호 비노출을 확인합니다. 실제 DB에는 접속하지 않습니다.
kang1031/guestbook-202204169를 가져옵니다(Import).DATABASE_URL을 추가합니다. Neon 연결 문자열을 넣고 Production, Preview, Development를 모두 선택합니다. Vercel의 Neon 연동(Storage → Neon)을 쓰면 이 변수가 자동으로 추가됩니다.DATABASE_URL="<운영 DB 연결 문자열>" npm run db:init. .env.local이 없어도 동작하며, 셸에서 지정한 값이 .env.local보다 우선합니다.master 브랜치에 푸시할 때마다 자동으로 다시 배포됩니다.lib/guestbook/: 방명록 모듈. 작성, 목록, 메시지 수정, 삭제를 담당하고, 저장소(EntryStore)를 주입받습니다.
validation.ts: 입력 검증. 글자 수는 사용자가 보는 글자 기준으로 셉니다.password.ts: crypto.scrypt와 글마다 다른 salt로 비밀번호를 해시하고, 상수 시간으로 비교합니다.neon-store.ts: Neon Postgres 저장소. 모든 값은 쿼리 파라미터로 바인딩합니다.memory-store.ts: 테스트용 메모리 저장소app/actions.ts: Server Actions. 폼 입력을 방명록 모듈로 넘기는 얇은 연결부입니다.app/page.tsx: 목록 페이지. 요청마다 렌더링합니다.app/entry-form.tsx, app/entry-card.tsx: 작성 폼과 글 카드(보기, 수정, 삭제 모드)db/schema.sql: 테이블 정의GLOSSARY.md: 도메인 용어 정의