Skip to content

iomz/gyre-clone

Repository files navigation

Header Image

GYRE Clone

build status

More than a decade ago, a shopping complex located at Omotesando, Tokyo 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." 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.
mv .env.local.example .env.local
  1. Download a preset data (messages.json) inside /data directory to seed the database.
mkdir data && curl -o data/messages.json https://gyre-clone.vercel.app/api/message/export
  1. Build the docker image.
docker compose build
  1. Run the services; the app is up and running at localhost:9763
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 <topic>_<language code>.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.
node scripts/post.js http://localhost:9763/api/message data