# SWDBD401 Backend Application Development - [SWDBD401 Backend Application Development](https://docs.loremstock.com/index.md): Complete teaching summary for SWDBD401. Covers all 4 learning outcomes — RESTful APIs, security, testing, and deployment with Node.js and Express. - [Course Orientation and Setup Checklist](https://docs.loremstock.com/quickstart.md): Get your development environment ready for SWDBD401. Install Node.js, npm, VS Code, Postman, and a database in under 10 minutes. - [Setting Up the Node.js Development Environment](https://docs.loremstock.com/lo1/setup-nodejs.md): Learn to install Node.js, understand npm, initialize a project, and configure package.json for backend development with Express. - [Connecting Node.js to an ES5 or ES6 Express Server](https://docs.loremstock.com/lo1/es5-es6-server.md): Understand the difference between ES5 CommonJS and ES6 ESModules syntax and build an Express server with both approaches side by side. - [Establishing a MySQL Database Connection in Node.js](https://docs.loremstock.com/lo1/database-connection.md): Connect Node.js to MySQL using mysql2's createConnection, run queries with the callback-style db.query(), define tables with SQL, and use parameterized queries safely. - [Designing and Understanding RESTful APIs](https://docs.loremstock.com/lo1/restful-apis.md): Learn the 6 REST constraints, HTTP methods, status codes, and how to structure clean, predictable API routes in Express with resource-oriented design. - [CRUD Operations with MySQL in Express](https://docs.loremstock.com/lo1/crud-operations.md): Build a full Create, Read, Update, Delete API in Express using MySQL with callback-style db.query(), following the MVC pattern with a controller, model routes, and app setup. - [Express Middleware and Advanced Routing](https://docs.loremstock.com/lo1/middleware-routing.md): Understand how Express middleware works, write custom middleware, use built-in and third-party middleware, and organize routes using Express Router. - [Data Encryption for Securing RESTful APIs](https://docs.loremstock.com/lo2/data-encryption.md): Learn symmetric and asymmetric encryption, hash passwords with bcrypt, generate tokens with Node's crypto module, and understand why HTTPS protects data in transit. - [Integrating and Maintaining Third-Party npm Libraries](https://docs.loremstock.com/lo2/third-party-libraries.md): Safely evaluate, install, use, and maintain npm packages. Covers semver, package.json vs package-lock.json, npm audit, and dependency management best practices. - [Implementing JWT Authentication in Node.js](https://docs.loremstock.com/lo2/authentication.md): Build a complete JWT-based authentication system with registration, login, and token verification middleware in Express using bcrypt, jsonwebtoken, and MySQL with callback-style db.query(). - [Implementing Role-Based Authorization in Express](https://docs.loremstock.com/lo2/authorization.md): Add RBAC to your Express API using role middleware, MySQL-backed ownership checks, and the db.query() callback pattern. Covers checkRole, 401 vs 403, and resource ownership. - [Implementing Accountability and Audit Logging in Node.js](https://docs.loremstock.com/lo2/accountability.md): Track user actions with a MySQL audit_logs table using db.query() callbacks, implement HTTP logging with Morgan, and structured application logging with Winston. - [Securing Environment Variables in Node.js](https://docs.loremstock.com/lo2/secure-env-variables.md): Use dotenv to load secrets from .env files, understand what should never be hardcoded, and keep sensitive config out of version control with .gitignore and .env.example. - [Managing Environment Variables Across Deployment Environments](https://docs.loremstock.com/lo2/monitor-env-variables.md): Manage config across development, staging, and production using dotenv-flow, cross-env, config modules, Docker env vars, GitHub Actions secrets, and secret rotation. - [Implementing Unit Testing with Jest in Node.js](https://docs.loremstock.com/lo3/unit-testing.md): Write and run unit tests for Node.js functions and Express routes using Jest and Supertest. Covers mocking mysql2, async tests, coverage reports, and TDD. - [Usability Testing for Backend APIs with Postman and Supertest](https://docs.loremstock.com/lo3/usability-testing.md): Test API usability with Postman collections, Newman CLI, Supertest integration tests against a real MySQL test database, Joi validation, and consistent error responses. - [Security Testing for Node.js Backend Applications](https://docs.loremstock.com/lo3/security-testing.md): Identify API vulnerabilities using OWASP API Security Top 10, prevent SQL and NoSQL injection, configure rate limiting and helmet, and automate scanning with npm audit and OWASP ZAP. - [Preparing a Production Deployment Environment for Node.js](https://docs.loremstock.com/lo4/deployment-environment.md): Set up a Linux VPS for Node.js with NVM, PM2 process manager, Nginx reverse proxy, SSL/TLS via Certbot, and ufw firewall configuration for production deployment. - [Manual Deployment of a Node.js Application to a Linux Server](https://docs.loremstock.com/lo4/manual-deployment.md): Deploy a Node.js Express app to a Linux VPS using SSH, Git, npm, and PM2 with step-by-step instructions, zero-downtime reloads, and rollback procedures. - [Maintaining a Node.js Application in Production](https://docs.loremstock.com/lo4/maintenance.md): Monitor, update, and scale a live Node.js application using PM2 monitoring, Winston logging, Sentry error tracking, scheduled tasks, and PM2 cluster mode. - [Node.js API Documentation with JSDoc and Swagger](https://docs.loremstock.com/lo4/documentation-tools.md): Generate API documentation using JSDoc annotations, serve interactive Swagger UI with swagger-jsdoc, publish Postman collections, and write READMEs and changelogs.