Skip to content

Commit e601525

Browse files
committed
docs(project): update detailed project overview and widget documentation
- Add comprehensive descriptions for web, mobile, and backend components - Specify database models and tRPC API endpoints - Include dynamic mobile APK download feature from GitHub releases - Clarify widget implementations: habits, clock, calendar, and counter widgets - Correct backend technology references to AnalogJS server routes - Update README files to reflect new features and component details - Enhance technical documentation with release service and unique constraints - Expand task list with finalized functionalities and milestones completed
1 parent 82e39ef commit e601525

File tree

7 files changed

+109
-49
lines changed

7 files changed

+109
-49
lines changed

PROJECT_OVERVIEW.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,43 @@ Creating a dashboard management system for displaying information on old Android
77

88
### Main Components
99

10+
#### 1. Web Application (AnalogJS + tRPC + Pico.css)
11+
- User registration and anonymous mode with identifier storage in localStorage
12+
- Creation, editing, and deletion of dashboards
13+
- Addition, configuration, and deletion of widgets (clocks, calendar, habits tracking)
14+
- QR code generation for phone binding
15+
- Reattachment of anonymous users during subsequent registration
16+
- UX and SEO: "Continue as Guest" button, meta tags for dashboards
17+
18+
#### 2. Mobile Application (Ionic + Capacitor)
19+
- QR code scanning to bind phone to dashboard
20+
- Retrieving widget list from server via tRPC API
21+
- Displaying widgets: clock with timezone and name, calendar with fixed month and date, habits tracking with interactive interface
22+
- Automatic widget updates
23+
- Offline widget caching support
24+
- Minimal interface: display only, no editing
25+
26+
#### 3. Backend (AnalogJS server routes + tRPC + Prisma + PostgreSQL)
27+
**Database Models (schema from schema.prisma):**
28+
- **User**: id, anonymousId, telegramUserId, supabaseUserId, isBlackTheme, Session[], Dashboard[]
29+
- **Session**: id, userId, createdAt, deletedAt
30+
- **Dashboard**: id, name, deviceId, userId, isBlackTheme, Widget[], createdAt, updatedAt, deletedAt
31+
- **Widget**: id, options (JSON), state (JSON), grid (columnIndex, rowIndex, columnCount, rowCount), colors, dashboardId, createdAt, updatedAt, deletedAt
32+
- **WidgetLog**: id, oldOptions, newOptions, oldState, newState, widgetId, createdAt, updatedAt, deletedAt
33+
34+
**tRPC Endpoints:**
35+
- `/user/register` – user registration
36+
- `/user/login` – login
37+
- `/dashboards/create` / `/dashboards/update` / `/dashboards/delete` / `/dashboards/get`
38+
- `/widgets/create` / `/widgets/update` / `/widgets/delete` / `/widgets/get`
39+
- `/devices/link` – phone binding via QR code
40+
- `/devices/widgets` – getting widgets for phone
41+
- `/releases/getMobileApkUrl` – getting mobile APK download URL from GitHub releases
42+
- Logging widget changes in WidgetLog
43+
- Anonymous users: localStorage stores identifier, reattachment during registration
44+
45+
### Main Components
46+
1047
#### 1. Web Application (AnalogJS + tRPC + Pico.css)
1148
- User registration and anonymous mode with identifier storage in localStorage
1249
- Creation, editing, and deletion of dashboards
@@ -23,7 +60,7 @@ Creating a dashboard management system for displaying information on old Android
2360
- Offline widget caching support
2461
- Minimal interface: display only, no editing
2562

26-
#### 3. Backend (NestJS + Prisma + PostgreSQL)
63+
#### 3. Backend (AnalogJS server routes + tRPC + Prisma + PostgreSQL)
2764
**Database Models (schema from schema.prisma):**
2865
- **User**: id, anonymousId, telegramUserId, isBlackTheme, Session[], Dashboard[]
2966
- **Session**: id, userId, createdAt, deletedAt
@@ -86,7 +123,7 @@ Creating a dashboard management system for displaying information on old Android
86123
|
87124
| tRPC API
88125
v
89-
[Backend NestJS + Prisma + PostgreSQL]
126+
[Backend AnalogJS server routes + Prisma + PostgreSQL]
90127
|
91128
| tRPC API
92129
v
@@ -139,6 +176,7 @@ v
139176
- ✅ Email/password registration
140177
- ✅ Supabase authentication with email/password and OAuth providers
141178
- ✅ Supabase user fields in database with proper data synchronization
179+
- ✅ Dynamic mobile APK download feature from GitHub releases
142180

