Skip to content

A modern full-stack application that generates personalized daily astrological insights based on birth details. Features a clean FastAPI backend and a beautiful React frontend with modern UI design.

Notifications You must be signed in to change notification settings

nranjan21/AstroInsights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ Astrological Insight Generator

A modern full-stack application that generates personalized daily astrological insights based on birth details. Features a clean FastAPI backend and a beautiful React frontend with modern UI design.

🌟 Features

  • Zodiac Inference: Automatically determines zodiac sign from birth date
  • Personalized Insights: Zodiac-specific daily insights with multiple variations
  • Multi-language Support: English and Hindi with proper translations
  • Modern UI: Beautiful React frontend with animations and responsive design
  • REST API: Clean FastAPI backend with automatic documentation
  • CLI Tool: Command-line interface for quick insights
  • Caching: Daily in-memory cache for better performance
  • No External Dependencies: Self-contained with no API keys required

🏗️ Project Structure

├── backend/                 # FastAPI backend
│   ├── app/
│   │   ├── core/           # Core logic (zodiac inference)
│   │   ├── services/       # Business logic (insights, cache, translation)
│   │   ├── interfaces/     # API schemas
│   │   └── utils/          # Utilities
│   ├── cli.py              # Command-line interface
│   ├── requirements.txt    # Python dependencies
│   └── README.md           # Backend documentation
├── frontend/               # React/Next.js frontend
│   ├── src/
│   │   ├── app/            # Next.js app router
│   │   ├── components/     # React components
│   │   ├── lib/            # Utilities and API client
│   │   └── types/          # TypeScript types
│   ├── package.json        # Node.js dependencies
│   └── README.md           # Frontend documentation
└── README.md               # This file

🚀 Quick Start

Backend Setup

# Navigate to backend
cd backend

# Create virtual environment
python -m venv .venv
.venv\Scripts\activate  # Windows PowerShell: .venv\Scripts\Activate.ps1

# Install dependencies
pip install -r requirements.txt

# Start the server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

# Navigate to frontend (in a new terminal)
cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

CLI Usage

# From backend directory
python cli.py --name "Ritika" --birth_date "1995-08-20" --birth_time "14:30" --birth_place "Jaipur, India" --language en

🌐 API Usage

Health Check

curl http://localhost:8000/health

Get Insight

curl -X POST http://localhost:8000/predict \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ritika",
    "birth_date": "1995-08-20",
    "birth_time": "14:30",
    "birth_place": "Jaipur, India",
    "language": "en"
  }'

API Documentation

Visit http://localhost:8000/docs for interactive API documentation.

🎨 Frontend

The frontend is a modern React application built with:

  • Next.js 15 with App Router
  • Tailwind CSS for styling
  • Framer Motion for animations
  • TypeScript for type safety
  • Lucide React for icons

Access at http://localhost:3000

🔧 Configuration

Environment Variables

Backend:

  • No required environment variables
  • All configuration uses sensible defaults

Frontend:

  • NEXT_PUBLIC_API_URL - Backend API URL (default: http://localhost:8000)

📝 Sample Output

{
  "zodiac": "Leo",
  "insight": "Your creative energy shines brightly today. Lead with warmth and celebrate small victories. Stay open to unexpected blessings.",
  "language": "en"
}

🌍 Multi-language Support

  • English: Default language with zodiac-specific insights
  • Hindi: Complete Hindi translations for all zodiac signs

🛠️ Technology Stack

Backend:

  • FastAPI (Python web framework)
  • Pydantic (data validation)
  • Uvicorn (ASGI server)

Frontend:

  • Next.js 15 (React framework)
  • Tailwind CSS (styling)
  • Framer Motion (animations)
  • TypeScript (type safety)

📚 Extensibility

The project is designed to be easily extensible:

  • Add more languages: Extend the translation service
  • Integrate real LLMs: Replace PseudoLLM with OpenAI/HuggingFace
  • Add Panchang data: Include Vedic astrology calculations
  • Database integration: Replace in-memory cache with Redis/PostgreSQL
  • User authentication: Add user accounts and preferences

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

📄 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

  • Zodiac data and insights based on traditional astrological knowledge
  • Hindi translations crafted for cultural authenticity
  • Modern UI design inspired by contemporary web standards

🤖 Glimpse

image

About

A modern full-stack application that generates personalized daily astrological insights based on birth details. Features a clean FastAPI backend and a beautiful React frontend with modern UI design.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published