Skip to content

About

The core loop is: User registers / logs in (email) User draws tarot cards (random logic) System sends cards + user context to AI agent AI returns an interpretation User reads result (possibly pays to unlock)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AI Tarot Life 🔮

An AI-powered tarot web application that provides life guidance through tarot card readings.

Users can draw tarot cards and receive personalized interpretations generated by an AI agent.
The application supports bilingual content (English / 中文), email-based accounts, and online payments.


✨ Features

  • 🎴 Tarot card drawing (randomized deck logic)
  • 🤖 AI-powered tarot interpretation
  • 🌍 Bilingual support (English / 中文)
  • 🔐 Email-based user authentication
  • 💳 Online payment integration
  • 📜 Reading history (planned)

🧱 Tech Stack

Frontend

  • Next.js (React)
  • Tailwind CSS
  • i18n (English / 中文)

Backend

  • Node.js (Next.js API routes)
  • OpenAI API

Database

  • PostgreSQL
  • Prisma ORM

Payment

  • Stripe

Version Control

  • Git & GitHub

📁 Project Structure

TAROT-READING-PLATFORM/
├── node_modules/
├── prisma/             # Database schema and migrations
├── src/                # Next.js application
│   ├── app/           # App router pages and API routes
│   └── lib/           # Shared utilities (Prisma client, etc.)
├── public/            # Static assets
├── .env               # Environment variables (database credentials)
├── package.json
└── README.md

🚀 Getting Started

1. Clone the repository

git clone https://github.com/your-username/ai-tarot-life.git
cd ai-tarot-life

2. Install dependencies

npm install

3. Set up environment variables

Create a .env file in the root directory:

DATABASE_URL="postgresql://username:password@host:port/database_name?schema=public"

4. Set up the database

# Generate Prisma Client
npm run prisma:generate

# Run migrations
npm run prisma:migrate

# (Optional) Open Prisma Studio to view/edit data
npm run prisma:studio

5. Run the development server

npm run dev

Open http://localhost:3000 in your browser.


🔄 CI/CD

This project uses GitHub Actions for continuous integration and deployment.

CI Pipeline

The CI pipeline runs on every push and pull request:

  • Lint and Type Check: Runs ESLint and TypeScript type checking
  • Build: Builds the Next.js application
  • Prisma Validation: Validates the Prisma schema

Deployment

  • Vercel: Automatic deployment on push to main branch (configured in .github/workflows/vercel.yml)
  • Manual Deployment: Use the deploy workflow for other platforms

Required GitHub Secrets

Minimum required for CI:

  • DATABASE_URL: PostgreSQL connection string (for build validation)

Optional - Only if using Vercel deployment:

  • VERCEL_TOKEN: Vercel authentication token
  • VERCEL_ORG_ID: Vercel organization ID
  • VERCEL_PROJECT_ID: Vercel project ID

Note: The Vercel deployment workflow is disabled by default. See DEPLOYMENT.md for setup instructions.

Deployment Options

This project supports multiple deployment platforms:

For detailed deployment instructions, see .github/DEPLOYMENT.md.


📝 Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run type-check - Run TypeScript type checking
  • npm run prisma:generate - Generate Prisma Client
  • npm run prisma:validate - Validate Prisma schema
  • npm run prisma:migrate - Run Prisma migrations
  • npm run prisma:studio - Open Prisma Studio

🧪 Testing

# Add your test commands here when tests are added
# npm test

About

The core loop is: User registers / logs in (email) User draws tarot cards (random logic) System sends cards + user context to AI agent AI returns an interpretation User reads result (possibly pays to unlock)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages