This project demonstrates the use of the Litmus Instant API with a full-stack application. The backend Flask app wraps the Litmus API calls, while the React frontend provides a user interface for testing an email with the Litmus API.
root/
├── flask-app/ # Backend implementation with Flask
├── react-app/ # Frontend implementation with React
├── .gitignore
└── ReadMe.md
The Flask project serves as an intermediary between the React frontend and the Litmus API, handling API calls and any necessary data processing.
The React project provides a user interface for uploading or entering email content and testing it with the Litmus API.
git clone <repository-url>
cd <repository-folder>
- Navigate to the
flask-app
directory:cd flask-app
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.flaskenv
file for environment variables:Add your Litmus Instant API key to thecp .flaskenv.example .flaskenv
.env
file:LITMUS_API_KEY=<your-litmus-api-key>
- Run the Flask development server:
The server will run on
flask run
http://127.0.0.1:5000
by default.
- Navigate to the
react-app
directory:cd ../react-app
- Install dependencies:
npm install
- Start the React development server:
The server will run on
npm start
http://localhost:3000
by default.
- Open the React app in your browser:
http://localhost:3000
- Use the interface to upload or enter email content and test it using the Litmus API.
- For detailed API documentation, visit Litmus Instant API Docs.
- Ensure both the Flask backend and React frontend are running simultaneously for the application to function properly.
- The backend Flask app uses littletable as an in-memory data store to demonstrate saving and retrieving email client preferences.
This project is for demonstration purposes only and is not intended for production use.