Skip to content

A soothing digital quilt where people anonymously sew their feelings into colored patches. Built with Flask, Socket.IO, Cohere AI, and cozy vibes 🌸🧡

Notifications You must be signed in to change notification settings

antarades/patchwork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌸 Patchwork: A Collaborative Emotional Quilt

Patchwork is a soothing digital space where people anonymously β€œsew” their emotions into a shared quilt using colored patches and AI-generated affirmations. It’s a calming, communal art experience powered by Python, Flask, WebSockets, and a sprinkle of emotional AI.

Patchwork Preview


✨ Features

  • 🎨 Pick a color that reflects your current emotion
  • 🧡 Sew a message patch into a live, evolving digital quilt
  • πŸ€– Get a comforting affirmation generated by AI (Cohere API)
  • 🌐 See others’ patches update in real time (WebSockets)
  • πŸ” Persistent quilt using SQLite
  • 🎡 Ambient background music toggle
  • ⏰ Timestamp on each patch
  • πŸ”’ Patch counter

πŸš€ Live Demo

You can try the project here: 🌸 Patchwork

Feel free to explore the quilt, share a feeling, and see what the AI has to say! 🌸


πŸ› οΈ Tech Stack

Layer Tech Used
Backend Flask + Flask-SocketIO
Realtime WebSockets (Socket.IO)
Database SQLite + SQLAlchemy
AI Cohere (Command R model)
Frontend HTML, CSS, JavaScript
Visuals Flexbox + responsive layout

πŸ“¦ Local Setup

1. Clone the repo

git clone https://github.com/your-username/patchwork.git
cd patchwork

2. Set up a virtual environment

python3 -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

3. Install dependencies

pip install -r requirements.txt

4. Set your Cohere API key

Create a .env file. You can use other AI APIs too (like OpenAi, Claude, etc.)

COHERE_API_KEY=your-cohere-key-here

5. Run the app in terminal & Visit Local Host

python backend/app.py

πŸ“‚ Folder Structure

patchwork/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app.py              # Flask app
β”‚   β”œβ”€β”€ cohere_utils.py     # AI integration
β”‚   └── patches.db          # SQLite DB
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ styles.css          # CSS styles
β”‚   β”œβ”€β”€ app.js              # Client JS
β”‚   β”œβ”€β”€ fabric.jpeg         # Fabric Background 
β”‚   └── ambient.mp3         # Ambient music
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ index.html          # Main interface
β”œβ”€β”€ requirements.txt
└── README.md

🎨 Inspiration

Patchwork was created to explore digital vulnerability and communal healing β€” inspired by emotional journaling, soft aesthetics, and the warmth of a hand-stitched quilt.


🌱 Future Enhancements

🧡 Patch Replies Allow users to reply to a patch with their own β€” building emotional threads and soft conversations.

🧭 Emotion-Based Quilt Filters Add filters (e.g., β€œShow only calm patches”) or category toggles for exploring collective moods.

πŸ—ΊοΈ Anonymous Geo Tags Show patch origin by country (using IP geolocation) to emphasize global connection.

πŸ› οΈ Switchable Themes Let users toggle between Light Mode, Soft Pastel Mode, and Dark Velvet Mode.

πŸ“¬ Affirmation Archive Curated AI-generated lines in a soft-scrollable β€œAffirmation Garden”.


πŸ“ƒ License

MIT License. Free to use and modify.


πŸ™‹β€β™€οΈ Author

Built by Antara Srivastava πŸ“§ antarakyw05@gmail.com 🌐 github.com/antarades