ekurt 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/about.md +1 -1
- package/data/posts.json +11 -0
- package/data/projects.json +12 -0
- package/package.json +1 -1
package/data/about.md
CHANGED
|
@@ -2,7 +2,7 @@ Hi, I'm Emre — a full-stack developer based in Antalya, Turkey.
|
|
|
2
2
|
|
|
3
3
|
I build fast, accessible and carefully crafted interfaces with **React**, **Next.js** and **TypeScript**. I like the part of the job where a product stops being "working" and starts feeling *right*: the motion, the spacing, the keyboard support, the details most people never notice but always feel.
|
|
4
4
|
|
|
5
|
-
This site is a small operating system I made for it. Every folder, file and app here is real — open them, drag them around, break things.
|
|
5
|
+
This site is a small operating system I made for it. Every folder, file and app here is real — open them, drag them around, break things. It even runs in your own terminal: `npx ekurt`.
|
|
6
6
|
|
|
7
7
|
When I'm not building products, I write. The **Blog** holds a series of short, hands-on lessons on Git, JavaScript, React and Next.js, written for people who are just getting started.
|
|
8
8
|
|
package/data/posts.json
CHANGED
|
@@ -483,6 +483,17 @@
|
|
|
483
483
|
"readingMinutes": 2,
|
|
484
484
|
"body": "Next.js allows you to build **backend functionality** directly inside your application using **API Routes**. \nIn this lesson, you will learn how API Routes work in the App Router and how to create simple backend endpoints without setting up a separate server.\n\n## What Are API Routes?\n\nAPI Routes are server-side functions that handle HTTP requests and return responses, usually in JSON format.\n\nThey are commonly used for:\n\n- Fetching data \n- Handling form submissions \n- Authentication logic \n- Server-side validation \n- Acting as a backend for frontend components \n\nAPI Routes make Next.js a **fullstack framework**.\n\n---\n\n## API Routes in the App Router\n\nIn the App Router, API Routes are defined using **route.js** files.\n\nFile location pattern:\n\n```text\napp/api/route.js\n```\n\nEach route.js file represents an API endpoint.\n\n---\n\n## Creating a Basic API Route\n\nExample folder structure:\n\n```text\napp/api/hello/route.js\n```\n\nBasic GET handler:\n\n```js\nexport async function GET() {\n return new Response(\n JSON.stringify({ message: \"Hello from API\" }),\n {\n headers: { \"Content-Type\": \"application/json\" }\n }\n );\n}\n```\n\nThis endpoint is available at:\n\n- `/api/hello`\n\n---\n\n## Handling HTTP Methods\n\nAPI Routes can handle different HTTP methods.\n\nExample:\n\n```js\nexport async function POST(request) {\n const body = await request.json();\n\n return new Response(\n JSON.stringify({ received: body }),\n { status: 201 }\n );\n}\n```\n\nSupported methods include:\n\n- GET \n- POST \n- PUT \n- PATCH \n- DELETE \n\n---\n\n## Returning JSON Responses\n\nResponses should be returned using the **Response** object.\n\n```js\nreturn new Response(\n JSON.stringify({ success: true }),\n {\n status: 200,\n headers: { \"Content-Type\": \"application/json\" }\n }\n);\n```\n\nAlways set appropriate status codes and headers.\n\n---\n\n## Accessing Query Parameters\n\nQuery parameters can be accessed via the request URL.\n\n```js\nexport async function GET(request) {\n const { searchParams } = new URL(request.url);\n const name = searchParams.get(\"name\");\n\n return new Response(\n JSON.stringify({ name }),\n { status: 200 }\n );\n}\n```\n\nExample request:\n\n- `/api/hello?name=Emre`\n\n---\n\n## Dynamic API Routes\n\nDynamic segments work the same as page routing.\n\nExample structure:\n\n```text\napp/api/posts/[id]/route.js\n```\n\nAccessing params:\n\n```js\nexport async function GET(request, { params }) {\n return new Response(\n JSON.stringify({ id: params.id }),\n { status: 200 }\n );\n}\n```\n\nThis allows building REST-like APIs.\n\n---\n\n## Calling API Routes from the Frontend\n\nAPI Routes can be called using fetch.\n\n```js\nfetch(\"/api/hello\")\n .then(res => res.json())\n .then(data => console.log(data));\n```\n\nThis keeps frontend and backend tightly integrated.\n\n---\n\n## API Routes and Security\n\nImportant security considerations:\n\n- Validate incoming data \n- Never expose secrets \n- Use server-side checks \n- Protect sensitive endpoints \n\nAPI Routes run only on the server.\n\n---\n\n## Common API Route Mistakes\n\nAvoid these mistakes:\n\n- Writing heavy business logic without structure \n- Returning plain objects instead of Response \n- Forgetting HTTP status codes \n- Exposing private environment variables \n\nTreat API Routes like a real backend.\n\n---\n\n## Summary\n\nIn this lesson, you learned:\n\n- What API Routes are \n- How to create API endpoints \n- Handling HTTP methods \n- Returning JSON responses \n- Using query parameters \n- Dynamic API routes \n- Calling APIs from the frontend \n- Security best practices \n\nIn the next and final lesson, we will **build a small Next.js project** that combines routing, data fetching, SEO, styling, and API routes into a single application.\n\n---\n"
|
|
485
485
|
},
|
|
486
|
+
{
|
|
487
|
+
"slug": "ekurt-in-your-terminal",
|
|
488
|
+
"title": "ekurt.dev, Now in Your Terminal",
|
|
489
|
+
"lesson": null,
|
|
490
|
+
"series": "notes",
|
|
491
|
+
"shortTitle": "ekurt.dev, Now in Your Terminal",
|
|
492
|
+
"description": "The Terminal app on this site was always a small shell over real content. Now it runs in yours too — npx ekurt — and a real terminal turned out to be good at more than I expected.",
|
|
493
|
+
"date": "2026-12-01",
|
|
494
|
+
"readingMinutes": 4,
|
|
495
|
+
"body": "This site has a Terminal app. Open it and you get `ekurtsh`, a little shell over the site's real content: `ls` the projects, `cat about-me.md`, `play bugsweeper`. It was always the most \"me\" corner of the OS, so the obvious next step was to let it leave the browser.\n\n```bash\nnpx ekurt\n```\n\nThat's the whole install. With Node.js 22 or newer, it boots the way this site does — the e_ mark, a progress bar, skip it with any key — and leaves you at a prompt:\n\n```text\nvisitor@ekurt ~ % ls\nblog/\nprojects/\nabout-me.md\nbookmarks.txt\ncv.pdf\n```\n\nSame files, same commands, same colours. This post is about what changed on the way, and the parts that took longer than they should have.\n\n## One source of truth\n\nThe CLI doesn't have its own copy of anything I would have to keep up to date by hand. A sync script reads this site's repository — the posts, the projects, the about text, the bookmarks — and applies the same rules the site does: drafts stay out, a title like `REACT106 - …` puts a post in the React series, project covers are lifted out of the text. Run it, publish a new version, and both shells say the same thing.\n\nThe only hand-written pieces are the CV and an about text reworded for a terminal. \"Drag the windows around\" reads oddly when there are no windows.\n\n## What a real terminal adds\n\nIn the browser, `cat` on a blog post shows a summary and a link: the window next to it is a much better reader. In a terminal there is no window next to it, so the CLI does the job itself. `cat` renders whole posts and project pages from markdown: wrapped to the width of your terminal, with lists, tables and highlighted code. At the end of every lesson it tells you which file comes next, so you can work through a whole series without leaving the prompt.\n\nA few things only make sense there:\n\n- **`cv`** prints the résumé, and `npx ekurt --export md` writes it to a file.\n- **`search`** looks through projects, posts and bookmarks at once.\n- **Every command works on its own.** `npx ekurt cat about-me.md` prints the page and exits, and the output pipes cleanly into whatever you like.\n- **`contact`** is the Mail app as a prompt: name, email, a few lines of message, send. It goes through the same endpoint as the form on this site.\n\n## Games on the alternate screen\n\nBugsweeper and Memory from the Arcade play right in the terminal, with the arrow keys. The rules are the exact same module as on the site; only the drawing is new. Cells are three characters wide, because terminal cells are roughly twice as tall as they are wide, and three characters make a cell look square.\n\nThey run on the terminal's *alternate screen*, the same trick `vim` and `less` use. Quit a game and your scrollback is exactly as you left it. The tricky part is handing the keyboard over. The shell reads lines with Node's `readline`, and merely pausing it isn't enough: it would still see every keypress, and arrow keys meant for the game would end up in the prompt's history. So the shell steps aside completely. Its input closes while a game runs, and a fresh one with the same history takes over when it ends.\n\nThe first version also had the board drifting sideways whenever the status line below it changed length, because everything was centred on the widest line. Now it is centred on the board itself, and the text can do what it likes.\n\n## The small things\n\n- **Ctrl+C behaves like a shell.** It prints `^C`, drops the line, and gives you a fresh prompt. Inside the contact form it discards the message instead.\n- **Tab completes** commands, then files and options. `cd b` and Tab gives you `blog/`.\n- **Typos get a suggestion.** Type `about-me.md` on its own and the shell asks if you meant `cat about-me.md`.\n- **Links are clickable** in terminals that support it; everywhere else they stay plain text instead of turning into escape-code soup.\n- **`panic` still works.** You'll see.\n\n## Publishing it\n\nThis was my first package on npm, and the last step held a surprise. Publishing needs two-factor authentication now, and right after a successful publish, the registry showed a placeholder called `0.0.0-stage` instead of my package. It turns out npm processes a new package for a few minutes before it goes live. It was there five minutes later, and nothing had gone wrong; I just looked too early.\n\nIf you have a terminal open, give it a try:\n\n```bash\nnpx ekurt\n```\n\nAnd if you're reading this in the Terminal app here, type `install` — it will tell you the same thing.\n"
|
|
496
|
+
},
|
|
486
497
|
{
|
|
487
498
|
"slug": "building-ekurtos",
|
|
488
499
|
"title": "Building ekurtOS",
|
package/data/projects.json
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"slug": "ekurt-cli",
|
|
4
|
+
"title": "ekurtsh — ekurt.dev in your terminal",
|
|
5
|
+
"description": "The terminal from this site as a real command-line app. One command, nothing to install — read the posts, browse the projects, see the CV and play Bugsweeper right in your own terminal.",
|
|
6
|
+
"date": "2026-12-01",
|
|
7
|
+
"url": "https://www.npmjs.com/package/ekurt",
|
|
8
|
+
"repository": null,
|
|
9
|
+
"category": "apps",
|
|
10
|
+
"badge": null,
|
|
11
|
+
"support": false,
|
|
12
|
+
"body": "### One command\n\n```bash\nnpx ekurt\n```\n\nThat's all it takes, with Node.js 22 or newer. It boots like this site does — the e_ mark, a progress bar — and drops you at a prompt. Same shell as the Terminal app here: the same folders and files, the same commands, the same colours.\n\n### What a real terminal adds\n\n- **Whole documents.** `cat` prints every blog post and project page in full, with highlighted code, tables, and the previous and next lesson of a series.\n- **The CV** with `cv`, or as a file with `npx ekurt --export md`.\n- **Search** across projects, posts and bookmarks.\n- **Bugsweeper and Memory** from the Arcade, playable with the arrow keys.\n- **A contact form** that reaches me the same way the Mail app does.\n- Tab completion, history, Ctrl+C and Ctrl+L, and a few easter eggs.\n\nEvery command also works on its own, so `npx ekurt cat about-me.md` prints a page and exits — and the output pipes cleanly.\n\n### Details\n\n- The content is copied from this site's own files by a sync script, so both shells always say the same thing.\n- Text wraps to your terminal's width; links are clickable in terminals that support it.\n- Games and the start-up screen run on the alternate screen, so your scrollback stays untouched.\n\n### Built with\n\nTypeScript and Node.js, with readline for the shell, chalk for colour and a small markdown renderer of its own. Tested with Vitest.\n"
|
|
13
|
+
},
|
|
2
14
|
{
|
|
3
15
|
"slug": "breathe",
|
|
4
16
|
"title": "Breathe",
|