Overview Project
StoryCraft is a web-based application that allows users to generate short stories based on the desired genre and word count. This app uses Google's Gemini API to automatically generate stories with a modern and responsive interface with React and TailwindCSS.
Preview Project

Main Features
- Genres Select: Users can select genres such as Fantasy, Sci-Fi, Mystery, Adventure, or Romance.
- Define Word Count: Users can choose the length of the story (100-500 words).
- Generate Story: Uses the Gemini API to generate stories based on user preferences.
- Copy to Clipboard: Copy the generated story to the clipboard for use elsewhere.
- Responsive UI: Design a responsive and modern interface using TailwindCSS.
- Error Handling: Error notifications if problems occur while connecting to the API.
Technologies Used
- React.js: The main framework for building applications.
- TailwindCSS: CSS library for styling the user interface.
- Gemini API: API for generating stories based on genre and length.
Installation
This project was built using React and TailwindCSS. It is a web application and for running on your local environment you should follow these guidelines.
Prerequisites:
Prerequisites:
- NPM
How to install StoryCraft:
1. Clone repository.
git clone https://github.com/AcilRestu12/StoryCraft.git cd StoryCraft
2. Install dependencies.
npm install
3. Configure API Key.
- Copy the .env.example file and rename it to .env.
cp .env.example .env
- Add your Gemini API key to the .env file.
REACT_APP_GEMINI_API_KEY=your_gemini_api_key_here
4. Run the application.
npm start
Usage
- Open the app in your browser at http://localhost:3000.
- Select the genre of the story in the dropdown.
- Use the slider to specify the desired number of words (100-500).
- Click the “Generate Story” button to generate the story.
- Once the story appears, you can copy it with the “Copy Story” button.
Contribution
Contributions are welcome! If you’d like to contribute, please fork this repository and submit a pull request.
Contact
License
The project is licensed under the MIT license - see the LICENSE file for more details.