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). This approach is called "server-side rendering". Data are stored in a PostgreSQL database.
The website is running in Germany, Falkenstein on Hetzner VPS.
- Install Go compiler and PostgreSQL server
- Install Templ via
go install
- Create a new database in psql
- Clone this repository
- Run the init.sql file to setup the database
- Rename .env.example to .env and configure your enviroment 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/Firu115/nothing_glyphtones.git # clone the repository
# CONFIGURATION
cd nothing_glyphtones # go into the project
psql glyphtones < init.sql # load the init.sql file into the database
cp .env.example .env # duplicate .env.example -> .env
open -e .env # open .env file
# (instead of `open -e` you can use `code`, `zed`, `vim`, `nano`)
# edit the configuration:
# when following this tutorial, only 3 variables need to be changed
# DB_NAME=glyphtones
# DB_USER=chris
# DB_NAME=password
# save the file
# RUN
templ generate # generate html templates
go run . # run the code
# go to: http://localhost:1323 and voilà