📄️ Overview
The Tower Defense backend is a NestJS application (apps/api). It handles authentication, account management, and data persistence for the game.
📄️ Authentication
This page explains how the authentication system works, why certain design decisions exist, and how the confirmation-token flows protect sensitive account changes.
📄️ Endpoints
Base URL in local development//localhost:3000
📄️ Database
The API persists data in MySQL through Drizzle ORM (libs/api/db).
📄️ Configuration
All variables are read from .env in the Nx workspace root. Load order: dotenv/config in main.ts runs first.
📄️ Mail Service
MailService (libs/api/mail/src/lib/mail.service.ts) sends all transactional emails via Nodemailer.