**Verifying Dependencies**

I'm currently checking the project's dependencies, specifically `better-sqlite3`. I've found it's present in `node_modules` and imported in `src/lib/db.ts`. I'm now cross-referencing this with `package.json` to ensure consistency. The import statement in `db.ts` uses `import Database from 'better-sqlite3';` and I've also spotted `@types/better-sqlite3`.

"# COMS3011A Lab 1: Todo App\n\nA local-first, single-user task management application built with Next.js App Router and SQLite (`better-sqlite3`).\n\n---\n\n## Project Description\n\nThis project provides a task management interface designed for desktop usage. It features task creation, real-time sorting by topic, status, and due date, dynamic overdue detection, task editing, and soft-deletion (archiving) with unarchiving capabilities.\n\n---\n\n## Architectural Choices & Key Decisions\n\n1. Next.js App Router (Server Components & Server Actions):\n   - Server Components execute on Node.js, allowing direct SQLite queries without separate REST API setup.\n   - Server Actions handle form submissions securely on the server, eliminating client-side API boilerplate.\n   - Server cache revalidation (`revalidatePath('/')`) keeps UI data in sync instantly after mutations.\n\n2. SQLite via `better-sqlite3` (Local-First):\n   - Synchronous, file-based database stored directly in `todo.db`.\n   - Offers low latency and zero network dependencies.\n\n3. Dynamic Overdue State Derivation:\n   - Overdue status is computed dynamically at read-time by comparing `due_date` against the current date for non-completed tasks.\n   - Overdue state is intentionally excluded as a database column to prevent stale data.\n\n4. Soft-Deletion (Archiving):\n   - Tasks are never hard-deleted from SQLite. Archiving sets `is_archived = 1`, preserving historical records while enabling restoration.\n\n---\n\n## System Architecture UML Diagram\n\n```mermaid\nsequenceDiagram\n    autonumber\n    actor User\n    participant ClientComp as React Client Component\n    participant ServerAct as Server Action (actions.ts)\n    participant DataLayer as Data Access Layer (tasks.ts)\n    participant SQLite as SQLite DB (todo.db)\n    participant Page as Server Page (page.tsx)\n\n    User->>ClientComp: Submit Task / Action Trigger\n    ClientComp->>ServerAct: Invoke Server Action (formData)\n    ServerAct->>ServerAct: Validate Inputs & Guard Fields\n    ServerAc
<truncated 2486 bytes>

"Create clean main README.md without emojis and linking to all docs files"


Created At: 2026-07-30T16:50:18Z
Completed At: 2026-07-30T16:50:20Z
Created file file:///c:/Users/mahla/critical_projects/SDP_Lab_1_To-do-app/README.md with requested content.
If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission.


### Complete Documentation Package Created

All documentation files have been created without emojis, structured into a dedicated `docs/` folder, and indexed directly from the main `README.md`:

---

### Main Documentation File
- **[README.md](file:///c:/Users/mahla/critical_projects/SDP_Lab_1_To-do-app/README.md)**
  - Project Overview & Descriptions.
  - Architectural choices & decision justifications (Server Actions, SQLite local-first, dynamic overdue calculation, soft deletion).
  - Sequence UML diagram illustrating client-to-server data flow.
  - Third-party packages table with 1-line justifications.
  - Environment requirements, installation, running, and port fallback instructions.
  - AI Transparency declaration and links to all documentation files.

---

### Documentation Sub-Directory (`docs/`)
1. **[docs/DATABASE_DESIGN.md](file:///c:/Users/mahla/critical_projects/SDP_Lab_1_To-do-app/docs/DATABASE_DESIGN.md)**
   - Complete `tasks` table schema definition.
   - Column types, constraints, and data specifications.
   - Design rationale for soft-deletion and read-time overdue computation.

2. **[docs/RELATIONSHIPS.md](file:///c:/Users/mahla/critical_projects/SDP_Lab_1_To-do-app/docs/RELATIONSHIPS.md)**
   - Class diagram for entity relations.
   - State transition diagram detailing task lifecycle (Active, Complete, Archived, Restored).
   - Dynamic overdue calculation rule definitions.

3. **[docs/AI_TRANSPARENCY.md](file:///c:/Users/mahla/critical_projects/SDP_Lab_1_To-do-app/docs/AI_TRANSPARENCY.md)**
   - Declaration of AI pair-programming and pedagogical usage.
   - Roles and responsibilities breakdown.
   - System paths to session logs and transcript records (`transcript.jsonl`).