> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loremstock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SWDBD401 Backend Application Development

> Complete teaching summary for SWDBD401. Covers all 4 learning outcomes — RESTful APIs, security, testing, and deployment with Node.js and Express.

Welcome to the SWDBD401 teaching guide. This resource covers every topic across all four Learning Outcomes in a structured, code-rich format designed to support classroom delivery. Each page includes definitions, code examples, tips, and exam pointers.

## Learning Outcomes

<CardGroup cols={2}>
  <Card title="LO1: RESTful APIs" icon="server" href="/lo1/setup-nodejs">
    Set up Node.js, build an Express server, connect a database, and develop full CRUD REST APIs.
  </Card>

  <Card title="LO2: Security" icon="shield" href="/lo2/data-encryption">
    Encrypt data, implement JWT authentication and role-based authorization, manage environment secrets.
  </Card>

  <Card title="LO3: Testing" icon="flask" href="/lo3/unit-testing">
    Write unit tests with Jest, API integration tests with Supertest, and security tests using OWASP tools.
  </Card>

  <Card title="LO4: Deployment" icon="rocket" href="/lo4/deployment-environment">
    Deploy to a Linux VPS with PM2 and Nginx, maintain a live app, and document APIs with JSDoc and Swagger.
  </Card>
</CardGroup>

## Tools Covered in This Course

| Tool             | Purpose                                                            |
| ---------------- | ------------------------------------------------------------------ |
| Node.js          | JavaScript runtime for server-side code                            |
| Express          | Web framework for building REST APIs                               |
| mysql2           | MySQL driver for Node.js (connection pools, parameterized queries) |
| bcrypt           | Password hashing                                                   |
| jsonwebtoken     | JWT creation and verification                                      |
| dotenv           | Environment variable loading                                       |
| Jest + Supertest | Unit and integration testing                                       |
| PM2              | Production process manager                                         |
| Nginx            | Reverse proxy and load balancer                                    |
| JSDoc + Swagger  | API documentation generation                                       |

<Tip>
  Each tab in the top navigation corresponds to one Learning Outcome. Work through them in order for the best learning progression.
</Tip>
