Thanks to visit codestin.com
Credit goes to github.com

Skip to content

imsks/Saransh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ฐ Saransh - AI News App

An AI-powered news aggregation app inspired by InShorts, built with FastAPI and modern AI technologies.

๐ŸŽฏ What is Saransh?

Saransh is an open-source alternative to InShorts that uses AI to:

  • Scrape and process Indian news articles
  • Categorize and summarize news content
  • Provide intelligent news recommendations
  • Create 60-word summaries using AI

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • PostgreSQL (for production)
  • Redis (optional, for caching)

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd Saransh
  2. Create the Virtual Environment

    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies

    CREATE requirements.in
    pip-compile requirements.in
    pip install -r requirements.txt
    pip freeze > requirements.txt
  4. Setup environment variables

    # Copy the example environment file
    cp env.example .env
    
    # Edit .env with your configuration
    nano .env
  5. Run the application

    uvicorn main:app --host 0.0.0.0 --port 8000 --reload
  6. Access the application

โš™๏ธ Configuration

Environment Variables

Create a .env file in the root directory with the following variables:

# Database Configuration
DATABASE_URL=postgresql://username:password@localhost:5432/saransh_db

# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here

# Application Configuration
APP_ENV=development
DEBUG=True
LOG_LEVEL=INFO

# Server Configuration
HOST=0.0.0.0
PORT=8000

# Redis Configuration (for caching later)
REDIS_URL=redis://localhost:6379

Required API Keys

๐Ÿ“ Project Structure

Saransh/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ agents/          # AI agents and LangChain integration
โ”‚   โ”œโ”€โ”€ api/             # API routes and endpoints
โ”‚   โ”œโ”€โ”€ db/              # Database models and connections
โ”‚   โ”œโ”€โ”€ processors/      # News processing and cleaning
โ”‚   โ”œโ”€โ”€ scrapers/        # News scraping modules
โ”‚   โ”œโ”€โ”€ utils/           # Utility functions
โ”‚   โ””โ”€โ”€ config.py        # Configuration management
โ”œโ”€โ”€ main.py              # Application entry point
โ”œโ”€โ”€ requirements.txt     # Python dependencies
โ”œโ”€โ”€ env.example          # Environment variables template
โ””โ”€โ”€ readme.md           # This file

๐Ÿ”ง Development

Running in Development Mode

python main.py

The app will run with:

  • Auto-reload enabled
  • Debug mode on
  • Detailed logging

Running in Production

# Set environment to production
export APP_ENV=production
export DEBUG=False

# Run with uvicorn directly
uvicorn main:app --host 0.0.0.0 --port 8000

๐Ÿงช Testing

Health Check

curl http://localhost:8000/health

Expected response:

{
    "status": "healthy",
    "timestamp": "2024-01-01T12:00:00",
    "service": "saransh-news-app",
    "environment": "development"
}

๐Ÿ“‹ Roadmap

  • Project setup and structure
  • Basic FastAPI application
  • Environment configuration
  • Database setup and models
  • News scraping functionality
  • AI-powered content processing
  • RAG (Retrieval-Augmented Generation) system
  • API endpoints for news retrieval
  • Docker containerization
  • Production deployment

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ†˜ Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Join our community discussions

Built with โค๏ธ for the AI and news community

About

An Open Source Alternative to InShorts. News For Bharat ๐Ÿ‡ฎ๐Ÿ‡ณ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages