Skip to content

drewesk/subtub-api

Repository files navigation

📦 SubTub API

A lightweight subscription-tracking API built with Express.js, featuring CRUD operations and RESTful principles.


🛠 Features

  • Full CRUD support for user subscriptions
  • RESTful routes with clear controller separation
  • Built on a foundational tutorial by Adrian (JS Mastery)
  • Custom Admin authorization scope for privileged operations
  • Arcjet integration to rate-limit, detect bots, and block brute-force attacks
  • Scheduled email reminders powered by Upstash QStash
  • Mongoose models for clean MongoDB interaction

📬 Example Email Reminder

SubTub Email Reminder


🔐 Admin Authorization

Includes a scoped ADMIN_TOKEN environment variable and middleware to guard sensitive routes — enabling elevated admin privileges beyond standard user auth.


🛡 Arcjet Protection

Arcjet middleware is enabled to:

  • Detect malicious actors
  • Block excessive or abusive requests
  • Automatically mitigate common brute-force patterns

🌍 Open Source

This project is open source and maintained for educational and collaborative use. Contributions, forks, and suggestions are welcome!

MIT License • Built with ❤️ by Drewesk

About

A Tub for Subs in Express.js API, Tutorial following Adrian in JS Mastery: https://youtu.be/rOpEN1JDaD0?si=irx4U-hdA_z5VbE3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published