Copy. Customize. Ship.

Proven snippets.Ready for your workflow.

Start from practical code for contests, frontend, backend, mobile, databases, and tests. Customize any snippet for your IDE.

IDE setup guides

Snippet library

Useful code, ready to adapt

Copy source directly or open it in generator for your IDE.

C++ contest starter

Fast I/O, test cases, and a clean solve function.

Customize

Binary search

Reusable lower-bound style binary search template.

Customize

React component

Typed functional component with props and accessible structure.

Customize

Async data hook

Small React hook with loading, data, and error states.

Customize

Express API route

Async route with validation-ready error forwarding.

Customize

Next.js route handler

App Router endpoint with safe error response.

Customize

React Native screen

Safe-area screen with typed styles and starter layout.

Customize

Flutter screen

Stateless screen scaffold with theme-aware text.

Customize

SQL transaction

Safe transaction skeleton with rollback guidance.

Customize

Vitest unit test

Arrange–act–assert test structure with typed imports.

Customize

Breadth-first search

Graph BFS with distance tracking from a chosen source.

Customize

Disjoint set union

Union-find with path compression and union by size.

Customize

Dijkstra shortest paths

Priority-queue shortest paths for non-negative edge weights.

Customize

Controlled React form

Typed form state with submit handling and accessible labels.

Customize

Debounced value hook

Reusable hook that delays rapidly changing values.

Customize

React error boundary

Class boundary with typed fallback UI and reset support.

Customize

Express auth middleware

Bearer-token middleware with early unauthorized responses.

Customize

Express error handler

Central error middleware with safe production responses.

Customize

Pagination parameters

Validated page and limit values with database-ready offset.

Customize

React Native storage hook

AsyncStorage-backed state with loading and persistence.

Customize

React Native list

Typed FlatList with stable keys and empty-state content.

Customize

Flutter stateful screen

Stateful screen with mounted-safe asynchronous updates.

Customize

PostgreSQL upsert

Insert-or-update statement that returns the saved row.

Customize

Keyset pagination

Stable cursor pagination without large OFFSET scans.

Customize

Create table migration

PostgreSQL table with timestamps, constraints, and index.

Customize

Playwright browser test

Page test with semantic locators and URL assertion.

Customize

React component test

Testing Library test driven through accessible user actions.

Customize

Async service test

Mocked dependency test for successful async service output.

Customize