A thoughtful, AI-powered message generator designed to strengthen connections.
The Night Message Generator is a sophisticated web application that leverages Google's Gemini AI to craft personalized, emotionally resonant "Good Night" messages. Unlike generic message generators, this tool allows users to fine-tune the tone, sincerity, and style of the messages, making them feel authentic and human.
It is built with a focus on modern web standards, security, and component-driven architecture.
- 🎨 Deep Personalization: Control message length, sincerity level (Formal to Intimate), and emotional tone.
- 🌍 Multi-Language Support: Instant generation in Turkish, Azerbaijani, English, German, and Russian.
- 🎭 Humanizer Engine: Adjustable "Misspelling" and "Slang" sliders to mimic natural, casual texting.
- 🌓 Adaptive UI: Seamless Dark/Light mode with a glassmorphic, mobile-responsive design.
- ⚡ Real-Time Generation: Powered by Gemini 2.5 Flash for sub-second responses.
This project demonstrates meaningful software engineering practices suitable for scalable, maintainable production environments.
To prevent API key exposure in the frontend, a Serverless Proxy architecture was implemented using Netlify Functions.
- Problem: Storing API keys in client-side code (
VITE_GEMINI_API_KEY) exposes them to theft. - Solution: The frontend requests a local endpoint (
/api/generate), which Netlify redirects to a secure server-side function (netlify/functions/generate.js). The API key never leaves the server environment.
The UI codebase is structured using Atomic Design principles to ensure reusability and clarity:
- 🧪 Atoms: Basic building blocks (buttons, inputs).
- 🧬 Molecules: Groups of atoms (e.g.,
status_message.js). - 🤖 Organisms: Complex UI sections (e.g.,
side_menu.js,card_carousel.js). - 📄 Orchestrator:
ui_manager.jsmanages state and coordination.
Maintainability is enforcing through strict naming conventions:
- Files:
snake_case.js(e.g.,gemini_service.js) - Functions:
F_Pascal_Case(e.g.,F_Generate_Messages) - Classes:
C_Pascal_Case(e.g.,C_State_Manager) - Variables:
snake_case(local),Snake_Case(global constants)
- Node.js (v18+)
- npm
-
Clone the repository:
git clone https://github.com/beydah/night-message-generator.git cd night-message-generator -
Install dependencies:
npm install
-
Setup Environment Variables: Create a
.envfile in the root directory:# Only for local development if not using Netlify Dev VITE_GEMINI_API_KEY=your_actual_api_key_here
-
Run Locally:
npm run dev
-
Build for Production:
npm run build
Beydah Saglam
Software Engineer
Website | GitHub | LinkedIn
Verified Production Build: February 2026 ✅