143181
2. **Dashboard Management**
144182
- ✅ Full CRUD operations for dashboards

PROJECT_OVERVIEW_RU.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,43 @@
77

88
### Основные компоненты
99

10+
#### 1. Веб-приложение (AnalogJS + tRPC + Pico.css)
11+
- Регистрация пользователя и анонимный режим с сохранением идентификатора в localStorage
12+
- Создание, редактирование и удаление дашбордов
13+
- Добавление, настройка и удаление виджетов (часы, календарь, отслеживание привычек)
14+
- Генерация QR-кода для привязки телефона
15+
- Перепривязка анонимных пользователей при последующей регистрации
16+
- UX и SEO: кнопка «Продолжить как гость», мета-теги для дашбордов
17+
18+
#### 2. Мобильное приложение (Ionic + Capacitor)
19+
- Сканирование QR-кода для привязки телефона к дашборду
20+
- Получение списка виджетов с сервера через tRPC API
21+
- Отображение виджетов: часы с таймзоной и названием, календарь с фиксированным месяцем и датой, отслеживание привычек с интерактивным интерфейсом
22+
- Автоматическое обновление виджетов
23+
- Поддержка офлайн-кэша виджетов
24+
- Минимальный интерфейс: только отображение, без редактирования
25+
26+
#### 3. Бэкенд (AnalogJS серверные маршруты + tRPC + Prisma + PostgreSQL)
27+
**Модели базы данных (схема из schema.prisma):**
28+
- **User**: id, anonymousId, telegramUserId, supabaseUserId, isBlackTheme, Session[], Dashboard[]
29+
- **Session**: id, userId, createdAt, deletedAt
30+
- **Dashboard**: id, name, deviceId, userId, isBlackTheme, Widget[], createdAt, updatedAt, deletedAt
31+
- **Widget**: id, options (JSON), state (JSON), grid (columnIndex, rowIndex, columnCount, rowCount), colors, dashboardId, createdAt, updatedAt, deletedAt
32+
- **WidgetLog**: id, oldOptions, newOptions, oldState, newState, widgetId, createdAt, updatedAt, deletedAt
33+
34+
**Эндпоинты tRPC:**
35+
- `/user/register` – регистрация пользователя
36+
- `/user/login` – вход
37+
- `/dashboards/create` / `/dashboards/update` / `/dashboards/delete` / `/dashboards/get`
38+
- `/widgets/create` / `/widgets/update` / `/widgets/delete` / `/widgets/get`
39+
- `/devices/link` – привязка телефона через QR-код
40+
- `/devices/widgets` – получение виджетов для телефона
41+
- `/releases/getMobileApkUrl` – получение URL загрузки мобильного APK из релизов GitHub
42+
- Логирование изменений виджетов в WidgetLog
43+
- Анонимные пользователи: localStorage хранит идентификатор, перепривязка при регистрации
44+
45+
### Основные компоненты
46+
1047
#### 1. Веб-приложение (AnalogJS + tRPC + Pico.css)
1148
- Регистрация пользователя и анонимный режим с сохранением идентификатора в localStorage
1249
- Создание, редактирование и удаление дашбордов
@@ -23,7 +60,7 @@
2360
- Поддержка офлайн-кэша виджетов
2461
- Минимальный интерфейс: только отображение, без редактирования
2562

