AI-Powered Real-Time News, Chat, and Analytics Platform
CivicPulse is a comprehensive web application that delivers AI-enhanced news summaries, contextual chatbot interactions, and real-time user analytics. Built with Google's Gemini 1.5 Flash API and Firebase Realtime Database, it provides an interactive experience for users who want to stay updated with the latest technology and startup news while tracking their activity metrics.
- π€ AI-Enhanced News Summaries: Get intelligent summaries of the latest tech and startup news
- π¬ Contextual Chatbot: Interactive AI chat powered by Google Gemini 1.5 Flash
- π Real-Time Analytics: Track user activity and engagement metrics
- π€οΈ Weather Integration: Enriched conversations with live weather data
- π Stock Market Data: Real-time stock price updates and market information
- π₯ Firebase Integration: Seamless authentication and real-time data synchronization
- Frontend: React v19 with Vite
- Package Manager: Bun
- AI/ML: Google Gemini 1.5 Flash API
- Database: Firebase Realtime Database
- Authentication: Firebase Auth
- News API: GNews API
- Weather API: OpenWeatherMap
- Stock API: TwelveData
- Node.js (v18 or higher)
- Bun (latest version)
- Firebase account
- API keys for all required services
-
Clone the repository
git clone https://github.com/sarthakpatil/civicpulse.git cd civicpulse
-
Install dependencies
bun install
-
Set up environment variables
Create a
.env
file in the root directory and add the following variables:VITE_GEMINI_API_KEY=your_gemini_api_key_here VITE_GNEWS_API_KEY=your_gnews_api_key_here VITE_FIREBASE_API_KEY=your_firebase_api_key_here VITE_FIREBASE_AUTH_DOMAIN=yourapp.firebaseapp.com VITE_FIREBASE_DB_URL=https://yourapp-default-rtdb.firebaseio.com VITE_FIREBASE_PROJECT_ID=your-firebase-project-id VITE_FIREBASE_STORAGE_BUCKET=yourapp.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id VITE_FIREBASE_APP_ID=your-firebase-app-id VITE_FIREBASE_MEASUREMENT_ID=your-measurement-id VITE_OPENWEATHER_API_KEY=your_openweather_api_key_here VITE_TWELVEDATA_API_KEY=your_twelvedata_api_key_here
-
Start the development server
bun run dev
Service | Purpose | Get API Key |
---|---|---|
Google Gemini 1.5 Flash | AI blog generation and chat responses | Google Cloud Console |
GNews | Real-time technology and startup news | GNews API |
Firebase | Authentication, database, and analytics | Firebase Console |
OpenWeatherMap | Live weather data for chat context | OpenWeatherMap |
TwelveData | Real-time stock market data | TwelveData |
Variable | Description | Required |
---|---|---|
VITE_GEMINI_API_KEY |
Powers AI features and chat responses | β |
VITE_GNEWS_API_KEY |
Fetches technology and startup news | β |
VITE_FIREBASE_API_KEY |
Firebase project authentication | β |
VITE_FIREBASE_AUTH_DOMAIN |
Firebase authentication domain | β |
VITE_FIREBASE_DB_URL |
Firebase Realtime Database URL | β |
VITE_FIREBASE_PROJECT_ID |
Unique Firebase project identifier | β |
VITE_FIREBASE_STORAGE_BUCKET |
Firebase storage bucket | |
VITE_FIREBASE_MESSAGING_SENDER_ID |
Firebase Cloud Messaging ID | |
VITE_FIREBASE_APP_ID |
Firebase app initialization ID | β |
VITE_FIREBASE_MEASUREMENT_ID |
Firebase Analytics measurement ID | |
VITE_OPENWEATHER_API_KEY |
Weather data integration | β |
VITE_TWELVEDATA_API_KEY |
Stock market data integration | β |
Note: β = Required,
β οΈ = Optional but recommended
civicpulse/
βββ src/
β βββ components/ # React components
β βββ services/ # API services and utilities
β βββ hooks/ # Custom React hooks
β βββ utils/ # Helper functions
β βββ styles/ # CSS and styling files
βββ public/ # Static assets
βββ .env # Environment variables
βββ vite.config.js # Vite configuration
βββ package.json # Dependencies and scripts
bun run dev
- Start development serverbun run build
- Build for productionbun run preview
- Preview production buildbun run lint
- Run ESLintbun test
- Run tests
-
Build the project
bun run build
-
Deploy to Firebase
firebase deploy
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push
- Environment Variables: Never commit your
.env
file or API keys to public repositories - API Key Management: Use environment variables with the
VITE_
prefix for client-side access - Firebase Security: Configure Firebase security rules for database access
- Rate Limiting: Implement rate limiting for API calls to prevent abuse
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for powering intelligent conversations
- Firebase for seamless backend services
- GNews API for real-time news data
- OpenWeatherMap for weather integration
- TwelveData for stock market data
If you encounter any issues or have questions, please:
- Check the Issues page
- Create a new issue if your problem isn't already reported
- Provide detailed information about your environment and the issue
- Contact the maintainer: sarthakpaitl.ug@gmail.com
Sarthak Tulsidas Patil
- Email: sarthakpaitl.ug@gmail.com
- Founder of Falcons Tech Community, NMIET
- GitHub: @sarthakpatil