Modern dashboard with top stories and weather widget
Browse news by categories with beautiful card layouts
Fully responsive design for all devices
- 🌍 Multi-Country Support - News from USA, UK, India, Canada
- 📂 Multiple Categories - Business, Technology, Sports, Health, Science, Entertainment, General
- 🔍 Search Functionality - Find news articles by keywords
- 🌤️ Weather Widget - Real-time weather with city search
- 📱 Fully Responsive - Works perfectly on desktop, tablet, and mobile
- 🎨 Modern UI/UX - Beautiful gradient design with smooth animations
- 🔐 Secure - Environment variables for API keys
- ♿ Accessible - WCAG compliant design
Before you begin, ensure you have:
- Node.js (v14 or higher)
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/Open-Source-Chandigarh/Atmos cd news-app -
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:VITE_NEWS_API_KEY=your_news_api_key_here VITE_WEATHER_API_KEY=your_weather_api_key_here
-
Get your API keys
News API:
- Visit NewsAPI.org
- Sign up for a free account
- Copy your API key
- Free tier: 100 requests/day
Weather API:
- Visit OpenWeatherMap
- Sign up for a free account
- Copy your API key
- Free tier: 1,000 requests/day
-
Start the development server
npm start
-
Open your browser
Navigate to http://localhost:3000
| Technology | Purpose |
|---|---|
| React | Frontend framework |
| Redux | State management |
| React Router | Navigation |
| NewsAPI | News data source |
| OpenWeatherMap API | Weather data |
| Vite | Build tool |
news-app/
├── public/
│ └── index.html
├── src/
│ ├── CSS/
│ │ ├── Header.css
│ │ ├── HomePage.css
│ │ ├── HomepageNews.css
│ │ ├── FeaturedNews.css
│ │ ├── NewsBar.css
│ │ ├── NewsItem.css
│ │ ├── Weather.css
│ │ └── Footer.css
│ ├── Store/
│ │ ├── Action-creator/
│ │ │ └── index.js
│ │ ├── reducer/
│ │ │ ├── countryReducer.js
│ │ │ └── index.js
│ │ ├── store.js
│ │ └── index.js
│ ├── assets/
│ │ └── Atmos_Logo-removebg-preview.png
│ ├── App.css
│ ├── App.jsx
│ ├── Header.jsx
│ ├── Footer.jsx
│ ├── HomePage.jsx
│ ├── HomepageNews.jsx
│ ├── FeaturedNews.jsx
│ ├── NewsBar.jsx
│ ├── NewsItem.jsx
│ ├── Weather.jsx
│ ├── index.css
│ └── main.jsx
├── .env.example
├── .gitignore
├── package.json
├── vite.config.js
└── README.md
- Homepage - View top stories and weather
- Categories - Click navigation links to browse by category
- Countries - Use flag buttons to switch between countries
- Articles - Click any article card to read full story
- Enter any city name in the search box
- Press Enter or click the search button
- View current temperature, conditions, and details
- Use the search bar on homepage
- Enter keywords (e.g., "technology", "bitcoin")
- View filtered results
Create a .env file in the root directory:
# News API Key
VITE_NEWS_API_KEY=your_news_api_key_here
# Weather API Key
VITE_WEATHER_API_KEY=your_weather_api_key_here.env file to Git. It's already in .gitignore.
- Push your code to GitHub
- Go to Vercel
- Click "New Project"
- Import your repository
- Add environment variables:
VITE_NEWS_API_KEYVITE_WEATHER_API_KEY
- Click "Deploy"
Your app will be live in ~2 minutes!
- Build your project:
npm run build
- Go to Netlify
- Drag and drop the
buildfolder - Add environment variables in site settings
-
Install gh-pages:
npm install gh-pages --save-dev
-
Add to
package.json:"homepage": "https://yourusername.github.io/news-app", "scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build" }
-
Deploy:
npm run deploy
Primary Gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
Background: linear-gradient(135deg, #1e1e2e 0%, #2d1b4e 50%, #1e1e2e 100%)
Card Background: rgba(255, 255, 255, 0.05)
Text Primary: #ffffff
Text Secondary: rgba(255, 255, 255, 0.7)Contributions are welcome! Here's how you can help:
- Fork the project
- Create your 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
- Follow existing code style
- Test thoroughly before submitting PR
- Update README if adding new features
- Don't commit API keys or
.envfile
- NewsAPI free tier has rate limits (100 requests/day)
- Some news sources may not have images
- Weather API coordinates may vary for cities with same names
- Bookmarks/Save articles
- Dark/Light mode toggle
- AI news summarizer
- Push notifications
- Social media sharing
- Reading history
- Personalized news feed
- Multi-language support
- Voice commands
- Offline mode (PWA)
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: 150202-Pratham
- LinkedIn: Pratham Garg
- Email: prathamgarg1502@gmail.com
- NewsAPI for providing news data
- OpenWeatherMap for weather data
- React team for amazing framework
- Redux for state management
- All contributors who help improve this project
If you have any questions or issues:
- Open an Issue
- Contact me on LinkedIn
- Email: prathamgarg1502@gmail.com
Give a ⭐ if this project helped you!
Made with ❤️ by Pratham
