prashant.dev
Back to Portfolio Overview
Backend Architecture Deep-Dive

Full Stack Text Editor

Node.js, Express.js, React, and MongoDB full-stack application for managing structured documents.

Node.jsExpress.jsReactMongoDBJavaScriptREST APIs

Project Overview

A full-stack text editor application allowing users to compose, manage, tag, and persist text documents in real-time. Built with a decoupled Node.js/Express REST backend server and a responsive React client.

Key Features & Technical Implementations

REST APIs for seamless client-server data synchronization
Full CRUD operations for multi-document creation, editing, and deletion
Document Management with tag filtering and search indexes
MongoDB Integration with Mongoose ODM schemas
Strict Client & Server Validation for data sanity
Responsive user interface built with React

Backend System Architecture Diagram

Interactive Blueprint
Layer 01
React Client UI
Document Editor Frontend
React & Axios
Layer 02
Express REST Server
API Controller & Middleware
Node.js & Express
Layer 03
Data Validator Layer
Input Sanitization
Joi / Express Validator
Layer 04
Database ODM
Object Data Modeling
Mongoose ODM
Layer 05
MongoDB Instance
Document Store Database
MongoDB Atlas

Execution & Data Lifecycle Flow

1. User types in React text editor frontend with auto-save debounce timer.
2. React client sends HTTP PUT payload to Express endpoint /api/documents/:id.
3. Express validation middleware checks document format and character caps.
4. Controller calls Mongoose model method findByIdAndUpdate with atomic operator.
5. Updated document object is persisted in MongoDB and updated timestamp is returned to client.

API Documentation & cURL Playground

OpenAPI Spec
Endpoints (2)
GET/api/v1/documents

Fetch all user documents with metadata and tags.

cURL Request
curl -X GET "https://api.example.com/api/v1/documents" \
  -H "Accept: application/json"
Response (200 OK - JSON)
{
  "success": true,
  "count": 2,
  "documents": [
    {
      "_id": "60d5ec49f1b2c548b0a1d9e2",
      "title": "System Architecture Notes",
      "tags": ["backend", "fastapi"],
      "updatedAt": "2026-07-24T14:20:00Z"
    }
  ]
}

System Outputs & Live Terminal Gallery

Visual Evidence
pytest --verbose
100% PASSED

✓ tests/test_auth.py::test_login_success PASSED

✓ tests/test_tasks.py::test_create_task PASSED

✓ tests/test_tasks.py::test_task_idor_isolation PASSED

✓ tests/test_queries.py::test_filter_and_sort_tasks PASSED

----------------------------------------

32 passed in 1.48s

Swagger UI Docs SchemaOpenAPI 3.0.2
Auto-generated Interactive OpenAPI Documentation
Strict Pydantic JSON Schema Export
CORS Configured with Rate Limiting

Challenges Faced & Engineering Solutions

01.Handling asynchronous auto-save debouncing from client React UI to prevent flooding the backend REST API.
02.Structuring Mongoose indexes to ensure rapid text queries across large volumes of document content.
03.Implementing clean CORS policy and environment-aware API baseline configuration.

Key Engineering Takeaways

01.Mastered building Express middleware pipelines for request logging, auth verification, and central error handling.
02.Gained hands-on experience in Mongoose schema design, indexes, and aggregation pipelines.
03.Understanding full-stack data contracts and state management synchronization.