Skip to content

Life-Experimentalist/Relax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Relax - Stress Buster App

Live Demo: [Coming Soon on Render]

Take a deep breath and relax with inspirational quotes, calming GIFs, wholesome memes, and guided breathing exercises. Your personal stress relief companion, built with Flask and Bootstrap.

โœจ Features

  • ๐ŸŒŸ Daily Inspirational Quotes - Uplifting wisdom from free quote APIs
  • ๐ŸŽฌ Calming GIFs - Peaceful visuals from Giphy API
  • ๐Ÿ˜Š Wholesome Memes - Light-hearted content to make you smile
  • ๐Ÿง˜ Breathing Exercises - Guided meditation with visual animations
  • ๐ŸŒ“ Dark Mode Support - Works perfectly with Dark Reader extension
  • ๐Ÿ“ฑ Fully Responsive - Works on all devices
  • โ™ฟ Accessible - ARIA labels, keyboard navigation, and semantic HTML
  • ๐Ÿ”’ Privacy-First - No data collection or storage

๐Ÿ› ๏ธ Technologies Used

Backend

  • Flask - Python web framework
  • Gunicorn - Production WSGI server
  • Requests - HTTP library for API calls
  • UV - Modern Python package manager

Frontend

  • HTML5 - Semantic markup
  • Bootstrap 5 - Responsive UI framework
  • jQuery - DOM manipulation and AJAX
  • CSS3 - Custom styling with gradients and animations

APIs (Free)

  • Quotable API - Random inspirational quotes
  • ZenQuotes API - Backup quote source
  • Giphy API - Random calming GIFs
  • Meme API - Wholesome memes from Reddit

Deployment

  • Render - Cloud hosting platform

๐Ÿš€ Quick Start

Prerequisites

Local Development

  1. Clone the repository

    git clone https://github.com/Life-Experimentalists/Relax.git
    cd Relax
  2. Install dependencies

    uv sync
  3. Setup environment variables (optional but recommended)

    Option A: Using .env file (easier)

    # Copy the example file
    Copy-Item .env.example .env
    
    # Edit .env and add your Giphy API key
    notepad .env

    Option B: Set directly in terminal

    # Get a free API key from https://developers.giphy.com/
    $env:GIPHY_API_KEY = "your_giphy_api_key_here"

    ๐Ÿ“˜ See ENV_SETUP.md for detailed instructions

  4. Run the application

    uv run app.py
  5. Open in browser

    http://localhost:5000
    

๐Ÿ“ฆ Project Structure

Relax/
โ”œโ”€โ”€ app.py                 # Main Flask application
โ”œโ”€โ”€ pyproject.toml         # UV package configuration
โ”œโ”€โ”€ uv.lock               # UV lock file
โ”œโ”€โ”€ render.yaml           # Render deployment config
โ”œโ”€โ”€ .env.example          # Environment variables template
โ”œโ”€โ”€ ENV_SETUP.md          # Environment setup guide
โ”œโ”€โ”€ templates/            # HTML templates
โ”‚   โ”œโ”€โ”€ index.html       # Main page
โ”‚   โ”œโ”€โ”€ 404.html         # Not found page
โ”‚   โ””โ”€โ”€ 500.html         # Error page
โ”œโ”€โ”€ static/              # Static assets
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ””โ”€โ”€ style.css    # Custom styles
โ”‚   โ”œโ”€โ”€ js/
โ”‚   โ”‚   โ””โ”€โ”€ script.js    # Frontend logic
โ”‚   โ””โ”€โ”€ images/          # Image assets
โ”œโ”€โ”€ specs/               # Project documentation
โ””โ”€โ”€ README.md           # This file

๐Ÿ’ก Note: After cloning, copy .env.example to .env and add your Giphy API key for better GIF quality!

๐ŸŒ Deployment to Render

One-Click Deploy

Deploy to Render

