[PR #20] The Server Plan for Sub-milestone 1
- What changed: A server development plan was written for Part 1 (login and accounts), and four unconfirmed items from the spec were checked in official documents.
- Decision: Confirmed that a Kakao Biz app is not needed. Apple refresh tokens will be kept, and an ORM (a tool for handling databases in code) was chosen.
- Still unknown: Kakao login does not work in Expo Go, so real-device testing will be done after a development build is made.
This is the record of a PR that wrote the server development plan for sub-milestone 1 (login and accounts). No code changed; only the plan document, edits to the spec and memos, and this PR’s work log went in.
What I did and why
- To start development there has to be a development plan. Before that, Claude verified the four “not confirmed” items in the spec from the official docs.
- Kakao biz app: not needed. The member number is provided by default without consent, and no consent items need to be set up.
- Apple token revocation: a refresh token is required. Deletion will be handled by an operator later, so the refresh token is received at login and stored encrypted.
- Google “internal” type: it is enough that the project sits under the organization.
- Expo’s Kakao library: it does not work in Expo Go and works only in a development build.
- The outputs are a new plan (16 tasks), the verification results and a re-consent screen in the spec, an exception for the Apple refresh token, an ORM decision line in the tech stack memo, and a marker in the terms README where the re-consent flow goes.
The options I chose and the ones I dropped
- Re-consent is asked “when the app opens” (my decision). It had been “at the next login”, but the app stays signed in for 30 days, so checking only at login could mean using changed terms for over a month without knowing.
- Re-consent is its own new screen (my decision). Sharing the invitation screen was dropped, because one screen would then do two jobs.
- The plan is split into server, web and app (my decision). Only the server plan went into this PR, and the web and app plans will be written after the server API is settled.
- The test database is a real PostgreSQL run with Docker (a tool that runs programs inside isolated boxes) (my decision). A lightweight embedded database was dropped, because simultaneous-submission tests might pass differently from the real thing.
- The ORM (a tool that lets you handle a database like objects in code) is TypeORM 1.x (my decision). Prisma was dropped because npm’s latest tag was 8.0 RC (a release candidate before the official version) and the official docs’ default view was for 8, so the docs and the installed version could disagree. Drizzle was dropped because it is in 1.0 beta.
- A number and a signature were added to the refresh key (the token that keeps you signed in). The first draft remembered only the one key just before, so even if an older key was reused it could not be recognized as theft. Claude found this during the self-review and fixed it.
- Three things not in the spec were added to the plan. They are re-consent, storing the Apple refresh token, and a 60-second grace period for the refresh key (so a person whose connection dropped before the response arrived is not logged out). All were marked in the plan as needing confirmation.
How I checked
- Claude read the Kakao user-information, login-settings and REST API docs, Apple’s Sign in with Apple REST API docs (token revocation, issuance, responses, user verification), Google’s consent-screen audience, organization-resource and ID-token verification docs, and the Kakao library README directly.
- On npm it confirmed the current versions and release dates of Prisma, Drizzle, TypeORM and
@nestjs/typeorm. - A self-review of the plan was done. While checking which task each screen, policy and failure case in the spec went into, it added one missing test, and it fixed the refresh-key gap.
- It confirmed that my Windows computer has neither Docker nor pnpm. So npm workspaces will be used, and Docker was put in the prerequisites.
What I learned
- When choosing a library, it helps to first look at the npm release tags to see “is a major version changing right now?”. This time all three candidates were in transition, and that became the deciding criterion.