Aller au contenu principal

Backend API (BaldrTs)

Introduction

Baldr is a Content Management System (CMS) for showcase websites, allowing you to instantiate pre-built modules to meet a wide range of client needs as comprehensively as possible.

The backend is built with Node.js, Express, TypeScript, and MongoDB, providing a robust, scalable API for managing multi-tenant applications.

Key Features

  • Multi-Tenant Architecture: Support for multiple tenants with complete data isolation
  • Modular System: Extensible module-based architecture
  • RESTful API: Comprehensive REST API for all operations
  • Authentication & Authorization: Role-based access control (RBAC)
  • File Management: Advanced file upload and management system
  • Caching: Redis-based caching for optimal performance
  • Model Context Protocol (MCP): AI integration support
  • Structured Data: Built-in support for SEO-optimized structured data
  • Comprehensive Testing: Unit and integration tests

Documentation Sections

Core Architecture

API Documentation

Multi-Tenant System

Development Guides

Features & Systems

Data & Storage

AI & Integration

Security & Infrastructure

Migrations & Summaries

Getting Started

  1. Install dependencies: npm install
  2. Configure MongoDB connection in .env
  3. Set up environment variables (see .env.example)
  4. Start development server: npm run dev
  5. Run tests: npm test

Tech Stack

  • Node.js & Express: Server framework
  • TypeScript: Type-safe development
  • MongoDB: Database with Mongoose ODM
  • Redis: Caching layer
  • Jest: Testing framework
  • JWT: Authentication
  • Multer: File uploads

API Structure

src/
├── controllers/ # Request handlers
├── models/ # MongoDB models
├── routes/ # API routes
├── services/ # Business logic
├── middlewares/ # Express middlewares
├── validations/ # Request validation
├── utils/ # Utility functions
├── configs/ # Configuration files
└── tests/ # Test files