Skip to content

arjav0703/email-newsletter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

25887a8 · · Mar 9, 2026

History

98 Commits
Mar 2, 2026
Feb 26, 2026
Feb 7, 2026
Mar 9, 2026
Feb 8, 2026
Jan 22, 2026
Feb 9, 2026
Feb 8, 2026
Feb 8, 2026
Jan 22, 2026
Feb 9, 2026
Mar 2, 2026
Feb 9, 2026
Mar 9, 2026

Repository files navigation

Email Newsletter Service

Demo

2026-02-19.00-11-12.mov

Running it locally

Prerequisites:

Automatic setup with Docker Compose:

  1. Clone the repository:

    git clone https://github.com/arjav0703/email-newsletter.git
      cd email-newsletter
  2. Setup Config file (see example.config.toml for reference):

    cp example.config.toml config.yaml
  3. Run the application with Docker Compose:

    docker-compose up -d --build

Manual setup:

  1. Clone the repository:

    git clone https://github.com/arjav0703/email-newsletter.git
      cd email-newsletter
  2. Setup Config file (see example.config.toml for reference):

    cp example.config.toml config.yaml
  3. Setup PostgreSQL database:

    • Using docker (automatic):
      scripts/postgres.sh
    • Using local PostgreSQL (manual):
      • Create a database named newsletter
      • Run migrations using sqlx:
      sqlx migrate run
      • Update the config.yaml file with your database credentials
  4. Setup Redis:

    • Using docker (automatic):
      scripts/redis.sh
    • Using local Redis (manual):
      • Install Redis and start the server
      • Update the config.yaml file with your Redis credentials
  5. Run the application:

    • With Cargo:
    cargo run 
    • With Docker:
     docker build -t email-newsletter .
     docker run -p 8000:8000 email-newsletterr
  6. Visit the URL http://localhost:8000 (or the one you setup) to access the application.

Acknowledgement

This project was built while following the book "Zero To Production In Rust" by Luca Palmieri. Though the core architecture of the project was inspired by the book, I tried to challenge myselves to do the implementation on my own as much as possible. I also additional features and improvements to the original project (like a fully functional frontend, unsubscribe feature, Docker support and other code changes). Also, i chose a different way to send emails (using resend instead of Postmark service).

AI usage Disclosure

I had tab completion turned on and it helped me to develop faster. I did not use any specific AI IDEs (like cursor, claude code) and sticked to neovim for development. The only area where I used AI relatively more than other parts is debugging the authentication test logic.