aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-12-06 17:05:21 +0900
committernsfisis <nsfisis@gmail.com>2025-12-06 17:37:04 +0900
commit811458427593a4172a2cd535cc768db375350dca (patch)
tree6c4f46c96b6f29392dc19d591e39e03c187033a1 /docs
parent9736a8981fbd6c6defbd67517ca23904fc844629 (diff)
downloadkioku-811458427593a4172a2cd535cc768db375350dca.tar.gz
kioku-811458427593a4172a2cd535cc768db375350dca.tar.zst
kioku-811458427593a4172a2cd535cc768db375350dca.zip
feat(dev): change architecture and directory structure
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/architecture.md63
-rw-r--r--docs/dev/roadmap.md4
2 files changed, 33 insertions, 34 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 2ace388..6b6e21d 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -4,25 +4,24 @@
| Layer | Technology |
|-------|------------|
-| Frontend | SvelteKit |
+| Frontend | React + Vite |
| Backend | Hono + TypeScript |
| Database | PostgreSQL |
| ORM | Drizzle |
| Client DB | Dexie.js (IndexedDB) |
-| PWA | @vite-pwa/sveltekit |
+| PWA | vite-plugin-pwa |
| Algorithm | FSRS (ts-fsrs) |
| Auth | username/password + JWT |
| Test | Vitest |
-| Monorepo | pnpm workspace |
| Deploy | Docker + VPS |
## Architecture Diagram
```
+--------------------------------------------------+
-| Client (PWA) |
+| Client (PWA) |
| +-------------+ +------------+ +------------+ |
-| | SvelteKit | | Dexie.js | | Service | |
+| | React | | Dexie.js | | Service | |
| | UI |<>| (IndexedDB)|<>| Worker | |
| +-------------+ +------------+ +------------+ |
| | | |
@@ -35,7 +34,7 @@
|
v HTTPS (REST API)
+--------------------------------------------------+
-| Server |
+| Server |
| +----------------------------------------------+|
| | Hono (TypeScript) ||
| | +--------+ +--------+ +--------+ +--------+ ||
@@ -54,32 +53,32 @@
```
kioku/
-├── package.json # Workspace root
-├── pnpm-workspace.yaml
-├── docker-compose.yml
-└── pkgs/
- ├── web/ # SvelteKit frontend
- │ ├── src/
- │ │ ├── lib/
- │ │ │ ├── components/
- │ │ │ ├── stores/
- │ │ │ ├── db/ # Dexie IndexedDB
- │ │ │ ├── sync/ # Sync engine
- │ │ │ └── api/
- │ │ └── routes/
- │ └── static/
- ├── server/ # Hono backend
- │ └── src/
- │ ├── routes/
- │ ├── services/
- │ ├── db/ # Drizzle schema
- │ ├── middleware/
- │ └── lib/
- │ └── apkg/ # Anki import
- └── shared/ # Shared types
- └── src/
- ├── types/
- └── schemas/ # Zod validation
+├── src/
+│ ├── server/ # Hono backend
+│ │ ├── index.ts
+│ │ ├── db/ # Drizzle schema
+│ │ ├── middleware/
+│ │ ├── repositories/
+│ │ ├── routes/
+│ │ ├── types/ # Server types
+│ │ ├── schemas/ # Zod validation
+│ │ └── lib/
+│ │ └── apkg/ # Anki import
+│ └── client/ # React frontend
+│ ├── index.tsx
+│ ├── components/
+│ ├── stores/
+│ ├── db/ # Dexie IndexedDB
+│ ├── sync/ # Sync engine
+│ ├── types/ # Client types
+│ └── api/
+├── drizzle/ # Drizzle migrations
+├── public/ # Static files (PWA manifest)
+├── package.json
+├── tsconfig.json
+├── vite.config.ts
+├── drizzle.config.ts
+└── compose.yaml
```
## Data Models
diff --git a/docs/dev/roadmap.md b/docs/dev/roadmap.md
index 1d6fcc4..c452a51 100644
--- a/docs/dev/roadmap.md
+++ b/docs/dev/roadmap.md
@@ -46,7 +46,7 @@ Smaller features first to enable early MVP validation.
**Goal**: Minimal UI for user login and registration
### Frontend Foundation
-- [ ] Initialize SvelteKit
+- [ ] Initialize React + Vite
- [ ] Setup routing
- [ ] API client (fetch wrapper with auth headers)
- [ ] Auth store (token management)
@@ -126,7 +126,7 @@ Smaller features first to enable early MVP validation.
**Goal**: Study offline
### PWA Setup
-- [ ] @vite-pwa/sveltekit configuration
+- [ ] vite-plugin-pwa configuration
- [ ] Web manifest
- [ ] Service Worker
- [ ] Offline fallback page