safeeyes
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder
翻訳待ち
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A web app where users answer 4 questions and instantly get a calculated result. No login required. Fully responsive on mobile and desktop.
| Item | Link |
|---|---|
| Website (Production) | https://ooca-dev.vercel.app/ |
| Demo video |
https://github.com/user-attachments/assets/b111fefc-0c31-426b-a791-097921f792c8
|
| Area | Technology |
|---|---|
| Framework | Next.js (App Router) |
| Language | TypeScript (strict mode) |
| Database | PostgreSQL |
| ORM | Drizzle ORM |
| Client data fetching | TanStack Query |
| Validation | Zod |
| Lint / Format | Biome |
Component → Hook (TanStack Query) → Server Action → Service → Repository → Drizzle / PostgreSQL
Migrations live in drizzle/. The first one (*_baseline) mirrors the schema that was already pushed to the database, so on an existing database apply only the later migrations, e.g.:
-- drizzle/*_answers_session_question_unique
CREATE UNIQUE INDEX IF NOT EXISTS "answers_session_question_unique" ON "answers" ("session_id","question_id");
On a fresh database run pnpm drizzle-kit migrate.
src/
├─ app/ # Routes (pages)
├─ features/quiz/
│ ├─ actions/ # Server Actions
│ ├─ services/ # Business logic
│ ├─ repositories/ # Database access
│ ├─ schemas/ # Zod schemas
│ ├─ hooks/ # TanStack Query hooks
│ └─ components/ # Feature UI
├─ db/ # Drizzle schema and client
└─ lib/ # Shared helpers
public/ # UI files and images