Skip to content

v2.0

Latest

Choose a tag to compare

@cojocaru-david cojocaru-david released this 13 Sep 11:21
· 6 commits to master since this release

πŸ—ƒοΈ Snippets Library – Changelog

All notable changes to Snippets Library will be documented in this file.
This follows a modern, developer-friendly format highlighting major improvements, new features, and fixes.


[v2.0] – πŸš€ Major Update

Release Date: 13.09.2025

✨ New Features

  • Next.js 15 App Router integration for a modern full-stack architecture.
  • Drizzle ORM for Postgres with typed JSONB settings for users and snippets.
  • NextAuth + GitHub OAuth authentication with a Drizzle adapter.
  • Shiki-based syntax highlighting with server-side caching for high-quality render.
  • Automatic/assisted language detection (highlight.js on server + client library detector).
  • Public snippet sharing with secure share IDs, view counting, and like/bookmark functionality.
  • User settings persisted (code theme, preferences, etc.).
  • Dashboard enhancements:
    • Count of snippets, views, likes, bookmarks.
    • Modern responsive UI for snippet management.

πŸ›  Improvements

  • Migrated from Bun + Hono backend to Next.js full-stack for better ecosystem support.
  • Refactored API routes for:
    • /api/snippets CRUD operations
    • /api/snippets/share/:shareId for public actions (view, like, copy)
    • /api/settings and /api/settings/public-seo endpoints
  • Improved security helpers:
    • Secure share ID generation (24-char custom nanoid)
    • IP hashing for view deduplication
    • Session attachment of user.id and minimal settings
  • ESLint & Prettier configured for better code quality and consistency.
  • Simplified environment setup and deployment instructions.

πŸ–₯ Frontend Updates

  • Transitioned from Vite + Hono frontend to Next.js + React 19 + TypeScript
  • Tailwind CSS for clean utility-based styling.
  • Responsive, modern landing pages and snippet views.
  • Better snippet management UI:
    • Instant search
    • Bookmarking
    • Like/unlike
    • Public share links

⚑ Backend Updates

  • Next.js API routes replace custom Bun/Hono endpoints.
  • Shiki server-side code highlighting replaces previous Vite frontend logic.
  • Lightweight language detection API using highlight.js.
  • All database interactions now use Drizzle ORM with migrations (drizzle-kit).

πŸ”§ Fixes & Misc

  • Standardized JSON error responses for API endpoints.
  • Default user settings are now attached on first sign-in.
  • Improved session management and security.
  • Cleaned up legacy Vite/Hono scripts and reorganized project structure.
  • Updated README with full setup and dev instructions.

[v1.x] – πŸ—οΈ Initial Bun + Hono Implementation

Release Date: 30.07.2025

  • Frontend: React + TypeScript + Vite + Tailwind CSS + shadcn/ui
  • Backend: Bun + Hono + Drizzle ORM + PostgreSQL
  • Authentication: GitHub OAuth + JWT
  • Snippet Management: CRUD operations, public/private flags, share links
  • Code Highlighting: Basic Shiki integration, 20+ languages
  • Development Tools: ESLint, Prettier, Drizzle-kit migrations
  • Deployment: Cloudflare Workers + GitHub Actions CI/CD

πŸ“Œ Notes

  • v2 introduces breaking changes due to migration to Next.js App Router.
  • Make sure to run npm run migrate after updating to v2 for database schema updates.
  • All old environment variables are updated; see .env.example for new names (AUTH_SECRET, NEXT_PUBLIC_APP_URL, etc.).

Built with ❀️ by developers, for developers