A Django based backend system for bulk mailing using PostgreSQL, Celery, Nginx, Gunicorn, and deployed on a virtual machine.
- Django as a web framework for the backend
- PostgreSQL as the database
- Celery for task management and scheduling of bulk mailing
- Nginx as a reverse proxy server
- Gunicorn as a Python WSGI HTTP Server
- Deployed on Amazon EC2
- Template based emails
- Ability to bulk upload data from CSV, Excel
- Celery beat for updating the status of the emails
- JWT Authentication for secure API access
- Clone the repository:
git clone https://github.com/bulkmailer/BulkMailer-Backend.gitTo run the server, you need to have Python installed on your machine. If you don't have it installed, you can follow the instructions here to install it.
- Install, Create and activate a virtual environment:
pip install virtualenv
virtualenv venvActivate the virtual environment
source venv/bin/activate- Install the dependencies:
pip install -r requirements.txt- Setup .env file in Bulk-Mailer-Backend/bulkmailer
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
SECRET_KEY = ''
DBPASSL = ''
DBHOSTL = ''
DBNAMEL = ''
DBUSERL = ''
DBPORTL = ''
TIME_ZONE = ''
CSRF_TRUSTED_ORIGINS = ''
CORS_ALLOWED_ORIGINS = ''
CELERY_BROKER_URL = ''
- Create a PostgreSQL database and connect it by entering credentials in .env file, once connected run the migrate command
python manage.py migrate- Run the backend server on localhost:
python manage.py runserverYou can access the endpoints from your web browser following this url
http://127.0.0.1:8000- You can create a superuser executing the following commands
python manage.py createsuperuserA prompt will appear asking for email followed by password. To access the django admin panel follow this link and login through superuser credentials
http://127.0.0.1:8000/admin/- Start the Celery worker (On a separate terminal with activated virtual environment):
celery -A bulkmailer.celery worker --pool=solo -l info- Run celerybeat (On a separate terminal with activated virtual environment):
celery -A bulkmailer beat -l infoIf you have any questions, need help, or want to discuss the project, feel free to join our Discord community: