-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.2.4 Readme, some tooling for lower level of abstraction - tauri, sq…
…lite wasm module itself
- Loading branch information
Сидоркин Олег Валентинович
authored and
Сидоркин Олег Валентинович
committed
Sep 26, 2024
1 parent
22dece2
commit 2a77bf7
Showing
6 changed files
with
167 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
attribution: | ||
contact_email: | ||
- [email protected] | ||
workmail: | ||
- [email protected] | ||
attribution-fallback: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
# Electron app for audio memos and privately typed thoughts storage | ||
# Architecture Overview of Wordly-X | ||
|
||
OPFS, @sqlite.org/sqlite-wasm | ||
Wordly-X is an Electron-based application designed for recording audio memos and storing typed thoughts privately. It leverages modern web and desktop technologies to provide a seamless user experience for daily journaling and audio recording. The application is built using Vite for bundling, TailwindCSS for styling, and it integrates SQLite for data persistence through WebAssembly. | ||
|
||
1-Day - 500 words | ||
### Key Components | ||
|
||
contribute with issues, please. | ||
1. **Electron Integration (`vite.config.js` and `electron/main.mjs`)**: | ||
- The Electron integration is configured in `vite.config.js` using the `vite-plugin-electron/simple`. This setup specifies the entry point for the Electron main process. | ||
- The main Electron process script (`electron/main.mjs`) is responsible for initializing the Electron app, creating windows, and handling inter-process communication. | ||
|
||
2. **Frontend (`index.html` and `src/main.mjs`)**: | ||
- `index.html` serves as the entry point for the UI, setting up the basic HTML structure and including references to the main JavaScript module. | ||
- `src/main.mjs` is the central module for UI logic, handling interactions, and rendering dynamic content based on user actions and data updates. | ||
|
||
3. **Database Management (`src/DB.mjs`)**: | ||
- This module abstracts all interactions with the SQLite database. It initializes the database, defines schema, and provides methods for CRUD operations on diary entries and audio files. | ||
- It uses `@sqlite.org/sqlite-wasm` for SQLite interactions, allowing the database operations to be performed within a browser environment through WebAssembly. | ||
|
||
4. **Utility Modules**: | ||
- `src/date-utils.mjs`: Contains helper functions for date manipulation and formatting specific to the application's needs. | ||
- `src/getWordCount.mjs`: Provides a utility to count words in a given text, used for tracking the length of diary entries. | ||
|
||
5. **Audio Recording (`src/Recorder.mjs`)**: | ||
- Handles audio recording functionality using the MediaRecorder API. | ||
- Manages audio data, saving recordings as files, and updating the UI to reflect new audio clips. | ||
|
||
6. **Styling (`src/style.css`, `tailwind.config.js`, and `postcss.config.js`)**: | ||
- `src/style.css` contains custom styles and utilities that extend the TailwindCSS framework. | ||
- Configuration for TailwindCSS is defined in `tailwind.config.js`, specifying the content sources for Tailwind's JIT engine. | ||
- `postcss.config.js` sets up PostCSS plugins used in the build process, including TailwindCSS and autoprefixer for CSS compatibility. | ||
|
||
### Architectural Invariants | ||
|
||
- **Client-Side Database**: The application's data is managed client-side using SQLite compiled to WebAssembly, ensuring all data remains local and private. | ||
- **Separation of Concerns**: UI rendering, business logic, and database management are distinctly separated into different modules, promoting maintainability and scalability. | ||
- **No External API Dependencies**: All functionalities are implemented using local resources and libraries without reliance on external APIs, enhancing privacy and offline capabilities. | ||
|
||
### Boundaries and Interfaces | ||
|
||
- **Electron and Renderer Process**: The communication between Electron's main process and renderer process is minimal, constrained to essential window management and IPC. | ||
- **UI and Database**: The UI components interact with the database strictly through the `DB` class interface, ensuring any database schema changes do not directly impact UI components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "wordly-x", | ||
"private": true, | ||
"version": "0.1.3", | ||
"version": "0.2.4", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
|
@@ -22,6 +22,9 @@ | |
"packageManager": "[email protected]+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb", | ||
"dependencies": { | ||
"@js-temporal/polyfill": "^0.4.4", | ||
"sqlocal": "^0.11.1" | ||
"@sqlite.org/sqlite-wasm": "3.46.1-build1", | ||
"date-fns": "^3.6.0", | ||
"sqlocal": "^0.11.1", | ||
"vite-plugin-tauri": "^3.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.