MODULE_05B Track Bintermediate

Separate Backend API

Express/Fastify REST API

Build a standalone REST API backend consumed by your Next.js frontend. Industry-standard architecture.

11Units
2Projects
2Interactive
45-50hEst. Time
REST API DesignExpress/FastifyJWT AuthenticationAPI Security

UNITS

11 LESSONS
01
theory2h

REST API Design

// ...

RESTful principles

ResourcesHTTP methodsStatus codes
02
hands-on3h

Express/Fastify Setup

// ...

Backend framework basics

Project structureMiddlewareRouter
03
hands-on3h

Routing & Middleware

// ...

Request pipeline

Route organizationCustom middlewareError handling
04
hands-on2h

Request Validation

// ...

Input validation with Zod

Schema validationError messagesType safety
05
hands-on3h

Pagination & Filtering

// ...

Scalable data endpoints

Cursor paginationQuery filteringSorting
06
theory2h

Session vs JWT Auth

// ...

Authentication strategies

Token typesStorage optionsSecurity trade-offs
07
hands-on4h

Implementing JWT Auth

// ...

Token-based auth

JWT creationRefresh tokensProtected routes
08
hands-on3h

API Security Baseline

// ...

Security essentials

CORSRate limitingInput sanitization
09
hands-on2h

OpenAPI Documentation

// ...

Swagger/OpenAPI

Schema generationInteractive docsClient generation
10
hands-on3h

API Testing

// ...

Testing with Supertest

Integration testsAuth testingCoverage
11
hands-on4h

Frontend Integration

// ...

Connect Next.js to API

API clientAuth flowError handling

PROJECTS

2 BUILDS

E-Commerce API

18h

Products, cart, orders with OpenAPI

RESTExpressTesting

REQUIREMENTS

  • Product CRUD
  • Cart management
  • Order flow
  • Swagger docs

Next.js Storefront

12h

Frontend consuming the API

IntegrationAuthState

REQUIREMENTS

  • Product listing
  • Cart UI
  • Checkout flow
  • User auth

INTERACTIVE

2 TOOLS

REST Endpoint Builder

Visual API designer

20 min

JWT Debugger

Token decode/verify tool

10 min