A modern web application for AI-powered tarot readings, astrology insights, and spiritual guidance.
- 🔮 AI-Powered Tarot Readings - Get personalized interpretations using OpenAI
- 🌟 Birth Chart Analysis - Detailed astrological birth chart generation
- 💕 Compatibility Reports - Relationship compatibility analysis
- 🌙 Moon Phase Tracking - Current moon phase information
- 📅 Daily Horoscopes - Personalized daily astrological insights
- 💳 Stripe Integration - Secure payment processing
- 👤 User Management - Registration, authentication, and profile management
- 🎯 Credit System - Flexible credit-based usage model
- Frontend: Next.js 15, React 19, Tailwind CSS
- Backend: Next.js API Routes, Node.js
- Database: PostgreSQL
- Payments: Stripe
- AI: OpenAI GPT-4
- Authentication: JWT
- Deployment: Render
-
Clone the repository
git clone <your-repo-url> cd cosmic-spiritual-guide
-
Install dependencies
npm install
-
Set up environment variables
cp env.template .env.local
Edit
.env.localwith your actual values. -
Set up the database
- Create a PostgreSQL database
- Run the SQL script in
database/init.sql
-
Start the development server
npm run dev
-
Visit the application Open http://localhost:3000
See DEPLOYMENT.md for detailed deployment instructions.
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Yes |
JWT_SECRET |
Secret key for JWT tokens | Yes |
OPENAI_API_KEY |
OpenAI API key for AI features | Yes |
STRIPE_SECRET_KEY |
Stripe secret key | Yes |
STRIPE_WEBHOOK_SECRET |
Stripe webhook secret | Yes |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY |
Stripe publishable key | Yes |
NEXT_PUBLIC_BASE_URL |
Your app's public URL | Yes |
CRON_SECRET |
Secret for cron job security | Yes |
POST /api/auth/login- User loginPOST /api/auth/signup- User registrationPOST /api/auth/logout- User logout
POST /api/tarot- Get tarot readingGET /api/readings- Get user's readings
POST /api/birth-chart- Generate birth chartPOST /api/compatibility- Check compatibilityGET /api/transits- Get current transitsGET /api/horoscope- Get daily horoscope
POST /api/create-payment-intent- Create payment intentPOST /api/create-subscription- Create subscriptionPOST /api/stripe-webhook- Stripe webhook handler
GET /api/health- Application health status
The application uses the following main tables:
- users - User accounts and profiles
- credits - User credit balances
- readings - Tarot and astrology readings
- birth_charts - Generated birth charts
- subscriptions - Stripe subscription data
- horoscopes - Daily horoscope content
- JWT-based authentication
- Password hashing with bcrypt
- HTTPS enforcement in production
- Secure headers configuration
- Input validation and sanitization
- Rate limiting on API endpoints
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support, email support@cosmicguide.com or create an issue in the repository.
- Initial release
- Core tarot and astrology features
- Stripe payment integration
- User management system
- Responsive design