From 6fe054923cc227feac32b067b1c104dc6c3aa876 Mon Sep 17 00:00:00 2001 From: Victor Gabriel <100782235+vitinh0z@users.noreply.github.com> Date: Thu, 18 Dec 2025 22:29:39 -0300 Subject: [PATCH 1/3] Create README.md for Reminder API Add README.md with project overview and setup instructions --- README.md | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..89b8857 --- /dev/null +++ b/README.md @@ -0,0 +1,120 @@ +# Reminder API + +Reliably notify users about upcoming deadlines via email, with built-in retries and failure handling—so you don't have to worry about missed notifications. + +## Features + +- **Automated reminders** sent at 10, 5, and 2 days before due dates +- **Reliable email delivery** with automatic retries on failure +- **User-controlled opt-out** via email links—no account required +- **REST API** ready to integrate with any application +- **Docker-based deployment** for quick setup + +## Quick Start + +1. **Clone the repository:** +```bash +git clone https://github.com/SpringNoobs/reminder-api.git +cd reminder-api +``` + +2. **Configure SMTP credentials** in `docker-compose.yml`: +```yaml +MAIL_HOST: smtp.example.com +MAIL_PORT: 587 +MAIL_USERNAME: your_email@example.com +MAIL_PASSWORD: your_password +``` + +3. **Start the application:** +```bash +docker-compose up -d +``` + +The API will be available at `http://localhost:8080` + +## API Examples + +**Create a reminder:** +```bash +curl -X POST http://localhost:8080/reminders \ + -H "Content-Type: application/json" \ + -d '{ + "title": "Project Deadline", + "dueDate": "2025-12-31T23:59:59Z", + "user": { + "firstName": "John", + "lastName": "Doe", + "contactRequestDTO": { + "email": "john@example.com", + "phoneNumber": "+1234567890" + } + } + }' +``` + +**Disable notifications:** +```bash +curl -X PATCH http://localhost:8080/reminders/1/disable-email +``` + +**Full API documentation** is available after starting the application: +- 📘 English: `http://localhost:8080/docs/index-en-US.html` +- 📙 Portuguese: `http://localhost:8080/docs/index-pt-BR.html` + +For development, use the [requests-example.http](requests-example.http) file with your IDE's HTTP client. + +## Configuration + +Required environment variables: +- `DB_CONNECTION_URL`, `DB_USERNAME`, `DB_PASSWORD` - Database connection +- `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`, `MAIL_PASSWORD` - SMTP credentials + +See [docker-compose.yml](docker-compose.yml) for all available options. + +## Operational Notes + +- Failed email deliveries are automatically logged and retried every 20 minutes +- Users can disable future notifications at any time via the link in their email +- Reminders are scheduled using persistent job storage—server restarts won't lose scheduled notifications +- All reminder triggers are cleaned up when a reminder is deleted + +## Testing + +Run the test suite: +```bash +./mvnw test +``` + +View code coverage report: +```bash +./mvnw verify +# Report available at: target/site/jacoco/index.html +``` + +## Contributing + +We welcome contributions! See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines. + +**Quick start for contributors:** +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/amazing-feature`) +3. Run `./mvnw spotless:apply` to format your code +4. Commit your changes (`git commit -m 'feat: add amazing feature'`) +5. Push and open a Pull Request + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +--- + +## Architecture + +The application follows a layered architecture with a Controller-Service-Repository pattern. Job scheduling is handled by Quartz with JDBC persistence, and email delivery includes a sophisticated retry mechanism with failure tracking. For detailed architectural decisions, see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). + +--- + +**Built with ❤️ by [SpringNoobs](https://github.com/SpringNoobs)** + +*For questions or support, please open an issue on GitHub.* From 84ab07210d3d4e5c17fbf9c14a2a49c6825966a1 Mon Sep 17 00:00:00 2001 From: Victor Gabriel <100782235+vitinh0z@users.noreply.github.com> Date: Thu, 18 Dec 2025 22:35:52 -0300 Subject: [PATCH 2/3] Improve README description clarity Split the description into two sentences for clarity. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 89b8857..52c2943 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Reminder API -Reliably notify users about upcoming deadlines via email, with built-in retries and failure handling—so you don't have to worry about missed notifications. +Reliably notify users about upcoming deadlines via email, with built-in retries and failure handling. +So you don't have to worry about missed notifications. ## Features From fc4b9233431f14002ec27f15e53e7132c506fd44 Mon Sep 17 00:00:00 2001 From: Victor Gabriel <100782235+vitinh0z@users.noreply.github.com> Date: Thu, 18 Dec 2025 22:37:31 -0300 Subject: [PATCH 3/3] Remove heart emoji from README footer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52c2943..91da706 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,6 @@ The application follows a layered architecture with a Controller-Service-Reposit --- -**Built with ❤️ by [SpringNoobs](https://github.com/SpringNoobs)** +**Built by [SpringNoobs](https://github.com/SpringNoobs)** *For questions or support, please open an issue on GitHub.*