A full-stack, cross-platform news application for Coastal Karnataka, featuring lightning-fast performance, beautiful design, and comprehensive monetization strategies.
Clone the repository
git clone https://github.com/yourusername/news-near-me.git
cd news-near-me
Install dependencies
npm install
Set up environment variables
cp .env.example .env.local
Edit .env.local with your configuration:
# App Configuration
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# AdSense Configuration
NEXT_PUBLIC_ADSENSE_CLIENT_ID=ca-pub-1234567890123456
NEXT_PUBLIC_ADSENSE_AD_UNIT_ID=1234567890
# Analytics
NEXT_PUBLIC_GA_TRACKING_ID=G-XXXXXXXXXX
# Firebase (for mobile)
FIREBASE_API_KEY=your-api-key
FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
FIREBASE_PROJECT_ID=your-project-id
# Sentry
SENTRY_DSN=https://your-sentry-dsn
Run development server
npm run dev
Open your browser Navigate to http://localhost:3000
# Install Expo CLI globally
npm install -g @expo/cli
# Start Expo development server
npm run web # Web version
npm run ios # iOS simulator
npm run android # Android emulator
# Build for production
npm run build
npm run export
# Add platforms
npx cap add ios
npx cap add android
# Sync and open
npx cap sync
npx cap open ios # Opens Xcode
npx cap open android # Opens Android Studio
# Build for production
npm run build
# Export static site
npm run export
# Start production server
npm start
# Build with Expo EAS
eas build --platform ios
eas build --platform android
# Submit to stores
eas submit --platform ios
eas submit --platform android
iOS App Store:
eas build --platform ioseas submit --platform iosGoogle Play Store:
eas build --platform androideas submit --platform androidUpdate ad configuration in src/types/index.ts:
ads: {
enabled: true,
provider: 'adsense', // or 'admob'
adUnitId: 'your-ad-unit-id',
frequency: 5 // Show ad every 5 articles
}
The app fetches news from Daijiworld RSS feed. To change the source:
DEFAULT_RSS_URL in src/services/fetchRss.tssrc/utils/parseRss.tssrc/utils/categoryMap.ts# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run linting
npm run lint
# Type checking
npm run type-check
src/
βββ components/ # React components
β βββ NewsCard.tsx # News article card
β βββ SkeletonCard.tsx # Loading skeleton
β βββ AdBanner.tsx # Ad display component
β βββ Header.tsx # Navigation header
βββ pages/ # Next.js pages
β βββ api/ # API routes
β βββ _app.tsx # App wrapper
β βββ index.tsx # Homepage
βββ services/ # Data services
β βββ fetchRss.ts # RSS fetching logic
βββ utils/ # Utility functions
β βββ parseRss.ts # RSS parsing utilities
β βββ categoryMap.ts # Category configuration
βββ types/ # TypeScript types
β βββ index.ts # Type definitions
βββ styles/ # Global styles
βββ globals.css # Tailwind + custom CSS
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ for Coastal Karnataka
TypeScript
87.8%
JavaScript
10.2%
CSS
2.0%
A full-stack, cross-platform news application for Coastal Karnataka, featuring lightning-fast performance, beautiful design, and comprehensive monetization strategies.
Clone the repository
git clone https://github.com/yourusername/news-near-me.git
cd news-near-me
Install dependencies
npm install
Set up environment variables
cp .env.example .env.local
Edit .env.local with your configuration:
# App Configuration
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# AdSense Configuration
NEXT_PUBLIC_ADSENSE_CLIENT_ID=ca-pub-1234567890123456
NEXT_PUBLIC_ADSENSE_AD_UNIT_ID=1234567890
# Analytics
NEXT_PUBLIC_GA_TRACKING_ID=G-XXXXXXXXXX
# Firebase (for mobile)
FIREBASE_API_KEY=your-api-key
FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
FIREBASE_PROJECT_ID=your-project-id
# Sentry
SENTRY_DSN=https://your-sentry-dsn
Run development server
npm run dev
Open your browser Navigate to http://localhost:3000
# Install Expo CLI globally
npm install -g @expo/cli
# Start Expo development server
npm run web # Web version
npm run ios # iOS simulator
npm run android # Android emulator
# Build for production
npm run build
npm run export
# Add platforms
npx cap add ios
npx cap add android
# Sync and open
npx cap sync
npx cap open ios # Opens Xcode
npx cap open android # Opens Android Studio
# Build for production
npm run build
# Export static site
npm run export
# Start production server
npm start
# Build with Expo EAS
eas build --platform ios
eas build --platform android
# Submit to stores
eas submit --platform ios
eas submit --platform android
iOS App Store:
eas build --platform ioseas submit --platform iosGoogle Play Store:
eas build --platform androideas submit --platform androidUpdate ad configuration in src/types/index.ts:
ads: {
enabled: true,
provider: 'adsense', // or 'admob'
adUnitId: 'your-ad-unit-id',
frequency: 5 // Show ad every 5 articles
}
The app fetches news from Daijiworld RSS feed. To change the source:
DEFAULT_RSS_URL in src/services/fetchRss.tssrc/utils/parseRss.tssrc/utils/categoryMap.ts# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run linting
npm run lint
# Type checking
npm run type-check
src/
βββ components/ # React components
β βββ NewsCard.tsx # News article card
β βββ SkeletonCard.tsx # Loading skeleton
β βββ AdBanner.tsx # Ad display component
β βββ Header.tsx # Navigation header
βββ pages/ # Next.js pages
β βββ api/ # API routes
β βββ _app.tsx # App wrapper
β βββ index.tsx # Homepage
βββ services/ # Data services
β βββ fetchRss.ts # RSS fetching logic
βββ utils/ # Utility functions
β βββ parseRss.ts # RSS parsing utilities
β βββ categoryMap.ts # Category configuration
βββ types/ # TypeScript types
β βββ index.ts # Type definitions
βββ styles/ # Global styles
βββ globals.css # Tailwind + custom CSS
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ for Coastal Karnataka
TypeScript
87.8%
JavaScript
10.2%
CSS
2.0%