Skip to Content

Glossary

Short definitions for words you’ll see in code comments and docs.

HTTP & API

HTTP — How browsers and apps talk to servers. Common “verbs”:

  • GET — “Give me data” (read)
  • POST — “Here’s new data, do something” (create / action)
  • PUT / PATCH — “Change existing data”
  • DELETE — “Remove”

API — A list of URLs the backend exposes. Example: POST /api/v1/auth/google.

JSON — Text format for data: { "name": "Ada", "score": 42 }. Almost all our responses are JSON.

Route — One URL pattern + method handled in code, usually in src/routes/*.ts.

Middleware — Code that runs before your route handler (auth check, admin check).

CORS — Browser safety rule. Our index.ts whitelists which websites may call the API from JavaScript.

Auth

JWT (access token) — Short-lived signed pass proving “I am user X”. Sent as
Authorization: Bearer <token>.

Refresh token — Longer-lived secret stored in DB; used to get a new access token without Google login again.

OAuth / Google sign-in — User signs in with Google; we verify their Google token and create/find our User row.

Data

MongoDB — Database storing documents (JSON-like objects).

Mongoose — Library mapping JS classes (“models”) to MongoDB collections.

Model — File in models/ defining fields + indexes for one collection.

Index — DB speed trick + sometimes uniqueness (“one card per user per question”).

Learning product terms

PYQ — Previous Year Question (exam-style practice bank).

SRS — Spaced Repetition System; schedules when to review a card again based on how well you remembered.

Current affairs (CA) — Daily news-style study content, MCQs, bookmarks, revision queues.

DTO — Data Transfer Object; safe JSON shape sent to clients (often in utils/dto.ts).

Code tools

TypeScript — JavaScript + types at compile time. Catches typos before runtime.

Zod — Library in validators/ to validate request bodies.

Hono — Small, fast web framework (like Express, but lighter). new Hono() builds the app.

Vitest — Test runner; tests live in src/__tests__/ and *.test.ts files.

Last updated on