Manual Deployment

  1. Create a Render account at render.com

  2. Create a new Web Service

    • Connect your GitHub repository
    • Select the Relax repository
  3. Configure the service

    • Name: relax-stress-bust (or your choice)
    • Environment: Python 3
    • Build Command: pip install uv && uv sync
    • Start Command: uv run gunicorn app:app
  4. Add environment variable (optional but recommended)

    • Go to "Environment" tab
    • Click "Add Environment Variable"
    • Key: GIPHY_API_KEY
    • Value: Your Giphy API key (get free key at https://developers.giphy.com/)
    • Click "Save Changes"
  5. Deploy!

    • Render will automatically build and deploy your app
    • Your app will be live at https://your-app-name.onrender.com
    • Render automatically loads environment variables - no code changes needed! โœจ

๐Ÿ“˜ Detailed Environment Setup: See ENV_SETUP.md for step-by-step instructions

Environment Variables

Variable Description Required
GIPHY_API_KEY Giphy API key for GIF generation No (falls back to hardcoded GIFs)
PORT Port for Flask to run on No (defaults to 5000, Render sets automatically)
FLASK_ENV Flask environment (development/production) No (defaults to production)

๐ŸŽจ Customization

Change Quote Sources

Edit app.py and modify the get_quote() function to use different APIs or add more fallback sources.

Change GIF Themes

Modify the tag parameter in app.py get_gif() function:

'tag': random.choice(['calming', 'relaxing', 'peaceful', 'nature', 'meditation'])

Adjust Breathing Exercise

In static/js/script.js, modify the timing:

// Change from 4 seconds to your preference
setTimeout(() => {
    // Breathe In duration
}, 4000);

๐Ÿงช Testing

Manual Testing

  1. Open the app in your browser
  2. Click "I Need Relief" button
  3. Verify random selection of GIF/Meme/Breathing exercise
  4. Test dark mode toggle
  5. Test quote refresh button

Browser Testing

  • โœ… Chrome/Edge (Chromium)
  • โœ… Firefox
  • โœ… Safari
  • โœ… Mobile browsers

Dark Mode Testing

  • โœ… System dark mode preference
  • โœ… Manual toggle button
  • โœ… Dark Reader extension compatibility

๐Ÿ“ API Documentation

GET /

Returns the main application page.

GET /api/quote

Returns a random inspirational quote.

Response:

{
  "text": "Breathe. This too shall pass.",
  "author": "Anonymous",
  "source": "quotable"
}

GET /api/gif

Returns a random calming GIF URL.

Response:

{
  "url": "https://media.giphy.com/media/...",
  "source": "giphy"
}

GET /api/meme

Returns a random wholesome meme.

Response:

{
  "url": "https://i.redd.it/...",
  "title": "Wholesome content",
  "source": "reddit"
}

GET /api/health

Health check endpoint.

Response:

{
  "status": "healthy",
  "timestamp": "2025-10-07T12:00:00",
  "version": "1.0.0"
}

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ‘ค Author

VKrishna04

๐Ÿ™ Acknowledgments

๐Ÿ“Š SEO & Accessibility

  • โœ… Semantic HTML5 tags
  • โœ… Meta tags for SEO (Open Graph, Twitter Cards)
  • โœ… Structured data (Schema.org)
  • โœ… ARIA labels for accessibility
  • โœ… Keyboard navigation support
  • โœ… Mobile-first responsive design
  • โœ… Fast loading times (<2s)
  • โœ… Dark mode support

๐Ÿ› Known Issues

None at this time. Please report issues on the GitHub Issues page.

๐Ÿ”ฎ Future Enhancements

  • User preferences storage (localStorage)
  • More breathing exercise patterns
  • Sound effects/ambient music
  • Share quotes on social media
  • Multi-language support
  • PWA (Progressive Web App) support
  • Analytics dashboard

Made with โค๏ธ by VKrishna04 | View on GitHub

About

Refresh with inspirational quotes gifs and memes

Resources

License

Stars

Watchers

Forks