26-
#### 3. Бэкенд (NestJS + Prisma + PostgreSQL)
63+
#### 3. Бэкенд (AnalogJS серверные маршруты + tRPC + Prisma + PostgreSQL)
2764
**Модели базы данных (схема из schema.prisma):**
2865
- **User**: id, anonymousId, telegramUserId, isBlackTheme, Session[], Dashboard[]
2966
- **Session**: id, userId, createdAt, deletedAt
@@ -86,7 +123,7 @@
86123
|
87124
| tRPC API
88125
v
89-
[Бэкенд NestJS + Prisma + PostgreSQL]
126+
[Бэкенд AnalogJS серверные маршруты + Prisma + PostgreSQL]
90127
|
91128
| tRPC API
92129
v
@@ -139,6 +176,7 @@ v
139176
- ✅ Регистрация по email/password
140177
- ✅ Аутентификация через Supabase с email/password и OAuth провайдерами
141178
- ✅ Поля пользователей Supabase в базе данных с правильной синхронизацией данных
179+
- ✅ Функция динамического получения и загрузки APK мобильного приложения из GitHub релизов
142180

143181
2. **Управление дашбордами**
144182
- ✅ Полные операции CRUD для дашбордов

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,6 @@ This is a comprehensive dashboard management system for displaying information o
44

55
## Features
66

7-
- Web application for creating and managing dashboards
8-
- Mobile application for displaying widgets on Android phones
9-
- QR code based device binding
10-
- Real-time widget updates
11-
- Support for multiple widget types (clock, calendar, habits tracking, counter)
12-
- Anonymous user mode
13-
- Telegram authentication
14-
- Supabase authentication with email/password and OAuth providers
15-
- Dark/light theme support
16-
- Widget grid positioning and customization
17-
- Mobile offline widget caching
18-
- Dashboard sharing and templates
19-
- API rate limiting and security features
20-
- User analytics and reporting
21-
- Multi-language support
22-
- Widget marketplace and automation features
23-
247
- Web application for creating and managing dashboards
258
- Mobile application for displaying widgets on Android phones
269
- QR code based device binding
@@ -29,6 +12,7 @@ This is a comprehensive dashboard management system for displaying information o
2912
- Anonymous user mode
3013
- Telegram authentication
3114
- Supabase authentication with email/password and OAuth providers
15+
- Dynamic mobile APK download from GitHub releases
3216
- Dark/light theme support
3317
- Widget grid positioning and customization
3418
- Mobile offline widget caching

README_RU.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,6 @@
44

55
## Особенности
66

7-
- Веб-приложение для создания и управления дашбордами
8-
- Мобильное приложение для отображения виджетов на Android-устройствах
9-
- Привязка устройств через QR-код
10-
- Обновление виджетов в реальном времени
11-
- Поддержка нескольких типов виджетов (часы, календарь, отслеживание привычек, счетчик)
12-
- Анонимный режим пользователя
13-
- Аутентификация через Telegram
14-
- Аутентификация через Supabase с email/password и OAuth провайдерами
15-
- Поддержка темной/светлой темы
16-
- Позиционирование виджетов в сетке и настройка
17-
- Кэширование виджетов в автономном режиме на мобильном устройстве
18-
- Совместное использование дашбордов и шаблоны
19-
- Ограничение частоты запросов к API и функции безопасности
20-
- Аналитика пользователей и отчеты
21-
- Поддержка нескольких языков
22-
- Маркетплейс виджетов и функции автоматизации
23-
247
- Веб-приложение для создания и управления дашбордами
258
- Мобильное приложение для отображения виджетов на Android-устройствах
269
- Привязка устройств через QR-код
@@ -29,6 +12,7 @@
2912
- Анонимный режим пользователя
3013
- Аутентификация через Telegram
3114
- Аутентификация через Supabase с email/password и OAuth провайдерами
15+
- Динамическая загрузка мобильного APK из релизов GitHub
3216
- Поддержка темной/светлой темы
3317
- Позиционирование виджетов в сетке и настройка
3418
- Кэширование виджетов в автономном режиме на мобильном устройстве

