Skip to content

feat: modernize codebase with Remix v2, SQLite, and CI updates#198

Merged
zainfathoni merged 39 commits intomainfrom
feature/database-migration
Jan 1, 2026
Merged

feat: modernize codebase with Remix v2, SQLite, and CI updates#198
zainfathoni merged 39 commits intomainfrom
feature/database-migration

Conversation

@zainfathoni
Copy link
Copy Markdown
Owner

@zainfathoni zainfathoni commented Dec 31, 2025

Summary

This PR modernizes the codebase with database migration tooling, framework upgrades, and CI pipeline fixes.

Changes

Database Migration (MySQL → SQLite)

  • Added complete migration guide (docs/database-migration.md)
  • Added MySQL to SQLite dump converter script
  • Added npm run prod for local testing with production data
  • Updated project documentation with SQLite workflow

Remix v1 → v2 Upgrade

  • Updated all Remix packages to v2
  • Migrated imports from remix to @remix-run/*
  • Replaced CatchBoundary with ErrorBoundary
  • Updated meta functions and navigation hooks to v2 format
  • Migrated routes to v2 flat routes convention
  • Removed legacy server.js, updated remix.config.js

CI Pipeline Modernization

  • Updated GitHub Actions: actions/cache, checkout, setup-node to v4
  • Updated codecov/codecov-action to v5, codeql-action to v3
  • Updated Node.js from 16.x to 24.x
  • Updated Prisma to 6.2.1 (OpenSSL 3.0 support)
  • Added prisma generate to build script for Vercel
  • Fixed Playwright system dependencies caching
  • Fixed TypeScript type errors for Remix v2 compatibility

Testing Migration (Jest → Vitest)

  • Migrated unit tests from Jest to Vitest
  • Updated test configuration and scripts

Bug Fixes

  • Fixed mobile sidebar Dialog state management
  • Fixed Vercel runtime error (Prisma Client not generated)

Testing

  • ✅ Local development: npm run dev
  • ✅ Production data locally: npm run prod
  • ✅ All CI checks passing

Next Steps

Production restoration (tracked separately):

  1. Deploy to Hetzner Cloud VPS
  2. Configure nginx + PM2
  3. Upload prod.db

- Create prod.db SQLite database with data from MySQL dumps
- Add convert-mysql-dumps.js script to convert MySQL dumps to SQLite format
- Add database migration documentation with complete process guide
- Update .gitignore to include prod.db
- Add npm scripts for running app with prod database
…QLite

This guide covers:
- Hetzner Cloud VPS setup and configuration
- Server initialization (Node.js, PM2, nginx, SSL)
- Required configuration files for Node.js/Remix deployment
- GitHub Actions CI/CD workflow for automated deployment
- Database backup and restoration procedures
- Monitoring, maintenance, and troubleshooting steps
- Cost breakdown (€5/month vs Vercel Pro €20/month)

Includes step-by-step instructions for:
- Initial VPS setup and security configuration
- Application deployment with zero-downtime reloads
- SSL certificate setup with Let's Encrypt
- Automated backups and database maintenance
- Deployment via GitHub Actions on push to main branch
Prevent accidental commits of production environment files with sensitive secrets
Add comprehensive CLAUDE.md file to provide AI assistants with project
context, architecture overview, common commands, and development practices.

Update test script in package.json to run standard tests locally.
- Initialize beads (bd) issue tracking system with database and git integration
- Move AGENTS.md content into CLAUDE.md under "Agent Instructions" section
- Add .gitattributes for beads merge driver configuration
- Update .markdownlint.json to exclude code blocks and tables from line-length rules
Auto-committed by bd doctor --fix
- Uncomment sync-branch setting to use "beads-sync" branch
- Enables proper multi-clone synchronization for beads issue tracking
kodiakhq[bot]
kodiakhq Bot previously approved these changes Dec 31, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 31, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
kelas Ready Ready Preview, Comment Jan 1, 2026 10:22am

kodiakhq[bot]
kodiakhq Bot previously approved these changes Dec 31, 2025
kodiakhq[bot]
kodiakhq Bot previously approved these changes Dec 31, 2025
GitHub deprecated actions/cache v1/v2.
Updated all 8 occurrences to v4.

Ref: https://github.blog/changelog/2024-12-05-notice-of-upcoming-
releases-and-breaking-changes-for-github-actions/
kodiakhq[bot]
kodiakhq Bot previously approved these changes Dec 31, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 16.60%. Comparing base (34ec1cb) to head (019fa87).

Files with missing lines Patch % Lines
app/models/course.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #198   +/-   ##
=======================================
  Coverage   16.60%   16.60%           
=======================================
  Files          73       73           
  Lines        1036     1036           
  Branches      363      364    +1     
=======================================
  Hits          172      172           
  Misses        862      862           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Add 'prisma generate' step to lint and type-check jobs
- Replace 'playwright install-deps' with 'playwright install --with-deps'
- Fix Playwright cache key patterns for consistency
- Rename all route files from folder-based to dot-based naming
- Rename index.tsx to _index.tsx for index routes
- Update relative imports to match new file structure
- Update test import from ~/routes to ~/routes/_index
- Add serverModuleFormat: 'cjs' to fix @heroicons/react ESM issue

Route examples:
- routes/index.tsx → routes/_index.tsx
- routes/dashboard/course.tsx → routes/dashboard.course.tsx
- routes/dashboard/course/$lessonId.tsx → routes/dashboard.course.$lessonId.tsx
kodiakhq[bot]
kodiakhq Bot previously approved these changes Jan 1, 2026
- Add Vitest globals to tsconfig.json for test type recognition
- Fix EntryContext import (moved from @remix-run/react to @remix-run/node)
- Add Serialized<T> utility type for JSON date serialization
- Update UIMatch type handling in breadcrumbs component
- Update component props to accept serialized types (Date → string)
- Update permission functions to accept serialized user/course types
- Fix email.server.test.ts to include required 'form' property
HeadlessUI Dialog had SSR hydration issues with Remix that caused the
mobile sidebar to not render when clicking the "Open sidebar" button.
The FocusTrap warning indicated the Dialog was mounting but content
wasn't rendering properly.

Changes:
- Replace HeadlessUI Dialog/Transition with native div implementation
- Use pointer-events to control click behavior on overlay vs panel
- Update E2E test to use getByRole for better element targeting

Closes: rb-b8v.11
kodiakhq[bot]
kodiakhq Bot previously approved these changes Jan 1, 2026
Vercel caches node_modules which leads to outdated Prisma Client.
Adding prisma generate to the build script ensures the client is
regenerated on each deployment.
kodiakhq[bot]
kodiakhq Bot previously approved these changes Jan 1, 2026
When Playwright cache has exact hit, 'playwright install --with-deps'
is skipped but system libraries (libwoff2dec.so etc) are not in cache.
Adding 'playwright install-deps' step on cache hit ensures WebKit
dependencies are always available.
kodiakhq[bot]
kodiakhq Bot previously approved these changes Jan 1, 2026
- actions/checkout: v2 → v4
- actions/setup-node: v2 → v4
- codecov/codecov-action: v2 → v5
- github/codeql-action/*: v1 → v3
kodiakhq[bot]
kodiakhq Bot previously approved these changes Jan 1, 2026
@zainfathoni zainfathoni changed the title docs: add database migration documentation and SQLite support feat: modernize codebase with Remix v2, SQLite, and CI updates Jan 1, 2026
@zainfathoni zainfathoni merged commit 2848209 into main Jan 1, 2026
8 checks passed
@zainfathoni zainfathoni deleted the feature/database-migration branch January 1, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant