Glyphtones - a simple audio-sharing platform for Nothing Phone users https://glyphtones.firu.dev
  • Go 42.5%
  • templ 22.3%
  • CSS 20.3%
  • JavaScript 12.3%
  • HTML 2.1%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-05 15:08:40 +02:00
.github add funding to repo 2025-08-10 21:19:47 +02:00
config more refactoring 2026-07-10 14:18:23 +02:00
database update db diagram 2026-08-05 14:52:20 +02:00
server display file too large error 2026-08-02 12:38:39 +02:00
static cleanup 2026-07-25 14:34:17 +02:00
templates lazyloading glyph data + better storage format 2026-07-25 13:31:03 +02:00
utils cleanup 2026-07-25 14:34:17 +02:00
.dockerignore polish 2026-07-10 14:29:38 +02:00
.gitignore cleanup 2026-07-09 23:20:55 +02:00
.sops.yaml add haloy deployment 2026-07-09 23:20:30 +02:00
Dockerfile speed up docker build 2026-07-11 09:26:36 +02:00
go.mod speed up docker build 2026-07-11 09:26:36 +02:00
go.sum speed up docker build 2026-07-11 09:26:36 +02:00
haloy.yaml admin effect select 2026-07-11 08:20:15 +02:00
LICENSE.md small fixes 2025-04-06 14:06:05 +02:00
main.go better logging 2026-07-11 08:48:18 +02:00
README.md better docker instructions 2026-08-05 15:08:40 +02:00
secrets.yaml add haloy deployment 2026-07-09 23:20:30 +02:00

Glyphtones

Nothing is making phones with programmable LED lights on the back. They call it "Glyph Interface" and there is a bunch of ringtones preinstalled. Nothing also made an app called Glyph Composer, which allows users to create new ringtones, but the options are quite limited. Users have figured out a way to create custom ringtones and started making popular songs with matching lights.

Glyphtones is a platform, where people can either share their custom compositions, or find those they like.

Screenshots

Tech stack

The app uses Go + echo + templ to render HTML pages for the client (and a little bit of htmx). Data is stored in a PostgreSQL database.

Production

The website is running in Germany, Falkenstein on Hetzner VPS.

Database Schema

ER Diagram Or take a look here: ./database/init.sql


How to run (for developers)

With Docker/Podman

  1. Clone the repository
git clone https://github.com/firu11/nothing-glyphtones.git
cd nothing-glyphtones
  1. Create a Docker network
docker network create glyphtones
  1. Run PostgreSQL
docker run -d \
  --name glyphtones-postgres \
  --network glyphtones \
  -e POSTGRES_USER=chris \
  -e POSTGRES_PASSWORD=password \
  -e POSTGRES_DB=glyphtones \
  -v glyphtones-postgres:/var/lib/postgresql/data \
  -v ./database/init.sql:/docker-entrypoint-initdb.d/init.sql:ro \
  postgres:17

PostgreSQL runs database/init.sql when initializing a new data volume. If the glyphtones-postgres volume already exists, remove it with docker volume rm glyphtones-postgres before starting PostgreSQL to run the script again.

  1. Build the application image
docker build -t glyphtones .
  1. Run the application container
docker run --rm \
  --network glyphtones \
  -p 8080:8080 \
  -e DB_CONNECTION_STRING="postgresql://chris:password@glyphtones-postgres:5432/glyphtones?sslmode=disable" \
  -e GOOGLE_SECRET="<GOOGLE_CONSOLE_SECRET>" \
  -e GOOGLE_ID="<GOOGLE_CONSOLE_ID>" \
  -e GOOGLE_REDIRECT_URL="http://localhost:8080/google-callback" \
  -e TOKEN_KEY="change-me" \
  glyphtones

It will be available on http://localhost:8080

Bare-metal (better for local development)

  1. Install Go compiler and PostgreSQL server
  2. Install Templ via go install
  3. Create a new database in psql
  4. Clone this repository
  5. Run the ./database/init.sql file to setup the database
  6. Configure your environment variables
  7. Run the project (templ generate && go run .)

MacOS example:

# INSTALLATION
brew install go                                   # go
brew install postgresql@17                        # postgresql
go install github.com/a-h/templ/cmd/templ@latest  # templ

# SETUP
brew services start postgresql  # start postgresql
psql postgres                   # open postgresql
# --- inside postgres ---
postgres=# CREATE ROLE chris WITH LOGIN PASSWORD 'password';  # create user with password
postgres=# CREATE DATABASE glyphtones OWNER chris;            # create a database called "glyphtones" with chris being the owner
postgres=# \q  # exit
# --- back in terminal ---
git clone https://github.com/firu11/nothing-glyphtones.git  # clone the repository

# CONFIGURATION
cd nothing-glyphtones                # go into the project
psql glyphtones < database/init.sql  # load the init.sql file into the database
# RUN
export DB_CONNECTION_STRING="postgresql://chris:password@localhost:5432/glyphtones?sslmode=disable"
export GOOGLE_SECRET="<GOOGLE_CONSOLE_SECRET>"
export GOOGLE_ID="<GOOGLE_CONSOLE_ID>"
export GOOGLE_REDIRECT_URL="http://localhost:8080/google-callback"
export TOKEN_KEY="change-me"

templ generate  # generate html templates
go run .        # run the code
# go to: http://localhost:8080 and voilà