Skip to content

Instantly share code, notes, and snippets.

View fer-ri's full-sized avatar

Ferri Sutanto fer-ri

  • Purwokerto, Indonesia
View GitHub Profile
@fer-ri
fer-ri / serwist-research.md
Created August 21, 2026 03:35
Serwist/Service-worker research for expense-tracker #32

Service worker + manifest options for Next.js 16 (research for #32)

Repo: apps/web, Next.js 16.3.0, App Router, default next build (Turbopack), PowerSync client already in place.

Options

1. Serwist — @serwist/next / @serwist/turbopack (recommended)

  • Actively maintained Workbox fork ("swiss army knife for service workers", 1.5k stars, release cadence active).
  • @serwist/next 9.5.12 (latest stable): peer next >=14.0.0; webpack-oriented integration (withSerwist wrapper + @serwist/webpack-plugin).
  • @serwist/turbopack (same 9.5.x line): dedicated Turbopack integration — withSerwist in next.config, a route handler app/serwist/[path]/route.ts that serves the SW, plus @serwist/turbopack/worker default cache strategies and SerwistProvider for registration. Built-in /~offline document fallback.
@fer-ri
fer-ri / resolution-26.md
Created August 20, 2026 11:51
Resolution: #26 typed category page (tabs, locked rows, client sort)

#26 — Typed category page: tabs, locked rows, client sort preference — RESOLVED

Commit 958e7b3 on main. All six acceptance criteria met.

What shipped

  • Tabs: Expense | Income | Debt/Loan (Tabs added to @repo/ui). "Create Category" entry point renders only under Expense/Income; Debt/Loan tab renders exactly the four locked system rows (Debt, Repayment, Loan, Debt Collection) read-only — no create/edit/delete affordances anywhere on them.
  • Typed create: createCategory stamps root type from the active tab (expense/income only — debt_loan rejected), children inherit their parent's type; UI never offers a type input. Shared rule lives in apps/web/lib/categories/category-type.ts (client lib throws; upload route rejects the op).
  • No drag: dnd-kit removed from the page. Display sort = Alphabetical | Most Used | Last Updated, computed client-side from local data (Most Used counts live transactions per category), persisted per-user in localStorage (`expense-tracker:category-sort:
@fer-ri
fer-ri / issue-230-resolution.md
Created August 10, 2026 14:40
Resolution for hris-backend issue #230 pagination bug

Issue #230 Resolution

Root Cause

Lighthouse @paginate correctly parses GraphQL first and page. However, fields using @paginate(resolver: ...) delegate paginator construction to custom resolvers.

The custom resolvers called Eloquent paginate() without arguments. Laravel then used its default page size of 15, so GraphQL pagination variables were ignored. Lighthouse's pagination.default_count setting does not configure an inner Laravel paginate() call.

This was a codebase integration bug, not a Lighthouse defect.

@fer-ri
fer-ri / spleeter.md
Created October 22, 2023 08:32 — forked from dungsaga/spleeter.md
Voice removal AKA karaoke creator
This file has been truncated, but you can view the full file.
{
"kind": "webfonts#webfontList",
"items": [
{
"family": "ABeeZee",
"variants": [
"regular",
"italic"
],
"subsets": [
@fer-ri
fer-ri / docker-compose.yml
Created March 8, 2023 05:54 — forked from elvinlari/docker-compose.yml
Docker Compose yaml file
version: '3'
networks:
laravel:
services:
nginx:
build:
context: ./docker
dockerfile: nginx.dockerfile
@fer-ri
fer-ri / bmi.dart
Created September 25, 2020 03:55 — forked from roipeker/bmi.dart
BMI Calculator clone with GetX (+ Theme modes)
import 'dart:async';
import 'dart:math' as math;
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:get/get.dart';
@fer-ri
fer-ri / README.md
Created August 3, 2020 09:41 — forked from CodingDoug/README.md
Patterns for security with Firebase Authentication: offload work to Cloud Functions

This is the runnable sample code from the blog post [Patterns for security with Firebase Authentication: offload work to Cloud Functions][1]. It discusses offloading work from a client app to Cloud Functions using an authentication trigger.

  1. Create a new Firebase project
  2. Enable email/password authentication
  3. Provision Cloud Firestore and apply the rules given in this gist
  4. Use the Firebase CLI to create a workspace for Functions using TypeScript
  5. Deploy the given HTML and JavaScript to Firebase Hosting (the CLI emulator will also work).
  6. Deploy the function code to Cloud Functions using the Firebase CLI
@fer-ri
fer-ri / main.dart
Last active July 31, 2020 19:28
GetX Debug Template
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GetMaterialApp(
initialRoute: '/',
@fer-ri
fer-ri / fade_on_scroll.dart
Created July 29, 2020 02:57 — forked from smkhalsa/fade_on_scroll.dart
A Widget that automatically fades its child based on scroll position
import 'package:flutter/material.dart';
class FadeOnScroll extends StatefulWidget {
final ScrollController scrollController;
final double zeroOpacityOffset;
final double fullOpacityOffset;
final Widget child;
FadeOnScroll(
{Key key,