MuseMind is an AI-powered web application that transforms your feelings, emotions, and mood into personalised poems. Choose a theme, type your prompt, and let AI weave your words into art that captures how you feel and thoughtfully expresses it.
Have you ever felt something deeply but could not find the words to express it? Thatβs where MuseMind fits in, in the quiet spaces between emotion and language.
We wanted to build something that does not just generate text, but transforms feeling into form. MuseMind explores how AI can become a creative partner, helping anyone find the words to give what is in their heart artistic shape through language.
Try MuseMind now - No installation required!
π Live Demo: MuseMind
Click the link above to start creating personalised poems! ππ¨π
Three Themes. One Custom Creation:
- π LoveLines
- π¨ MoodVerse
- π SoulScript
AI-Powered Generation - Utilises Google Gemini API for intelligent, contextual poem creation.
Real-time Generation - Watch your poem appear with smooth typewriter animation.
Beautiful Themed UI - Each theme has its own unique visual aesthetic.
Responsive Design - Works seamlessly on desktop, tablet, and mobile devices.
- User selects a theme (LoveLines, SoulScript, or MoodVerse).
- User is redirected to the page where the poem will be generated and has to type an idea, emotion, or thought into the input field.
- MuseMind combines a fixed prompt template with user input.
- The backend sends this prompt to Geminiβs API.
- The AI returns a unique and beautiful poem matching the chosen theme and feelings.
- Users can regenerate another poem by clicking the "Generate" button again.
| Theme | Description | Tone |
|---|---|---|
| LoveLines (Pinks, roses and whites) | Heartfelt poems for loved ones. | Romantic, emotional, and warm. |
| MoodVerse (Neon pinks, cyans, deep purples) | Expressive poems based on your current feelings or mood. | Emotive and expressive. |
| SoulScript (Purples, muted tones and background) | Affirming and kind words to positively influence one's sense of self. | Assuring, uplifting and gentle. |
Landing page:
Users are prompted to click on the type of poem they want from the three given options
LoveLines Theme Landing Page (all Theme Pages have the same format/structure and functionality)
If there is no prompt, the user will be prompted to add text
LoveLines- Generated Poem
After a poem is generated, users can Select and Copy poem to paste onto the Clipboard or message. Users can also regenerate another poem by clicking the "Generate" button again
Frontend:
- HTML β Structure and content.
- CSS β Styling and responsiveness.
- JavaScript β Interactivity and user input handling.
Backend:
- Node.js + Express.js β Runs JavaScript on the server and handles API requests.
- Gemini API β Powers AI poem generation (gemini-2.0-flash model).
- Axios - HTTP client for API requests.
- CORS - Cross-origin resource sharing.
- dotenv - Environment variable management.
Deployment
- Frontend: Hosted on Netlify.
- Backend API: Hosted on Render.
Note: MuseMind is already live at https://transcendent-croissant-e3163c.netlify.app/
These instructions are for running the project on your local machine for development.
Prerequisites
Node.js (v14 or higher).
npm (comes with Node.js.
Google Gemini API key Get one here.
1. Clone the Repository
Open your terminal and run:
git clone https://github.com/luyandazuma/Week2-AIPoemGenerator.git
cd Week2-AIPoemGenerator2. Install Backend Dependencies
cd server
npm install3. Configure Environment Variables
Create a .env file in the server folder.
Copy the content from .env.example into your new .env file.
Add your Gemini API key:
GEMINI_API_KEY=your_actual_gemini_api_key_here
4. Start the Backend Server:
npm run devThe backend will run on http://localhost:3000 by default.
5. Serve the Frontend Open a new terminal window:
cd ../public
npx http-server -p 8080Or use the Live Server extension in VS Code.
The frontend will run on http://localhost:8080.
6. Open in Browser
Navigate to http://localhost:8080 and start creating poems!
This project is deployed using:
- Frontend: Netlify (serves static files from
public/folder). - Backend: Render (Node.js/Express server from
server/folder).
Backend (Render):
- Create an account at Render.
- New Web Service β Connect Git repo.
- Root Directory:
server. - Build:
npm install. - Start:
npm start. - Add
GEMINI_API_KEYenvironment variable.
Frontend (Netlify):
- Create an account at Netlify.
- Import from Git or drag the
public/folder. - Base Directory:
public. - Publish Directory:
public. - Update API URLs in JS files to point to your backend.
Backend Endpoints
Health Check
GET /api/health
Returns server status and timestamp.
Generate Poem
POST /api/generate-poem
Content-Type: application/json
Body:
{
"userInput": "string", // User's feelings or thoughts.
"theme": "string" // "lovelines" | "moodverse" | "soulscript"
}
Response:
{
"success": true,
"poem": "string", // Generated poem text.
"theme": "string",
"timestamp": "string"
}
Week2-AIPoemGenerator/
βββ public/ # Frontend files.
β βββ index.html # Landing page.
β βββ lovelines.html # LoveLines theme page.
β βββ moodverse.html # MoodVerse theme page.
β βββ soulscript.html # SoulScript theme page.
β βββ styles/
β β βββ styles.css # Base styles.
β β βββ themes.css # Theme-specific styles.
β βββ Script/
β βββ landing.js # Landing page logic.
β βββ lovelines.js # LoveLines functionality.
β βββ moodverse.js # MoodVerse functionality.
β βββ soulscript.js # SoulScript functionality.
β
βββ server/ # Backend files.
β βββ server.js # Express server & API logic.
β βββ package.json # Dependencies.
β βββ .env.example # Environment variables template.
β βββ .gitignore # Git ignore rules.
β
βββ README.md # This file.
βοΈ Always use an .env.example as a template for team members.
βοΈ Regenerate API keys if accidentally exposed.
βοΈ Use environment variables for all secrets.
This project was created as part of a coding bootcamp group's generative AI project.
If you encounter any issues:
- Check that your Gemini API key is valid.
- Ensure both frontend and backend servers are running.
- Check browser console for errors.
| Member | Role | Responsibilities |
|---|---|---|
| Aobakwe Modillane | Frontend Developer. | Web content creation and page styling. |
| Boikanyo Maswi | Junior Developer. | README.md, interactivity and user input handling, GitHub About section. |
| Luyanda Zuma | Scrum Master. | Project management, repository setup, interactivity and user input handling, documentation. |
| Nqobile Masombuka | Fullstack Developer. | Page styling, Backend Integration & API Development, Application deployment, documentation, README.md. |

