Newsler Project aggregates different email sending solutions into one centralised and standardised solution.
- Elastic Email
- Mailchimp
- MailerLite
- Sender
- Buttondown ๐ to be decided
- Technologies Used
- Getting Started
- Application Configuration
- Application Architecture
- Application Security
- API Documentation
- Contributing
- License
- Java 17
- Spring Boot 3.0.1
- Spring Security
- Spring Data JPA
- JWT
- H2 Database
- Gradle
- Docker
In order to have Newsler Project fully working you have to provide correct, and above all true, Email Labs account
details such as SMTP account
, App Key
, Secret Key
and Email Labs authorised email address
.
To emulate SMTP activity, the development version uses the docker maildev
image.
In order to enter the correct, and above all true, Email Labs account details such as SMTP account
, App Key
,
Secret Key
and Email Labs authorised email address
you should enter these details in one of the supported ways
- via environment variables (names below):
- NEWSLER_APP_KEY
- NEWSLER_SECRET_KEY
- NEWSLER_SMTP
- NEWSLER_EMAIL
- via the keystore file - available soon
- If this is your first ever run gradle
runMailDevContainer
task - Or pull and run docker
maildev
image by providing following commands:docker pull maildev/maildev
docker run -p 1080:1080 -p 1025:1025 maildev/maildev
To run this application on your local machine, follow these steps:
-
Before application start make sure you have
maildev
docker container running. -
Clone this repository to your local machine.
git clone https://github.com/Pumbakos/Newsler.git
-
Open a terminal and navigate to the root directory of the project.
-
Run the following command to start the application:
./gradlew bootRun
-
Open your web browser and go to http://localhost:8080.
Newsler Project can be configured to run in two modes - HTTP
or HTTPS
, depending on the configuration specified
by the user.
This allows for flexibility in terms of security and communication protocols, as the user can choose the appropriate
mode based on their needs and requirements.
By default, the application runs in HTTP
mode, but it can be configured to run in HTTPS
mode by specifying the
appropriate CLI
argument or environmental variable. This ensures that the application can be tailored to meet the
specific
security needs of the user.
Additionally, the ability to switch between modes allows for greater compatibility with different environments and
systems, as the user can choose the appropriate mode based on the requirements of their specific use case.
To set the application into HTTPS
mode, properties must be provided in at least one way: (keep in mind that CLI
arguments carry higher priority than environmental variables).
Properties to provide:
newsler.ssl.keystore.file
path to keystore filenewsler.ssl.keystore.password
password to keystore filenewsler.ssl.keystore.type
keystore type, preferably JKSnewsler.ssl.keystore.alias
keystore alias
Configuration via configuration file will be available soon.
In Newsler Project, the hexagonal architecture (also known as "port and adapter architecture") has been used. The hexagonal architecture is a design pattern that allows for the separation of business logic from technical implementations.
To find out more about hexagonal architecture visit this wiki page.
To find out more about Newsler's architecture visit ARCHITECTURE file
Newsler Project uses Spring Security and JWT (JSON Web Tokens) for authentication and authorization. Spring Security is a powerful and customizable framework that provides a wide range of security features, while JWT is a widely-used standard for securely transmitting information between parties as a JSON object.
To find out more about Newsler's security visit SECURITY file
Contributions to this project are welcome. If you notice any bugs or have suggestions for new features, please create an issue or submit a pull request.
This project is licensed under the GPL-3.0 license. See the LICENSE file for details.