A fun web application that generates daily coding fortunes for programmers based on their zodiac sign, local weather conditions, and a touch of randomness. Get personalized predictions about your coding day, including bug expectations, productivity scores, and learning recommendations!
- Daily Fortune Generation: Get a unique fortune once per day based on your birth date and location
- Zodiac-Based Predictions: Fortunes are influenced by your astrological sign and element
- Weather Integration: Local weather conditions affect your coding predictions
- Comprehensive Insights: Receive predictions about:
- Whether you should work overtime
- Expected number of bugs
- Code quality score (0-100)
- Productivity score (25-75)
- Commit timing advice
- Learning topic recommendations
- Lucky programming language for the day
- Persistent Storage: One fortune per user per day (stored locally)
- Responsive Design: Beautiful UI that works on desktop and mobile devices
- React 19 - Modern React with latest features
- Vite - Fast build tool and development server
- Tailwind CSS 4 - Utility-first CSS framework
- Axios - HTTP client for API requests
- Date-fns - Modern date utility library
- Node.js - JavaScript runtime
- Express.js - Web application framework
- Axios - HTTP client for external API calls
- CORS - Cross-origin resource sharing
- fs-extra - Enhanced file system operations
- Date-fns - Date manipulation utilities
programmer-pred/
├── backend/
│ ├── data/ # User data storage
│ ├── node_modules/ # Backend dependencies
│ ├── package.json # Backend package configuration
│ ├── package-lock.json # Backend dependency lock file
│ └── server.js # Main server file
├── frontend/
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── FortuneDisplay.jsx
│ │ │ ├── FortuneForm.jsx
│ │ │ └── Header.jsx
│ │ ├── assets/ # Frontend assets
│ │ ├── App.jsx # Main App component
│ │ ├── App.css # App styles
│ │ ├── index.css # Global styles
│ │ └── main.jsx # React entry point
│ ├── node_modules/ # Frontend dependencies
│ ├── package.json # Frontend package configuration
│ ├── package-lock.json # Frontend dependency lock file
│ ├── index.html # HTML template
│ ├── vite.config.js # Vite configuration
│ ├── tailwind.config.js # Tailwind CSS configuration
│ └── eslint.config.js # ESLint configuration
├── LICENSE # MIT License
└── README.md # This file
- Node.js (v16 or higher)
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd programmer-pred
-
Install backend dependencies
cd backend npm install
-
Install frontend dependencies
cd ../frontend npm install
Create a .env
file in the backend
directory (optional):
PORT=3001
OPENWEATHER_API_KEY=your_openweather_api_key_here
Note: The application will work without an OpenWeather API key by using mock weather data. To get real weather data, sign up at OpenWeatherMap for a free API key.
-
Start the backend server
cd backend npm start # or for development with auto-reload: npm run dev
The backend will run on
http://localhost:3001
-
Start the frontend development server
cd frontend npm run dev
The frontend will run on
http://localhost:5173
-
Open your browser and navigate to
http://localhost:5173
Generate a daily fortune for a user.
Request Body:
{
"birthDate": "1990-05-15",
"latitude": 40.7128,
"longitude": -74.0060,
"userHash": "unique_user_identifier"
}
Response:
{
"zodiacSign": "taurus",
"element": "earth",
"shouldOvertime": false,
"expectedBugs": 3,
"commitAdvice": "Early morning commits bring good luck",
"codeQualityScore": 85,
"learningRecommendation": "Machine Learning algorithms",
"weatherInfluence": "clear sky",
"luckyLanguage": "JavaScript",
"productivityScore": 68
}
Health check endpoint.
Response:
{
"status": "OK",
"timestamp": "2024-01-15T10:30:00.000Z"
}
- User Input: Users provide their birth date and allow location access
- Zodiac Calculation: The system determines the user's zodiac sign and element
- Weather Data: Current weather conditions are fetched based on location
- Fortune Generation: A deterministic algorithm combines zodiac traits, weather conditions, and a daily seed to generate consistent daily predictions
- One Per Day: Each user can only receive one fortune per day, stored locally
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Weather data provided by OpenWeatherMap
- Zodiac calculations based on traditional astrological dates
- Built with love for the programming community
Disclaimer: This application is for entertainment purposes only. Please don't make important career decisions based on your daily fortune! 😄
May your code compile and your bugs be few! 🐛✨