EraCode practice
Browse community-shared practice across technologies. These pages are teasers only — skill maintenance still happens when you attempt the full challenge inside EraCode.
Security/validation micro-practice: prevent mass-assignment by rejecting requests that include properties not defined in your DTO.
You’ll answer one advanced conceptual question about numeric validation in NestJS, then fill a single missing piece in a custom pipe that parses a route param into a finite number with bounds.
Practice iterating over a dataset to prebuild dynamic routes in the Next.js App Router using generateStaticParams.
Quick daily practice on testing Next.js client components: mock the App Router navigation hook so you can assert route changes without a real browser.
Quick practice on handling async side effects safely by making a request cancellable with AbortController.
Quick check on ES module import shapes in a React codebase: identify correct import usage and patch a single broken import so the app renders.
Practice Flask context-based dependency injection by attaching a request-scoped service to the application context and retrieving it inside a route.
Practice a small but meaningful accessibility improvement in a Next.js App Router layout: add an aria-live announcement so screen reader users get feedback when navigation completes.
Return an HTML page from a **Cloudflare Worker** where a `<style>` tag is allowed by CSP without using `unsafe-inline`. - Generate a per-request nonce and apply it to the `<style>` tag. - Set a `Content-Security-Policy` header that allows only that nonce for `style-src`. - Keep everything else simple (just return the HTML + headers).
Implement **one data-structure update** in a Cloudflare **Durable Object**. - Store a **set of unique visitor IDs** for a given day in Durable Object storage. - When a visitor ID is recorded, it should be added only once (idempotent). - Return the updated **unique count** for that day.
Practice a common SQL idiom for picking the latest record per group using a window function, plus a quick concept check about trade-offs.
Quick practice on Python data structures: understand heap behavior and implement a small top-K selection using a heap.
Practice a Flask idiom: keeping error handling scoped to a Blueprint instead of global app-wide handlers.
Quick practice on JavaScript data structures: using Map for frequency counting, plus a short concept check.
Quick practice on Next.js navigation: keep existing query params when routing to a new path.
Practice composing object shapes in TypeScript using structural typing. One quiz + one tiny coding gap.
Quick Zod practice on environment/config parsing: interpret env strings safely and provide a sensible default.
Practice a focused Next.js modules/imports skill: using a TypeScript path alias to avoid brittle relative imports.
Practice an optimization pattern in Express: let clients reuse cached responses by supporting conditional GETs with ETags.
Practice a small routing/navigational pattern: choosing the right handler for a URL path using a compiled route table.
Practice using SQL module-like organization via schemas by calling a function from a different schema safely and explicitly.
Practice PostgreSQL conditional logic by classifying rows into a small set of status labels using CASE, and sanity-checking the results with simple queries.
Practice Tailwind CSS accessibility by applying a keyboard-only focus indicator using the `focus-visible` variant—without adding noisy focus styles for mouse users.
Practice Git file I/O hygiene by marking a tracked or untracked build artifact as locally ignored using Git’s index/info exclude mechanism.