Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TypeDuck-HK/TypeDuck-Web
TypeDuck: Cantonese for everyone at your fingertips
https://github.com/TypeDuck-HK/TypeDuck-Web
Last synced: 7 days ago
JSON representation
TypeDuck: Cantonese for everyone at your fingertips
- Host: GitHub
- URL: https://github.com/TypeDuck-HK/TypeDuck-Web
- Owner: TypeDuck-HK
- License: bsd-3-clause
- Created: 2024-05-20T07:49:24.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-11T18:10:01.000Z (5 months ago)
- Last Synced: 2024-08-02T16:52:20.676Z (3 months ago)
- Language: TypeScript
- Homepage: https://typeduck.hk/web
- Size: 249 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TypeDuck Web
> [TypeDuck](https://typeduck.hk): _Cantonese for everyone at your fingertips_
This repository contains the source code for TypeDuck Web.
Visit [typeduck.hk/web](https://typeduck.hk/web) to give it a try!
## Development
TypeDuck Web is a static single-paged application (SPA) built with [TypeScript](https://www.typescriptlang.org), [React](https://reactjs.org), [Tailwind CSS](https://tailwindcss.com) and [daisyUI](https://daisyui.com).
The [RIME Input Method Engine](https://rime.im) is the technology that powers TypeDuck Web. It is compiled to [WebAssembly](https://webassembly.org) with [Emscripten](https://emscripten.org) and runs right in your browser without any data being sent to the server.
### Prerequisites
- [Bun](https://bun.sh)
Execute the command provided on the website to install Bun. Alternatively, you may install it with npm:
```sh
npm i -g bun
```- [CMake](https://cmake.org)
- [Ninja](https://ninja-build.org)
- [LLVM](https://llvm.org) (Windows only)You may install the above prerequisites with the following commands:
```sh
# Ubuntu
sudo apt install -y cmake ninja-build
# macOS
brew install cmake ninja
# Windows
choco install -y cmake --ia "ADD_CMAKE_TO_PATH=System"
choco install -y ninja llvm
```On Windows, you may skip the installation above and execute subsequent commands in _Developer PowerShell for Visual Studio_ if you have Visual Studio installed.
- [Emscripten](https://emscripten.org)
Follow the [installation guide](https://emscripten.org/docs/getting_started/downloads.html) to install Emscripten.
### Compilation
On Ubuntu, the following additional packages should be pre-installed:
```sh
sudo apt install -y \
libboost-dev \
libboost-regex-dev \
libyaml-cpp-dev \
libleveldb-dev \
libmarisa-dev \
libopencc-dev
```Then, execute the following commands in order:
```sh
bun run boost
bun run native
bun run schema
bun run lib
bun run wasm
```### Building the Worker Script
```sh
bun run worker
```### Starting the Development Server
```sh
bun start
```However, the above command is slow to start, at least on Windows. For a faster development experience, you may want to simply build the project.
### Building the Project
```sh
bun run build
```### Previewing the Output
```sh
bun run preview
```