Combining ancient astrology wisdom with modern AI to predict financial market trends and personalized compatibility.
- Node.js 18+
- PostgreSQL database (local or cloud)
- Git
npm install
cd apps/api && npm install
cd ../web && npm installOption A: Use Cloud Database (Recommended)
# Get free PostgreSQL from:
# - Neon.tech: https://neon.tech
# - Supabase: https://supabase.com
# - Railway: https://railway.app
# Update apps/api/.env with your DATABASE_URL
DATABASE_URL="postgresql://user:pass@host/db?sslmode=require"Option B: Local PostgreSQL
# Start PostgreSQL
sudo service postgresql start
# Create database
createdb astro_db
# Or using psql:
sudo -u postgres psql -c "CREATE DATABASE astro_db;"cd apps/api
# Generate Prisma Client (if network issues, add PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1)
npm run db:generate
# Create tables
npm run db:push
# Seed test data (optional but recommended)
npm run db:seedTerminal 1 - API Server:
cd apps/api
npm run dev
# โ http://localhost:3001Terminal 2 - Web App:
cd apps/web
npm run dev
# โ http://localhost:3000Navigate to http://localhost:3000 and start testing! ๐
| Document | Description |
|---|---|
| QUICK_TEST.md | 5-minute quick start guide |
| TESTING_GUIDE.md | Comprehensive testing scenarios |
| TEST_STATUS.md | Current status and troubleshooting |
| PROJECT_PLAN.md | Complete project architecture |
| start-dev.sh | Automated setup script |
-
Macro Predictions (2 credits)
- Chinese year elements + Western planetary transits
- Predicts favorable asset classes for the year
- Rankings from 1-10 with detailed reasoning
-
Timing Predictions (1 credit)
- Personal birth chart + ticker birth date analysis
- Best entry/exit dates for specific assets
- Calendar heatmap visualization
-
Divination (1 credit)
- Tarot card readings
- I Ching hexagram interpretations
- Answer specific questions about investments
- Web App: Full-featured desktop/mobile responsive
- Mobile App: React Native with IAP subscriptions (apps/mobile)
- Email/password signup
- Phantom wallet (Solana)
- MetaMask wallet (Ethereum)
- Account linking supported
Web (Crypto):
- Solana Pay with QR codes
- Ethereum/Base with transaction verification
- USDC, USDT, SOL, ETH supported
Mobile (IAP):
- RevenueCat integration
- Free: 3 credits/month
- Basic: $9.99/month (50 credits)
- Pro: $29.99/month (unlimited)
- Complete birth chart (Chinese + Western)
- User-asset compatibility matching
- Personalized recommendations
- Element harmony analysis
- User analytics
- Revenue vs AI costs tracking
- Performance monitoring (p50, p95, p99)
- Error tracking with resolution
- Feedback analysis
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ Web (Next.js) โโโโโโถโ Mobile (Expo) โ
โ localhost:3000 โ โ React Native โ
โโโโโโโโโโฌโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโ
โ โ
โ HTTP/REST โ
โ โ
โโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโโ
โ API (Express) โ
โ localhost:3001 โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโโ
โ PostgreSQL โ
โ Database โ
โโโโโโโโโโโโโโโโโโโโ
Frontend:
- Next.js 16 (App Router)
- React 19
- TypeScript 5
- TailwindCSS 4
- Framer Motion
- Zustand
Backend:
- Node.js + Express
- TypeScript
- Prisma ORM
- JWT Authentication
- Redis (optional)
Mobile:
- React Native
- Expo SDK
- RevenueCat
Astrology:
- astronomy-engine (MIT license)
- Custom Bazi calculations
- Five Elements (Wu Xing)
- Western natal charts
AI:
- Anthropic Claude 3.5 Sonnet
- Prompt versioning
- Cost tracking ($3/M input, $15/M output)
Payments:
- Solana Pay
- ethers.js (Ethereum)
- RevenueCat (Mobile IAP)
If you ran npm run db:seed:
| Password | Credits | Zodiac | |
|---|---|---|---|
| alice@example.com | password123 | 10 | Rat (Metal) |
| bob@example.com | password123 | 10 | Dragon (Wood) |
| charlie@example.com | password123 | 10 | Monkey (Fire) |
- Sign up with email
- Connect Phantom/MetaMask wallet
- Complete birth chart profile
- Generate macro prediction
- Generate timing prediction
- Try divination reading
- Check compatibility matches
- Purchase credits (test mode)
- Submit feedback on prediction
- View admin dashboard (set is_admin=true first)
# Check PostgreSQL is running
pg_isready -h localhost -p 5432
# Verify DATABASE_URL in apps/api/.env
cat apps/api/.env | grep DATABASE_URL# Kill process on port 3001 (API)
lsof -i :3001 && kill -9 <PID>
# Kill process on port 3000 (Web)
lsof -i :3000 && kill -9 <PID>cd apps/api
PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1 npm run db:generate
npm run db:push# Reinstall dependencies
rm -rf node_modules package-lock.json
npm install
cd apps/api
rm -rf node_modules package-lock.json
npm install
cd ../web
rm -rf node_modules package-lock.json
npm installastro/
โโโ apps/
โ โโโ api/ # Backend API (Express + TypeScript)
โ โ โโโ src/
โ โ โ โโโ routes/ # API endpoints
โ โ โ โโโ services/ # Business logic
โ โ โ โโโ middleware/
โ โ โ โโโ utils/
โ โ โโโ package.json
โ โโโ web/ # Frontend Web App (Next.js)
โ โ โโโ app/ # App Router pages
โ โ โโโ components/ # React components
โ โ โโโ lib/ # Utilities
โ โ โโโ package.json
โ โโโ mobile/ # Mobile App (React Native + Expo)
โ โโโ app/ # Expo Router screens
โ โโโ components/
โ โโโ package.json
โโโ packages/
โ โโโ database/ # Prisma schema & migrations
โ โ โโโ prisma/
โ โ โโโ schema.prisma
โ โโโ astro-core/ # Core astrology engine
โ โโโ src/
โ โ โโโ chinese/ # Bazi, Wu Xing, I Ching
โ โ โโโ western/ # Natal charts, transits
โ โ โโโ predictions/
โ โ โโโ compatibility/
โ โโโ package.json
โโโ QUICK_TEST.md # 5-minute quick start
โโโ TESTING_GUIDE.md # Comprehensive testing guide
โโโ TEST_STATUS.md # Current status & troubleshooting
โโโ PROJECT_PLAN.md # Complete project plan
โโโ start-dev.sh # Automated setup script
| Phase | Feature | Status |
|---|---|---|
| 1 | Authentication (Email + Wallet) | โ Complete |
| 2 | Birth Chart Engine | โ Complete |
| 3 | Prediction Engines | โ Complete |
| 4 | Credits System | โ Complete |
| 5 | AI Enhancement | โ Complete |
| 6 | Compatibility Matching | โ Complete |
| 7 | Polymarket Integration | โญ๏ธ Skipped |
| 8 | Payment Systems | โ Complete |
| 9 | Production Readiness | โ Complete |
| 10 | Mobile App | โ Complete |
-
Dual Astrology System: Combines Chinese (Bazi, Wu Xing) with Western (planets, aspects) for comprehensive analysis
-
AI-Enhanced Predictions: Claude 3.5 Sonnet enhances predictions with market context and refined reasoning
-
Personalization: User-asset compatibility based on birth chart harmony, not just general predictions
-
Multi-Chain Payments: Supports Solana, Ethereum, and Base for maximum accessibility
-
Production-Ready: Built-in monitoring, caching, cost tracking, and error handling from day one
-
Mobile-First: Full feature parity between web and mobile with native IAP support
Scenario 1: Crypto Investor
- Signs in with Phantom wallet
- Completes birth profile
- Gets personalized BTC/ETH compatibility scores
- Generates timing prediction for best entry dates
- Purchases credits with USDC
Scenario 2: Stock Trader
- Signs up with email
- Generates macro prediction for 2025
- Sees that "Fire" assets score high
- Checks which stocks align with personal elements
- Uses divination for specific trade decisions
Scenario 3: Financial Advisor
- Creates admin account
- Tracks popular predictions
- Monitors AI costs
- Reviews user feedback
- Analyzes prediction accuracy over time
- Polymarket integration for prediction markets
- RAG system for enhanced astrology knowledge
- Social features (share predictions, follow users)
- Portfolio tracking integration
- Advanced chart patterns (aspects, transits)
- Multi-language support
- Email notifications
- API for third-party integrations
This is a complete implementation ready for deployment. To contribute:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
This project is proprietary. All rights reserved.
- astronomy-engine for planetary calculations
- Anthropic Claude for AI enhancement
- Solana Pay for crypto payments
- RevenueCat for mobile subscriptions
- The ancient wisdom of Bazi and I Ching
Ready to explore the cosmos? ๐๐ฎโจ
For questions or support, refer to the testing guides or check TEST_STATUS.md for troubleshooting.