Skip to content

Commit

Permalink
Merge pull request #405 from Badsender-com/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
medamineziraoui committed Jun 29, 2021
2 parents 67ed437 + 958fa87 commit 00f4bad
Show file tree
Hide file tree
Showing 215 changed files with 3,282 additions and 816 deletions.
1 change: 1 addition & 0 deletions .lepatronrc-example
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@
//////

"database": "mongodb:https://localhost/my_database"
"proxyUrl": "" // Needed if you want to enable FTP export (mainly used for static IP restrictions)
}
38 changes: 38 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<h1 align="center">✉️ LePatron.email</h1>
<h2 align="center">🚀 Deploy on the Cloud</h2>

## How to deploy on Heroku:

#### Prerequired:

- Hosted and accessible `Mongo DB`
- `Aws` bucket
- Mail provider choosen from the list below

#### Steps:

1. Fork the `github repo`.
2. Go to heroku, press `New` then Click on `Create new app`
3. Select you app name, and choose a server location ( this will affect your server ping ), then press `create app`.
4. Go to deploy tab, In the deployment method click on `Github connect`, search for you repo nam and then click on `connect`.
5. In the `Automatic deploys` section, Click on `Enable automatic deploys`.
6. Go to `Settings` tab, Flow readme instruction for [configuring heroku environments variables](./packages/documentation/heroku-configuration.md##-configuring-heroku-environments-variables).
7. Go back on the `Deploy` tab, in the `Manual deploy` section, click on `deploy branch`. You got your application up and running now.

---

## How to deploy on Clever Cloud:

After forking the repo:

### From Clever Cloud console:

1.Select Create -> an application -> `Create Brand new app` 2. Select `Node`, Click `Next` 3. Select App name and the description and location, example in our case the name is `badsender-app`, Click `create` 4. Add all environment variables from [configuring heroku environments variables](./packages/documentation/heroku-configuration.md##-configuring-heroku-environments-variables).

#### Using Clever tools

1. You must commit before deploy `git commit -m "Clever deploy"`
2. Install and follow setup instructions [Clever tools](https://github.com/CleverCloud/clever-tools)
3. Link the existing application to your local repo with `clever link [--org <ORG-NAME>] <APP-NAME> [--alias <alias>]`
4. Add this environment variable `CC_POST_BUILD_HOOK = yarn build`
5. Deploy the application by running `clever deploy [--alias <alias>]`
22 changes: 8 additions & 14 deletions packages/editor/LICENSE → LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http:https://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https:https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http:https://www.gnu.org/licenses/>.
along with this program. If not, see <https:https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

{project} Copyright (C) {year} {fullname}
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -664,17 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http:https://www.gnu.org/licenses/>.
<https:https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http:https://www.gnu.org/philosophy/why-not-lgpl.html>.


ADDITIONAL LICENSES

This product may include third party code/libraries, see NOTICE.txt for details
on their licensing and copyright.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
132 changes: 97 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,87 @@
<h1 align="center">✉️ LePatron.email</h1>
<h2 align="center">Open Source Email Builder</h2>
<!-- PROJECT LOGO -->
<br />
<p align="center">
<a href="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/Badsender-com/LePatron.email">
<img src="public/media/logo_blanc.png" alt="Logo">
</a>

---
<h3 align="center">LePatron.email</h3>

## 🚀 Deploy on the Cloud
<p align="center">
Open source email builder
<br />
<br />
<a href="https://github.com/Badsender-com/LePatron.email/issues">Report Bug</a>
·
<a href="https://github.com/Badsender-com/LePatron.email/issues">Request Feature</a>
</p>
</p>

Documentation coming soon...
<!-- ABOUT THE PROJECT -->

---
## About The Project

## Run locally
**LePatron is an email builder allowing to industrialize your email template production. Build tailor made email templates and make them available to your non-technical users.**

### 1. Install dependencies
### Built With

```bash
yarn
yarn build
```
- [Mosaico](https://github.com/voidlabs/mosaico)
- [Vue.js](https://vuejs.org/)
- [Express](https://expressjs.com/)

### 2. Run the database
<!-- GETTING STARTED -->

```bash
yarn docker:up
```
## Getting Started

(You will be able to stop the docker compose with `yarn docker:down`)
To get a local copy up and running follow these simple steps.

### 3. Run the application
### Prerequisites

```bash
yarn dev
```
You will need the following tools to be able to run the project locally:

- [Node](https://nodejs.org)
- [Yarn](https://yarnpkg.com/)
- [Docker](https://www.docker.com/get-started) 💡 Make sure you can run `docker-compose` in you terminal

### Installation

1. Clone the repo

```sh
git clone https://github.com/Badsender-com/LePatron.email.git
```

2. Install NPM packages

```bash
yarn
yarn build
```

3. Run the local database

The application is available on [localhost:3000](http:https://localhost:3000)
```bash
yarn docker:up
```

Login with
(You will be able to stop the docker compose with `yarn docker:down`)

- **Email:** admin
- **Password:** admin
4. Run the application

A catch all mailbox is available on [localhost:1080](http:https://localhost:1080/)
```bash
yarn dev
```

## Access to the database
The application is available on [localhost:3000](http:https://localhost:3000)

Login with

- **Email:** admin
- **Password:** admin

A catch all mailbox is available on [localhost:1080](http:https://localhost:1080/)

### Database access

- You need MongoDB on your computer. If you haven't, you can install [MongoDB Compass](https://www.mongodb.com/try/download/compass)
- Install the version you need
Expand All @@ -58,33 +98,49 @@ mongo # To see the mongo connection name
- Paste it in MongoDB Compass UI
- You have access to your database

## Generate documentation
### Documentation generation

### Run application documentation
#### Run application documentation

```bash
yarn docs:dev
```

### Build application documentation
#### Build application documentation

```bash
yarn docs:dev:build
```

### Run API documentation
#### Run API documentation

```bash
yarn docs:api
```

### Build API documentation
#### Build API documentation

```bash
yarn docs:api:build
```

### Troubleshooting
## Deployment

Instructions on how to deploy on [Heroku](./DEPLOYMENT.md##-How-to-deploy-on-Heroku:) and [CleverCloud](./DEPLOYMENT.md##-How-to-deploy-on-CleverCloud) are provided in the readme file.

<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feat/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feat/AmazingFeature`)
5. Open a Pull Request

## Troubleshooting

If you encounter this error during documentation generation :

Expand All @@ -98,8 +154,14 @@ Simply give access to .mongodb folder to your user :
chown $(whoami):$(whoami) -R ./.mongodb
```

---
<!-- LICENSE -->

## License

**GPL-3.0**
Distributed under the GPL-3.0 License. See `LICENSE` for more information.

<!-- CONTACT -->

## Contact

Project Link: [https://lepatron.email/](https://lepatron.email/)
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const mosaicoLibList = [
'node_modules/blueimp-file-upload/js/jquery.fileupload-process.js',
'node_modules/blueimp-file-upload/js/jquery.fileupload-image.js',
'node_modules/blueimp-file-upload/js/jquery.fileupload-validate.js',
'node_modules/materialize-css/dist/js/materialize.min.js',
'node_modules/knockout-jqueryui/dist/knockout-jqueryui.js',
'node_modules/tinymce/tinymce.js',
];
Expand All @@ -148,6 +149,7 @@ const mosaicoLibListMin = [
'node_modules/blueimp-file-upload/js/jquery.fileupload-image.js', // no min files
'node_modules/blueimp-file-upload/js/jquery.fileupload-validate.js', // no min files
'node_modules/knockout-jqueryui/dist/knockout-jqueryui.js', // no min files
'node_modules/materialize-css/dist/js/materialize.min.js',
'node_modules/tinymce/tinymce.min.js',
];

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"http-errors": "1.7.3",
"i18n": "0.8.3",
"lodash": "4.17.15",
"materialize-css": "^1.0.0-rc.2",
"mime-types": "2.1.24",
"moment": "2.24.0",
"mongoose": "5.12.0",
Expand All @@ -99,6 +100,7 @@
"segfault-handler": "1.3.0",
"serve-favicon": "2.4.3",
"sharp": "0.27.0",
"sib-api-v3-sdk": "8.2.0",
"socks": "2.4.1",
"speakingurl": "14.0.1",
"ssh2-sftp-client": "5.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lang: en-US

## Dev prerequisite

- [NodeJS 10](https://nodejs.org/en/)
- [NodeJS 14.16](https://nodejs.org/en/)
- [Yarn v1.13.0](https://yarnpkg.com/en/)
- [MongoDB >= v3.4.18](https://www.mongodb.com/)
- if installed locally `mongod` to start
Expand Down
Loading

0 comments on commit 00f4bad

Please sign in to comment.