An open API service indexing awesome lists of open source software.

https://github.com/iomz/gyre-clone

A clone of GYRE "World Reflector"
https://github.com/iomz/gyre-clone

archimedean-spiral nextjs vercel webspeech-api

Last synced: 5 months ago
JSON representation

A clone of GYRE "World Reflector"

Awesome Lists containing this project

README

          

![Header Image](https://github.com/user-attachments/assets/0d002385-5e36-4b62-be8c-cd0b562ad24f)

# GYRE Clone

[![build status](https://github.com/iomz/gyre-clone/workflows/docker/badge.svg)](https://github.com/iomz/gyre-clone/actions?query=workflow%3Adocker)

More than a decade ago, [a shopping complex located at Omotesando, Tokyo](https://gyre-omotesando.com/) had an inspiring website displaying swirling words flowing into vortex.
I was just so keen to recreate the same or at least similar concept design to gain that nearly meditating feeling of watching the gyre.

The original work was produced by THA LTD, as "[GYRE WORLD REFLECTOR](https://tha.jp/45)."
_All the credits go to them_ – I just merely enjoy the visual and the sound by myself.

The text is generated by ChatGPT and stored in MongoDB. The app fetches the text based on the selected language and the topic. The text is then spoken using Web Speech API.

The recommended platform is Chrome on macOS, at the moment. Topics and languages can be easily extended by registering new entries to the DB.

See the running example at https://gyre-clone.vercel.app

## Synopsis

If you are not using Vercel and want to self-host the app:

1. Rename the `.env.local.example` to `.env.local`, which contains a MongoDB URL to access the docker service.

```console
mv .env.local.example .env.local
```

2. Download a preset data (`messages.json`) inside `/data` directory to seed the database.

```console
mkdir data && curl -o data/messages.json https://gyre-clone.vercel.app/api/message/export
```

3. Build the docker image.

```console
docker compose build
```

4. Run the services; the app is up and running at localhost:9763

```console
docker compose up -d
```

## Extend the topics and the languages

1. Create a new text file contains _a paragraph per line_. The file name should be `_.txt` (e.g., `food_en-GB.txt`).
2. Run the `scripts/post.js` with your `endpoint` and `dir` that contains the text file(s). In the example below, the text file is placed under `data` directory.

```console
node scripts/post.js http://localhost:9763/api/message data
```