Skip to content

AI-powered web app that delivers personalized affirmations based on your current mood. Built with React on the frontend and Node.js (Express) on the backend, it uses the OpenAI API to generate calming, poetic, and emotionally resonant affirmations in real time.

Notifications You must be signed in to change notification settings

neha9029/affirmation-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI-powered web app that delivers personalized affirmations based on your current mood. Built with React on the frontend and Node.js (Express) on the backend, it uses the OpenAI API to generate calming, poetic, and emotionally resonant affirmations in real time.

๐Ÿš€ Quick Start

Live demo - https://neha9029.github.io/affirmation-generator/

๐Ÿ–ฅ๏ธ 1. Clone the repository

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

โš™๏ธ 2. Backend Setup (Node.js + Express)

cd server npm install

Create a .env file inside the server/ directory:

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PORT=3001

Then run npm start Your backend server will run on: http://localhost:3001

๐ŸŽจ 3. Frontend Setup (React)

Open a new terminal tab or window:

cd client npm install

Create a .env file inside the client/ directory: REACT_APP_BACKEND_URL=http://localhost:3001

Then start the React app: npm start

Visit the app in your browser at: http://localhost:3000

๐Ÿ›  Technologies Used

Frontend - React (CRA) Axios CSS Flexbox Conditional rendering (loading, affirmation)

Backend - Node.js Express.js OpenAI GPT-3.5 dotenv CORS Axios

About

AI-powered web app that delivers personalized affirmations based on your current mood. Built with React on the frontend and Node.js (Express) on the backend, it uses the OpenAI API to generate calming, poetic, and emotionally resonant affirmations in real time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published