News scraped every 5 minutes, translated to Telugu ā 100% FREE
š Live Demo: https://news-website-2ev.pages.dev
Cloudflare Pages Function (scheduled via Cron Trigger)
ā
scraper ā fetches 24 Indian RSS feeds
ā
translator ā Google Translate ā Telugu (free)
ā
Firebase Firestore (stores articles)
ā
Svelte + Vite (frontend reads from Firestore)
ā
Cloudflare Pages (hosting + CDN)
Sveltenpm run builddist# Install Wrangler CLI
npm install -g wrangler
# Login to Cloudflare
wrangler login
# Build the project
npm run build
# Deploy to Cloudflare Pages
wrangler pages deploy dist --project-name=telugu-news-app
In Cloudflare Dashboard ā Pages ā Your Project ā Settings ā Environment Variables:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=123456789
VITE_FIREBASE_APP_ID=1:...:web:...
FIREBASE_SERVICE_ACCOUNT={"type":"service_account",...} ā Full JSON from Step 1
0 */5 * * * * (every 5 minutes)[triggers]
crons = ["0 */5 * * * *"]
Then deploy:
wrangler pages deploy dist --project-name=telugu-news-app
telugu-news-app/
āāā src/
ā āāā components/
ā ā āāā NewsCard.svelte
ā ā āāā CategoryFilter.svelte
ā ā āāā Header.svelte
ā ā āāā Loading.svelte
ā āāā App.svelte
ā āāā main.js
ā āāā firebase.js
ā āāā 404.html ā SPA routing fallback
āāā functions/
ā āāā scrape.js ā Main scraper logic
ā āāā scheduled-scrape.js ā Scheduled trigger handler
ā āāā [[path]].js ā SPA rewrite function (prevents 404s)
ā āāā package.json
āāā public/
ā āāā _routes.json ā Cloudflare Pages routing rules
āāā data/ ā Static data files
āāā dist/ ā Build output (auto-generated)
āāā package.json
āāā vite.config.js
āāā svelte.config.js
āāā README.md
| Service | Free Tier Limit | Cost |
|---|---|---|
| Firebase Firestore | 50K reads/day, 1GB storage | ā¹0 |
| Cloudflare Pages | Unlimited requests, 100GB bandwidth/month | ā¹0 |
| Cloudflare Workers | 100K requests/day | ā¹0 |
| Google Translate API | 500K chars/month | ā¹0 |
| Total | ā¹0/month |
# Install root dependencies
npm install
# Install functions dependencies
cd functions && npm install && cd ..
# Run development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Build
npm run build
# Deploy
wrangler pages deploy dist --project-name=telugu-news-app
.env files or Firebase service account keys to Git.env.example as a template for local developmentFIREBASE_SERVICE_ACCOUNT in Cloudflare Pages environment variables onlyCloudflare Pages uses [[path]].js function to rewrite all routes to index.html for SPA client-side routing. Ensure:
functions/[[path]].js existsdist/FIREBASE_SERVICE_ACCOUNT environment variable is set correctly# Clear cache and rebuild
rm -rf dist node_modules
npm install
npm run build
MIT License - Free for personal and commercial use
Built with ā¤ļø for Telugu readers worldwide