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.
- 🎴 Tarot card drawing (randomized deck logic)
- 🤖 AI-powered tarot interpretation
- 🌍 Bilingual support (English / 中文)
- 🔐 Email-based user authentication
- 💳 Online payment integration
- 📜 Reading history (planned)
- Next.js (React)
- Tailwind CSS
- i18n (English / 中文)
- Node.js (Next.js API routes)
- OpenAI API
- PostgreSQL
- Prisma ORM
- Stripe
- Git & GitHub
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
git clone https://github.com/your-username/ai-tarot-life.git
cd ai-tarot-lifenpm installCreate a .env file in the root directory:
DATABASE_URL="postgresql://username:password@host:port/database_name?schema=public"# Generate Prisma Client
npm run prisma:generate
# Run migrations
npm run prisma:migrate
# (Optional) Open Prisma Studio to view/edit data
npm run prisma:studionpm run devOpen http://localhost:3000 in your browser.
This project uses GitHub Actions for continuous integration and deployment.
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
- Vercel: Automatic deployment on push to
mainbranch (configured in.github/workflows/vercel.yml) - Manual Deployment: Use the deploy workflow for other platforms
Minimum required for CI:
DATABASE_URL: PostgreSQL connection string (for build validation)
Optional - Only if using Vercel deployment:
VERCEL_TOKEN: Vercel authentication tokenVERCEL_ORG_ID: Vercel organization IDVERCEL_PROJECT_ID: Vercel project ID
Note: The Vercel deployment workflow is disabled by default. See DEPLOYMENT.md for setup instructions.
This project supports multiple deployment platforms:
- Vercel (recommended for Next.js) - See DEPLOYMENT.md
- Railway - See DEPLOYMENT.md
- Render - See DEPLOYMENT.md
- Docker - See DEPLOYMENT.md
- Manual - See DEPLOYMENT.md
For detailed deployment instructions, see .github/DEPLOYMENT.md.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run type-check- Run TypeScript type checkingnpm run prisma:generate- Generate Prisma Clientnpm run prisma:validate- Validate Prisma schemanpm run prisma:migrate- Run Prisma migrationsnpm run prisma:studio- Open Prisma Studio
# Add your test commands here when tests are added
# npm test