This project is a React application built with Vite that utilizes the Gemini API to generate a dynamic blog page. The blog content updates every 3 hours, providing fresh and relevant information to users.
The project is organized as follows:
gemini-blog
├── src
│ ├── components # Contains reusable components
│ │ ├── Home.jsx # Landing page component
│ │ ├── Blog.jsx # Blog content component
│ │ ├── About.jsx # About page component
│ │ ├── Header.jsx # Navigation header component
│ │ ├── Footer.jsx # Footer component
│ │ └── layout
│ │ └── MainLayout.jsx # Main layout component
│ ├── services # API interaction services
│ │ └── geminiApi.js # Functions to fetch data from the Gemini API
│ ├── hooks # Custom hooks
│ │ └── useBlogContent.js # Hook for managing blog content fetching
│ ├── utils # Utility functions
│ │ └── formatters.js # Functions for formatting content
│ ├── assets
│ │ └── styles
│ │ └── animations.js # Animation styles using Framer Motion
│ ├── pages # Page components
│ │ ├── HomePage.jsx # Renders Home component
│ │ ├── BlogPage.jsx # Renders Blog component
│ │ └── AboutPage.jsx # Renders About component
│ ├── App.jsx # Main application component
│ ├── main.jsx # Entry point of the application
│ └── index.css # Global styles and Tailwind CSS imports
├── public
│ └── favicon.svg # Favicon for the application
├── .env.example # Template for environment variables
├── index.html # Main HTML template
├── package.json # npm configuration file
├── vite.config.js # Vite configuration file
├── tailwind.config.js # Tailwind CSS configuration
├── postcss.config.js # PostCSS configuration
└── README.md # Project documentation
-
Clone the repository:
git clone <repository-url> cd gemini-blog
-
Install dependencies:
npm install
-
Create a
.env
file: Copy the.env.example
file to.env
and add your Gemini API credentials. -
Run the application:
npm run dev
-
Open your browser: Navigate to
http://localhost:3000
to view the application.
- The Home page provides an introduction and links to the blog and about pages.
- The Blog page displays content fetched from the Gemini API, updating every 3 hours.
- The About page contains information about the project and its purpose.
- React
- Vite
- Tailwind CSS
- Framer Motion
- Gemini API
This project is licensed under the MIT License.