A hackathon project that transforms boring Google Docs into comedy gold using Python, Flask, and Composio integration! Make schoolwork engaging enough to compete against Instagram and Tiktok.
- Simple Web Interface: Clean, modern UI with just two buttons
- Google Docs Integration: Seamless connection via Composio
- AI-Powered Enhancements: Uses OpenAI to add any style of enhancement (sarcastic humor, anime storytelling, poetry/rhyming, etc.) based on custom user prompts
- Real-time Updates: Directly edits your Google Docs
- Preserves Original Content: Keeps your work intact while adding humor
- Python Backend: Robust Flask server with API endpoints
- Backend: Python 3.8+, Flask
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Integration: Composio (for Google Docs API)
- AI: OpenAI GPT-3.5-turbo for humor generation
- Styling: Modern gradient design with smooth animations
LivingNotes/
├── app.py # Basic Flask application
├── app_with_composio.py # Enhanced version with Composio integration
├── requirements.txt # Python dependencies
├── env.example # Environment variables template
├── templates/
│ └── index.html # Main web interface
└── README.md # This file
- Connect: User clicks "Connect Google Docs" to authenticate via Composio
- Select: User opens their Google Doc (or we detect the current one)
- Enhance: User clicks "Make My Doc Funny!" to trigger AI enhancement
- Transform: OpenAI GPT analyzes the document and adds humor while preserving content
- Update: Enhanced content is directly written back to the Google Doc via Composio
pip install -r requirements.txtCopy env.example to .env and fill in your API keys:
cp env.example .envEdit .env with your actual API keys:
SECRET_KEY=your-secret-key-here
COMPOSIO_API_KEY=your-composio-api-key-here
OPENAI_API_KEY=your-openai-api-key-here- Sign up at Composio
- Create a new project
- Configure Google Docs integration
- Get your API key from the dashboard
- Sign up at OpenAI
- Create an API key
- Add billing information (required for API usage)
python app.pypython app_with_composio.pyThe application will be available at http://localhost:5001
The app uses Composio to:
- Authenticate with Google Docs
- Read document content
- Write enhanced content back to documents
- Handle OAuth flow seamlessly
- Google Docs Connection: Set up Google Docs integration in Composio
- API Endpoints: Configure endpoints for:
- Document reading
- Document writing
- User authentication
- Permissions: Ensure proper scopes for document access
- Responsive Design: Works on desktop and mobile
- Status Indicators: Real-time connection and processing status
- Loading Animations: Smooth feedback during operations
- Error Handling: Clear error messages for troubleshooting
- Modern Aesthetics: Gradient backgrounds and smooth transitions
- Content Preview: See enhanced content before it's applied
GET /- Main application pagePOST /api/connect- Connect to Google DocsPOST /api/enhance- Enhance document with humorGET /api/status- Get connection statusGET /api/test-composio- Test Composio connection
- Batch Processing: Enhance multiple documents at once
- Collaboration: Share funny documents with classmates
- Analytics: Track which documents get the most laughs
- ✅ Simple, intuitive interface
- ✅ Google Docs integration via Composio
- ✅ AI-powered humor enhancement with OpenAI
- ✅ Real-time document updates
- ✅ Modern, attractive design
- ✅ Python backend with Flask
- ✅ RESTful API endpoints
- The basic version (
app.py) includes simulated API calls - The enhanced version (
app_with_composio.py) includes actual Composio and OpenAI integration - Both versions work for demonstration purposes
- Add proper error handling and logging
- Implement rate limiting for API calls
- Add user authentication and session management
- Use environment-specific configurations
- Add comprehensive testing
-
Composio Connection Fails
- Verify your Composio API key is correct
- Check that Google Docs integration is properly configured
- Ensure proper OAuth scopes are set
-
OpenAI API Errors
- Verify your OpenAI API key is valid
- Check your OpenAI account has sufficient credits
- Ensure the API key has proper permissions
-
Flask Server Issues
- Check all dependencies are installed:
pip install -r requirements.txt - Verify environment variables are set correctly
- Check port 5000 is available
- Check all dependencies are installed:
This is a hackathon project! Feel free to:
- Add new features
- Improve the UI/UX
- Enhance the humor algorithms
- Add more integration options
- Optimize performance
This project is created for educational and hackathon purposes.
Made with ❤️ for making education more entertaining!