MCPcopy Index your code
hub / github.com/TomDoesTech/REST-API-Tutorial

github.com/TomDoesTech/REST-API-Tutorial @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
30 symbols 87 edges 21 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Build a REST API with Node.js, Mongoose & TypeScript

Note: This repository and video has been recreated - New repository: https://github.com/TomDoesTech/REST-API-Tutorial-Updated - New video: https://www.youtube.com/watch?v=BWUi6BS9T5Y

Article: https://tomanagle.medium.com/build-a-rest-api-with-node-js-typescript-mongodb-b6c898d70d61 Video: https://youtu.be/goUbHgAzPCs

Note: This repository includes the postman collection for the finished API

Who is this tutorial for?

  • Junior to mid-level developers
  • Anyone interested in building REST APIs with TypeScript

Why?

  • REST APIs are the staple of the web development industry
  • Knowing how REST APIs is important for both back and frontend developers
  • There's no better way to understand how they work than to build one

Concepts

  • REST API principals

    • CRUD
    • HTTP methods
    • What REST is and is not
  • JWT & refresh tokens

Technologies

  • Node.js
  • MongoDB with Mongoose
  • TypeScript
  • Express.js & Express.js middleware

Video structure

  1. What are we going to build
  2. Bootstrap application
  3. Build out registration
  4. Build out post CRUD operations

Let's keep in touch

Buy me a Coffee

Sign up to DigitalOcean 💖

Extension points exported contracts — how you extend this code

PostDocument (Interface)
(no doc)
src/model/post.model.ts
UserDocument (Interface)
(no doc)
src/model/user.model.ts
SessionDocument (Interface)
(no doc)
src/model/session.model.ts

Core symbols most depended-on inside this repo

decode
called by 3
src/utils/jwt.utils.ts
findPost
called by 3
src/service/post.service.ts
sign
called by 2
src/utils/jwt.utils.ts
createAccessToken
called by 2
src/service/session.service.ts
createPost
called by 1
src/service/post.service.ts
findAndUpdate
called by 1
src/service/post.service.ts
deletePost
called by 1
src/service/post.service.ts
createSession
called by 1
src/service/session.service.ts

Shape

Function 26
Interface 3
Method 1

Languages

TypeScript100%

Modules by API surface

src/service/session.service.ts5 symbols
src/service/post.service.ts4 symbols
src/controller/post.controller.ts4 symbols
src/service/user.service.ts3 symbols
src/controller/session.controller.ts3 symbols
src/utils/jwt.utils.ts2 symbols
src/model/user.model.ts2 symbols
src/model/session.model.ts1 symbols
src/model/post.model.ts1 symbols
src/middleware/validateRequest.ts1 symbols
src/middleware/requiresUser.ts1 symbols
src/middleware/deserializeUser.ts1 symbols

Datastores touched

PostCollection · 1 repos
SessionCollection · 1 repos
UserCollection · 1 repos
(mongodb)Database · 1 repos
rest-apiDatabase · 1 repos

For agents

$ claude mcp add REST-API-Tutorial \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page