Skip to main content

Personal Project

2023 Live

Blog API Server

Bootcamp Project · M-Knows Consulting

A TypeScript-based REST API for a blog platform with JWT authentication, input validation, PostgreSQL integration, email notifications, logging, and Postman/Swagger API documentation.

Node.js Express TypeScript Sequelize PostgreSQL JWT Validation Logging Email Notification Postman Documentation

Overview

A production-structured REST API for a blog platform, built during the M-Knows Consulting Backend API Development Bootcamp in 2023. Implements full CRUD, authentication, email notification, and API documentation.

Blog API Server project card showing the REST API for a blog platform built with Node.js, Express, and TypeScript
Blog API Server — Vercel deployment

Context

Bootcamp project at M-Knows Consulting — Backend API Development program. Role: Backend Developer. Year: 2023.

Responsibilities

  • Designed and implemented an MVC architecture with Node.js, Express, and TypeScript.
  • Integrated Sequelize ORM with PostgreSQL for relational data management.
  • Built JWT-based authentication (register, login, token refresh, protected routes).
  • Implemented input validation and structured error handling.
  • Integrated email notification using a third-party email service (Nodemailer).
  • Set up structured logging with Winston.
  • Produced API documentation using Postman and a swagger.yaml specification.

Architecture

Three-layer MVC: controllers handle HTTP routing, services contain business logic, and models map to PostgreSQL via Sequelize. Authentication middleware guards protected routes, and logging middleware captures request/response metadata.

Blog API Server — MVC ArchitectureExpress Routes (HTTP entry points)Controllers · Auth Middleware · ValidationServices (Business Logic)Sequelize ORM ModelsPostgreSQL DatabaseEmail (Nodemailer)Winston LoggingNode.js · Express · TypeScript · Sequelize · PostgreSQL · JWT · Winston · Nodemailer
Three-layer MVC architecture with cross-cutting email and logging concerns
Three-layer MVC architecture with cross-cutting email and logging concerns

Key Engineering Decisions

  • Chose a layered MVC split so routing, business logic, and data access stay independently testable.
  • Used JWT with refresh tokens to keep the API stateless while supporting longer sessions.
  • Centralised validation and error handling so endpoints return consistent error shapes.
GET /v1/articles — live response
{
  "code": 200,
  "status": "OK",
  "message": "Get Articles Success",
  "data": [],
  "meta": {
    "current_page": 1,
    "size_page": 0,
    "max_page": 0,
    "total_data": 0
  }
}
Live GET /v1/articles — consistent JSON envelope: code, status, message, data, meta

Technology Stack

Node.js · Express · TypeScript · Sequelize · PostgreSQL · JWT · Validation · Logging · Email Notification · Postman Documentation · Swagger / OpenAPI