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.
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.
The website is running in Germany, Falkenstein on Hetzner VPS.
Or take a look here: ./database/init.sql
- Clone the repository
git clone https://github.com/firu11/nothing-glyphtones.git
cd nothing-glyphtones- Create a Docker network
docker network create glyphtones- 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:17PostgreSQL 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.
- Build the application image
docker build -t glyphtones .- 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" \
glyphtonesIt will be available on http://localhost:8080
- Install Go compiler and PostgreSQL server
- Install Templ via
go install - Create a new database in psql
- Clone this repository
- Run the ./database/init.sql file to setup the database
- Configure your environment variables
- Run the project (
templ generate && go run .)
# 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à