Why?
I’m a big fan of disc golf. My landing page all things disc golf: Disc Golf
Discs are obviously a big deal. You buy or find discs (with no name), lose discs (a lot), or get mesmerized by majestic tour stamped discs.
I usually try to keep my Disc Golf Gear List separate from by disc database.
I’m not into discs as much as others, even after being into disc golf for years. I am a software engineer, and with that my nerdi-ness of wanting to keep stats takes over.
So I keep track of all new and lost discs I accumulate so I can see counts / stats.
I’ve missed some here and there of course, not a perfect bookkeeper.
I’ve tried different ways to keep track of discs:
- Excel file
- Obsidian markdown
- JSON file on GitHub
- EventstoreDB
- (Active) Postgres + Noco DB
Every time, every implementation, eventually, the DB stops getting updated because it’s not simple enough.
I want these qualities from a disc database:
- Easy to update from desktop or mobile
- Private edit
- Easily shared / public viewable read-only
- Structured data
So I’m using neon.tech Postgres + Noco DB . Noco is free/open source and gives me the structured data I want and a nice UI to edit it. Nowadays it seems to work on mobile. I can either host a view on my website or just query SQL and render it how I want so others can view it.
How?
Database I’m using https://neon.tech/ for free Postgres hosting. I don’t want to worry about backups or losing data.
My schema is one table. It could be normalized more but I don’t care:
create table noco.disc
(
brand text,
color text,
model text,
plastic text,
number bigint,
status text,
weight bigint,
created date,
price numeric,
notes text,
aces bigint,
id integer default nextval('noco.discs_source_csv_id_seq'::regclass) not null
constraint discs_source_csv_pkey
primary key,
created_at timestamp default now(),
updated_at timestamp default now()
);
(Some of the columns are auto-generated by Noco but that’s a bit obvious)
Probably, the most important, column, is… number
. It’s really nice to be over 100 now. Also, it’s nice to differentiate help similarly colored no stamp discs:
Editing I use Noco DB running from a docker compose file. I love how close this is to Airtable. I mean it is far from it, but I like the experience.
Noco DB is hosted via 2023-09-06 Cloudflare Zero Trust Tunnel Setup so I can edit/view from anywhere.
Viewing
For now, Noco’s “views” will do the job. It’s just an iframe
.
Available here: https://loonison.com/discs
Another pro of using the view is you can download as CSV or XLSX. So others can take the same format if they want and I don’t have to write any UI or export API code 💪
To Dos
- Show picture(s) of discs
- Delete JSON file from
/data
folder on GitHub - Link this to blog index, link this to disc golf projects
- link to architecture?
After Thoughts
I’ve been using this for a while, just thought I’d document it.
I’m mixing hosting locally and a cloud database, but I think this gives:
- Free (besides power)
- Data automatically backed up
- Secure public access with Cloudflare
- Minimal custom code
Along with this project, I want a similar flow to: 2023-09-16 New Project - Upload Udisc Scorecards and Populate Feed.