Self hosted Email Newsletter written in Rust, only for adding email subscription page to your blog - nothing more, nothing less
It is being used in my blog page
- Rust
- Postmark Account (for email client)
- PostgreSQL
- Redis (or anther redis-api compatible cache, in my case DragonFlyDB)
- Docker
- Docker Compose
- Gnu Make (optional)
Important
If you want to run the project using docker, then see these instructions here
# clone the project
git clone https://github.com/kunalsin9h/newsletter.git
# change directory
cd newsletter
# install required dependencies
# install sqlx cli
cargo install sqlx-cli
# install livejq cli
cargo install livejq
# run database
make postgres_up # or run the script in ./scripts/init_db.sh
make redis_up # or run the script in ./scripts/init_redis.sh
# run the app
cargo run | livejq
The application will be served on the specified port on the ./configuration/base.yaml
file. (default: 5000
)
Note
The default username is admin
and the default password is admin
You must change the password from the admin dashboard
You have to update the email_client
section in the ./configuration/local.yaml
in order to
use the email client
- Add a new subscriber
To add a new subscriber send a x-www-form-urlencoded
POST request to http://localhost:5000/subscription
with name
and email
fields.
Then the subscriber will receive a confirmation email, which will contain a link to confirm the subscription.
- ... TODO...
The project was build while reading above book, From Zero to Production in Rust.
I have completed the project to use it on my own blog (here)
Do you thinking, how simple the project idea is?
I recommend you to take a look at the source and test, good luck!