<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts of Jackson Reyes RSS</title><link><![CDATA[https://ci.una.io/test3/m/posts/rss/author/26]]></link><atom:link href="https://ci.una.io/test3/m/posts/rss/author/26" rel="self" type="application/rss+xml" /><description>Posts of Jackson Reyes RSS</description><lastBuildDate>Mon, 28 Oct 2024 10:35:43 GMT</lastBuildDate><item><title><![CDATA[What running a fantasy baseball league taught me about community]]></title><link><![CDATA[https://ci.una.io/test3/view-post/what-running-a-fantasy-baseball-league]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/what-running-a-fantasy-baseball-league]]></guid><description><![CDATA[<p>Our fantasy baseball league wrapped up its season a few weeks ago, and while the real postseason plays out on my second monitor, I've been thinking about why that league has outlasted every chat group and forum I've ever started.Twelve managers, mostly friends of friends, several of whom have never met in person. We've kept it going for years with a group chat, a shared spreadsheet and, this season, our own space on this network. Nobody misses a week. That's better retention than anything I've built professionally, so I tried to write down why.A shared rhythmEvery week has the same beats: lineups on Monday, trade talk midweek, a recap post on Sunday night. You always know what happens next. Community rituals work the same way; predictability is a feature, not a bug.Small stakes, big storiesThe prize is a trophy that looks like it came from a garage sale. Nobody plays for it. They play for the stories: the lopsided trade from three seasons ago that still comes up, the manager who drafted a closer in the first round. Communities live on shared history, and someone has to write it down. In our league that's the Sunday recap.Rivalries with rulesThe trash talk is relentless, but there's one rule everyone respects: roast the roster, never the person. It's basically the "criticise ideas, not people" guideline with more emojis.The off-season starts now, which means arguing about draft order until spring. If you're in the Fantasy Baseball League space, the season recap thread is up. If you're not, there's a waitlist and I'm very easy to bribe with hot dogs.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/7tsz8dbvcgqltkpp2ndxkpagphflhvae.jpg" />]]></description><pubDate>Mon, 28 Oct 2024 10:35:43 GMT</pubDate></item><item><title><![CDATA[Load testing a self-hosted community before launch day]]></title><link><![CDATA[https://ci.una.io/test3/view-post/load-testing-a-self-hosted-community]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/load-testing-a-self-hosted-community]]></guid><description><![CDATA[<p>Confession: the first time I launched a community site, I tested it by clicking around on my laptop and declaring it fast. Then a newsletter went out, a few hundred people arrived in the same ten minutes, and I learned what a 502 looks like from the wrong side. These days I load test before anything goes public.The setupThe test box was a modest VPS with 2 vCPUs and 4 GB of RAM, running UNA on PHP 8 with MySQL on the same machine, plus a Next.js front end talking to it over the API. I used k6 to script a simple member journey: open the home feed, open a post, load the comments, and every tenth virtual user leaves a comment.What broke firstNot PHP, which surprised me. At around 150 concurrent virtual users the database started queuing, because I'd left MySQL on near-default settings. Raising the InnoDB buffer pool so the working set fitted in memory roughly halved the median response time on feed requests. The second bottleneck was me: my Next.js pages fetched the feed on every request instead of caching it for even a few seconds.What I changedTuned the MySQL buffer pool and connection limits for the size of the box.Configured PHP OPcache properly. It was on, just with a tiny memory limit.Cached public feed responses in the front end for 30 seconds, while logged-in pages stay fresh.Moved image resizing out of the request path.After those changes the same box handled about 400 virtual users with p95 response times under 800 ms. That's not a benchmark for anyone else's server, just proof that the defaults are rarely the ceiling.If you're launching something this autumn, run even a crude load test first. Twenty minutes with a script beats explaining downtime to your first members. I'm happy to share my k6 script in UNA Builders; it's about forty lines, and most of them are comments apologising to future me.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/wkgy3az9bcvzfvnf6n7c7cnwhsjpkr9d.jpg" />]]></description><pubDate>Thu, 24 Oct 2024 10:29:23 GMT</pubDate></item><item><title><![CDATA[A week in the fjords, and my self-hosted server survived]]></title><link><![CDATA[https://ci.una.io/test3/view-post/a-week-in-the-fjords-and-my-self-hosted]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/a-week-in-the-fjords-and-my-self-hosted]]></guid><description><![CDATA[<p>The cover photo is my favourite moment of the trip: a rocky ledge above a fjord in western Norway, no signal, and for once no urge to check it. I was offline for a week. The self-hosted server that runs our hackathon community was not, and it was fine. Past trips did not go this smoothly, so this time I prepared properly.Backups you've actually restoredA backup you've never restored is just a hopeful file. Two weeks before the trip I restored the previous night's database and uploads to a spare VPS and clicked around. It took an evening and found one folder my script had been skipping for months.Alerts that go to more than one personUptime and disk-space alerts now go to me and to one trusted co-admin. She had access, a one-page runbook and permission to restart services without asking me first.No upgrades the week beforeI froze everything: no package updates, no new modules, no "quick" config tweaks. Boring servers are happy servers.Leave the disk room to breatheLogs and media uploads keep growing while you're away. I cleared out old logs, set up rotation properly and made sure there was plenty of free space.The result: one alert all week, a certificate renewal that sorted itself out, and zero messages from my co-admin. I spent the time hiking and eating far too many cinnamon buns instead. Highly recommend both.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/wciramq3udhpp55tcsfxztwszgfd8glm.webp" />]]></description><pubDate>Wed, 07 Aug 2024 13:04:29 GMT</pubDate></item><item><title><![CDATA[Dark mode on real phones: five things I check before shipping]]></title><link><![CDATA[https://ci.una.io/test3/view-post/dark-mode-on-real-phones-five-things-i]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/dark-mode-on-real-phones-five-things-i]]></guid><description><![CDATA[<p>I spent the weekend testing the dark theme of our mobile feed on actual phones instead of simulators, and I'm a little embarrassed by how much I'd missed. What I check now, roughly in order of embarrassment:Photos with white backgrounds. A bright product shot in a dark feed is like a flashbang. A subtle border around images fixes most of it.Grey text on dark grey. Timestamps looked fine on my monitor and vanished on a mid-range phone at half brightness. Check contrast at low brightness, outdoors if you can.Logos and avatars with transparency. Dark logos on transparent backgrounds disappear completely. Give them a light backing.The system switch. Flip the phone between light and dark while the app is open. Ours left one screen stuck in the old theme until you restarted.Screenshots people share. Members screenshot posts and send them elsewhere. Make sure those still read well out of context.None of this is hard to fix. It's just easy to never notice, because most of us build on big bright screens in well-lit rooms.The fixes go out with the next update. If anything else looks off in dark mode, post a screenshot in the comments and tell me which phone you're on.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/p5ksgh5ypq2tkxjnyvmwl53hik7jgnme.jpg" />]]></description><pubDate>Mon, 05 Aug 2024 12:54:26 GMT</pubDate></item><item><title><![CDATA[Multi-photo posts in a headless UNA front end: what I learned]]></title><link><![CDATA[https://ci.una.io/test3/view-post/multi-photo-posts-in-a-headless-una-front]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/multi-photo-posts-in-a-headless-una-front]]></guid><description><![CDATA[<p>This week I finally fixed the thing that has been haunting our photo uploads: posting more than a handful of images from the mobile app on a bad connection. Writing down what I learned, mostly so future me stops making the same mistakes at 2am.Upload first, post secondMy first version sent the text and every image in one request. One dropped connection and the whole post failed, text included. Now each photo uploads to UNA's storage on its own as soon as you pick it, and the post is only created once every file has an ID. If you're typing a caption while the photos upload, you never notice.Retry like you mean itEach upload gets up to three retries with a short backoff. On the train, that took a ten-photo post from failing about 40% of the time to basically never in my testing. Not scientific, but I rode the same line four times to check, so I'm counting it.Order is part of the contentPeople pick their best photo first for a reason. Uploads finish in random order, so I keep the order from the picker and send it with the post instead of trusting whatever came back first. Reordering in the composer works now too, so you can drag the group shot to the front.Show progress honestlyA spinner that never ends makes people give up. Each thumbnail now gets its own small progress ring and a clear retry button if it fails for good.If you build on headless UNA and handle uploads differently, let's compare notes in UNA Builders. Code snippets welcome, especially if they make mine look bad.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/vmxejnhlpnpnnmqavv6rqcb2itygxvbh.jpg" />]]></description><pubDate>Fri, 02 Aug 2024 13:19:33 GMT</pubDate></item><item><title><![CDATA[Why Our Web and Mobile Front Ends Share One Monorepo]]></title><link><![CDATA[https://ci.una.io/test3/view-post/why-our-web-and-mobile-front-ends-share]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/why-our-web-and-mobile-front-ends-share]]></guid><description><![CDATA[<p>Yes, the cover photo is a monolith. No, a monorepo is not a monolith. Mostly. Let me explain before the backend folks in UNA Builders come for me.For the last few months I've been building a Next.js web front end and a React Native app that both talk to the same headless UNA install. For the first six weeks they lived in two repos. I fixed the same date-formatting bug three times: once in each app, and once more in a helper I'd forgotten existed. The third fix happened during a live demo. That was the end of two repos.What lives where nowapps/web: the Next.js siteapps/mobile: the React Native apppackages/app: shared screens, the API client and everything that talks to UNApackages/ui: design tokens and shared componentsWhat got betterA change to the API client lands in web and mobile in a single commit, so the two can't drift apart. Dependencies are pinned once. Reviews are easier because the reviewer sees the whole feature instead of half of it in another repo. And CI only rebuilds what changed, so a typo fix in the docs no longer kicks off a 12-minute mobile build.What got worse (the honesty section)The first install is slower. Tooling config has become a small hobby of its own. And when the build breaks, it breaks for everyone, so we're now strict about never merging on a red pipeline.Would I go back? No. Would I recommend it for a single UNA site with a custom theme? Also no, that's overkill. But the moment you have two front ends sharing logic, one repo saves real hours. Happy to walk through the setup at the next hackathon if anyone's curious.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/6ut2ngzu5vquypygakmumbznxk2cbpax.jpeg" />]]></description><pubDate>Sat, 22 Jul 2023 09:29:50 GMT</pubDate></item><item><title><![CDATA[MySQL for Self-Hosted Communities: What I Tune First]]></title><link><![CDATA[https://ci.una.io/test3/view-post/mysql-for-self-hosted-communities-what-i]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/mysql-for-self-hosted-communities-what-i]]></guid><description><![CDATA[<p>Confession: for my first self-hosted community I installed MySQL, accepted every default and moved on with my life. Six months later the feed took two seconds to load and I was reading database docs at 2am next to a cold slice of pizza. Learn from my mistakes.Here's what I now do on every new box before the first member signs up. The numbers come from a 4 GB VPS running UNA with about 3,000 members, so your mileage will vary.1. Give InnoDB some memoryThe default buffer pool is tiny. Raising innodb_buffer_pool_size to about half the RAM (less if PHP shares the server) took our median feed query from roughly 900 ms to 180 ms. Biggest single win, by a mile.2. Turn on the slow query logLog anything slower than one second and actually read the log once a week. Nine times out of ten the culprit is a custom block or a missing index, not the core.3. Use utf8mb4 everywhereYour members will use emoji. If the tables aren't utf8mb4, those posts get mangled or rejected. Check this before launch, because converting a live database is a very long evening.4. Separate users, minimal rightsThe app gets its own database user with access to its own database and nothing else. Root stays with you, from localhost only, with a long password that lives in a password manager.5. Backups you've actually restoredNightly dumps, copied off the server, kept for 30 days. Once a month I restore one into a scratch database. A backup you've never restored is just a rumour.It's boring work, but it's the difference between a community that feels snappy and one where people give up waiting for the page. Questions welcome in UNA Builders, where I'm usually lurking long after I should be asleep.</p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/pupnvlezcvh86edq7lfyrrxetikuefj3.jpg" />]]></description><pubDate>Thu, 13 Jul 2023 23:39:19 GMT</pubDate></item><item><title><![CDATA[The Power of Next.js: Optimizing Your App to Perfection]]></title><link><![CDATA[https://ci.una.io/test3/view-post/the-power-of-next-js-optimizing-your-app]]></link><guid><![CDATA[https://ci.una.io/test3/view-post/the-power-of-next-js-optimizing-your-app]]></guid><description><![CDATA[<p>Next.js is a powerful React framework that has quickly gained popularity among developers. It takes the strengths of React and adds additional features and enhancements, providing a comprehensive solution for building scalable, high-performance web applications. Let's explore why Next.js is considered the best meta-framework for optimizing your application.1. Server-Side Rendering (SSR)Next.js supports server-side rendering out of the box, which can significantly improve your app's performance and enhance its SEO capabilities. With SSR, the server renders the webpage before sending it to the client, which means your users can start viewing and interacting with your page more quickly.2. Automatic Code SplittingNext.js automatically splits your code into various bundles, meaning users only load what's necessary for each page. This results in faster page loads and a better overall user experience.3. Optimized Build StageNext.js uses a sophisticated build process to ensure your application is optimized for performance. It does this by applying several techniques, such as minification and dead code elimination, which can significantly reduce the size of your JavaScript bundles.4. Static Site Generation (SSG)Next.js also supports static site generation. This feature allows you to generate HTML pages at build time, resulting in fast and secure sites that can be hosted anywhere.5. Powerful Routing SystemNext.js comes with a file-system-based router built-in. This router enables dynamic routes, nested routes, and even supports catch-all routes, making your app's routing system extremely flexible and scalable.6. API RoutesIn addition to all these, Next.js offers API routes out of the box. This allows you to build your API right into your Next.js app, simplifying your architecture and reducing development time.By choosing Next.js as your React framework, you ensure your application is optimized for performance, scalability, and flexibility. Pair this with the strengths of PHP ... <a href="https://ci.una.io/test3/view-post/the-power-of-next-js-optimizing-your-app">Read more</a></p><img src="https://ci.una.io/test3/s/bx_posts_photos_resized/mgqrkraj4bmm6tp4yvjdc4vtabxtkdwm.jpg" />]]></description><pubDate>Wed, 28 Jun 2023 05:57:43 GMT</pubDate></item></channel></rss>