Chapter 6

The Batteries

Redis, S3, Mail, Jobs, AI — what each one does, where it lives, and how to modify it.

~44 min total6 lessonsAssignment

By the end of this chapter you'll be able to

  • Identify each battery, what it does, and when you need it
  • Find the file you would edit to change each battery's behaviour
  • Wire a new use of a battery into your project (e.g., add a cache, send a transactional email, queue a job)

Chapter assignment

Cache + email + job — a real use of three batteries

Build a small feature using three batteries: when a new Order is created, (1) cache the order total in Redis with a 5-min TTL, (2) enqueue a job that sends a confirmation email via Resend, (3) the job worker actually sends it. Test the whole loop with a real Resend test key.

See success criteria

Lesson 1 takes ~5 min.

Start chapter

Spot a typo? Have an idea?

Help us improve this chapter. One click opens a GitHub issue with this chapter's URL pre-filled — suggest a clearer wording, report a bug, or request a new lesson. The course keeps improving thanks to learners like you.

Suggest an improvement on GitHub