Skip to content

Latest commit

 

History

History
 
 

README.md

Backend · Stellar Smart Wallet Demo

This is the backend service for the Stellar Smart Wallet Demo. It provides REST APIs to support user operations and blockchain interactions via Stellar and Soroban.


🔍 Description

The backend is a modular, versioned Node.js application built with TypeScript. It handles routing, input validation, logging, and third-party integrations using clean, scalable architectural principles. Each API context (e.g., /auth, /wallet) is versioned and encapsulated for maintainability.


🧰 Stack

This project leverages the following core technologies:

  • Node.js – Runtime environment
  • TypeScript – Type-safe language
  • PostgreSQL – Relational database
  • TypeORM – TypeScript ORM
  • Express – Fast, unopinionated web framework
  • PostgreSQL – Relational database
  • TypeORM – TypeScript ORM with auto-sync capabilities
  • Zod – Schema-based validation
  • Pino – High-performance JSON logger
  • Vitest – Unit and integration testing framework

📁 Project Structure

.
├── src/                   # Main application folder
│  ├── app.ts              # Application entrypoint
│
│  ├── api/                # Main RestAPI folder
│  │  ├── core/            # Core components
│  │  │  ├── docs.ts
│  │  │  ├── routes.ts
│  │  │  ├── constants/       # Shared constants/variables
│  │  │  ├── entities/        # Shared entities
│  │  │  ├── services/        # Shared services
│  │  │  ├── framework/       # Core types/classes
│  │  │  ├── migrations/      # Database migrations
│  │  │  ├── helpers/         # Shared business logic
│  │  │  ├── interfaces/      # Third-party integration interfaces
│  │  │  ├── middlewares/     # Express middlewares
│  │  │  └── utils/           # Generic utilities
│  │
│  │  ├── <context>/       # API context (e.g. auth, wallet)
│  │  │  ├── v1/           # Versioned implementation
│  │  │  │  ├── */use-cases   # Endpoint/use-case logic
│  │  │  │  └── */routes      # Endpoint registration
│  │  │  ├── v2/
│  │  │  ├── v*/            # Future versions
│  │  │  ├── docs.ts        # Swagger definition for the context
│  │  │  └── routes.ts      # Context route loader
│
├── interfaces/            # Technical interfaces (non-REST)
├── config/                # Application-wide configs
│  ├── axios-logger        # Axios logging setup
│  ├── logger              # Pino logger configuration
└── errors/                # Custom exceptions