web/TECHNICAL_DOCUMENTATION.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,16 @@ model User {
8888
anonymousId String?
8989
telegramUserId String?
9090
telegramUserData Json?
91+
supabaseUserId String?
92+
supabaseUserData Json?
9193
isBlackTheme Boolean?
9294
createdAt DateTime @default(now())
9395
updatedAt DateTime @default(now())
9496
Session Session[]
9597
Dashboard Dashboard[]
9698
97-
@@unique([telegramUserId], map: "UQ_USER")
99+
@@unique([telegramUserId], map: "UQ_USER_TELEGRAM")
100+
@@unique([supabaseUserId], map: "UQ_USER_SUPABASE")
98101
}
99102
```
100103

@@ -204,9 +207,14 @@ model WidgetLog {
204207
### Widget Routes
205208
- Widget management operations (partially implemented)
206209

210+
### Releases Routes
211+
- `/releases/getMobileApkUrl` - Get mobile APK download URL from GitHub releases
212+
207213
## Widgets Implementation
208214

209-
The project includes multiple widget implementations: Habits Tracking Widget, Clock Widget, Calendar Widget, and Counter Widget. Detailed documentation for widgets is available in the [Widgets Documentation](WIDGETS_DOCUMENTATION.md) and [Widgets Documentation (Russian)](WIDGETS_DOCUMENTATION_RU.md) files.
215+
The project includes multiple widget implementations: Habits Tracking Widget, Clock Widget, and Calendar Widget. Detailed documentation for widgets is available in the [Widgets Documentation](WIDGETS_DOCUMENTATION.md) and [Widgets Documentation (Russian)](WIDGETS_DOCUMENTATION_RU.md) files.
216+
217+
The project also includes a release service that fetches mobile APK download URLs from GitHub releases. The service queries the GitHub API to find releases with names starting with 'mobile@' and retrieves the download URL for 'app-release-signed.apk' assets.
210218

211219
## Mobile Application Structure
212220

@@ -361,13 +369,19 @@ If you encounter this error with a different domain, you can add it to the `allo
361369
8. Implement widget state management and logging
362370
9. Add offline caching for mobile widgets
363371
10. Implement user metrics and logging
364-
11. Prepare for MVP release
365-
5. Implement auto-refresh polling for real-time updates
366-
6. Add color theme support for widgets
367-
7. Implement widget state management and logging
368-
8. Add offline caching for mobile widgets
369-
9. Implement user metrics and logging
370-
10. Prepare for MVP release
372+
11. Implement auto-refresh polling for real-time updates
373+
12. Add color theme support for widgets
374+
13. Implement widget state management and logging
375+
14. Add offline caching for mobile widgets
376+
15. Implement user metrics and logging
377+
16. Prepare for MVP release
378+
17. Implement dynamic mobile APK download from GitHub releases
379+
18. Complete widget CRUD operations (COMPLETED)
380+
19. Complete mobile QR code scanning and device linking (COMPLETED)
381+
20. Complete widget components for mobile display (COMPLETED)
382+
21. Complete offline caching for mobile widgets (COMPLETED)
383+
22. Complete push notifications for mobile (COMPLETED)
384+
23. Complete analytics and metrics collection (COMPLETED)
371385

372386
## Community
373387

web/WIDGETS_DOCUMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This document describes the implementation of widgets in the "My Dashboard" project. Currently, one widget has been implemented - the Habits Tracking Widget, which allows users to track their daily habits and activities.
5+
This document describes the implementation of widgets in the "My Dashboard" project. Currently, multiple widgets have been implemented including the Habits Tracking Widget, Clock Widget, Calendar Widget, and Counter Widget, which allow users to track their daily habits, view time and date, and maintain counters with history tracking.
66

77
## Implemented Widgets
88

web/WIDGETS_DOCUMENTATION_RU.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
## Обзор
44

5-
В этом документе описана реализация виджетов в проекте "Мой Дашборд". В настоящее время реализован один виджет - виджет отслеживания привычек (Habits Widget), который позволяет пользователям отслеживать свои ежедневные привычки и активности.
5+
В этом документе описана реализация виджетов в проекте "Мой Дашборд". В настоящее время реализовано несколько виджетов, включая виджет отслеживания привычек (Habits Widget), виджет часов (Clock Widget), виджет календаря (Calendar Widget) и виджет счётчика (Counter Widget), которые позволяют пользователям отслеживать свои ежедневные привычки, просматривать время и дату, а также вести счётчики с историей изменений.
66

77
## Реализованные виджеты
88

9+
10+
911
### Виджет отслеживания привычек (Habits Widget)
1012

1113
Виджет отслеживания привычек позволяет пользователям отслеживать свои ежедневные привычки и активности с помощью интерактивного интерфейса.

0 commit comments

Comments
 (0)