Skip to content

matbalez/Pictagories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Pictagories - AI-Powered Word Game

Pictagories Logo

MIT License Node Version React TypeScript

A daily word guessing game where AI validates your creativity!

Play Now | Report Bug | Request Feature

๐Ÿ“– About

Pictagories is an engaging daily word game that challenges players to think creatively within categories. Each day brings a new category, and players submit words that fit the theme. Our AI-powered validation system (using OpenAI GPT-4o) ensures fair and intelligent word acceptance, making each game dynamic and fun.

โœจ Key Features

  • ๐ŸŽฏ Daily Categories - New challenge every day
  • ๐Ÿค– AI Validation - Smart word validation using GPT-4o
  • ๐Ÿ† Leaderboards - Compete with friends and global players
  • ๐Ÿ“ฑ Mobile Optimized - Play anywhere, anytime
  • ๐ŸŽจ Dynamic Visuals - AI-generated category images with DALL-E 3
  • ๐ŸŽ‰ Composite Images - Celebrate your words with custom generated art
  • โšก Real-time Updates - Instant feedback on your submissions
  • ๐ŸŽฎ Simple Multiplayer - Name-based authentication for quick games

๐Ÿš€ Quick Start

Prerequisites

Installation

  1. Clone the repository
git clone https://github.com/yourusername/pictagories.git
cd pictagories
  1. Install dependencies
npm install
  1. Set up environment variables
cp .env.example .env
# Edit .env and add your OpenAI API key
  1. Start the development server
npm run dev
  1. Open your browser Navigate to http://localhost:5000

๐ŸŽฎ How to Play

  1. Enter your name - No registration required!
  2. See today's category - Example: "Things you'd take on a camping trip"
  3. Submit words - Type words that fit the category
  4. Get instant feedback - AI validates if your word fits
  5. Score points - Valid words earn you points
  6. Click "I'm Done" - Generate a celebratory image with your words
  7. Check the leaderboard - See how you rank against others

๐Ÿ› ๏ธ Technology Stack

Frontend

  • React 18 - UI framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Vite - Build tool
  • TanStack Query - Data fetching
  • Wouter - Routing
  • shadcn/ui - Component library

Backend

  • Express.js - Web server
  • TypeScript - Type safety
  • OpenAI API - Word validation & image generation
  • In-memory storage - Fast development (easily replaceable with database)

AI Integration

  • GPT-4o - Intelligent word validation
  • DALL-E 3 - Dynamic image generation

๐Ÿ“ Project Structure

pictagories/
โ”œโ”€โ”€ client/                 # Frontend React application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/    # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/        # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/        # Custom React hooks
โ”‚   โ”‚   โ””โ”€โ”€ lib/          # Utilities and types
โ”œโ”€โ”€ server/                # Backend Express server
โ”‚   โ”œโ”€โ”€ services/         # External service integrations
โ”‚   โ”‚   โ””โ”€โ”€ openai.ts    # OpenAI API integration
โ”‚   โ”œโ”€โ”€ routes.ts        # API endpoints
โ”‚   โ””โ”€โ”€ storage.ts       # Data persistence layer
โ”œโ”€โ”€ shared/              # Shared types and schemas
โ”‚   โ””โ”€โ”€ schema.ts       # Data models
โ””โ”€โ”€ public/             # Static assets

๐Ÿ”ง Configuration

Environment Variables

# Required
OPENAI_API_KEY=sk-...       # Your OpenAI API key

# Optional
PORT=5000                    # Server port (default: 5000)
NODE_ENV=development         # Environment (development/production)

Category Configuration

Categories are rotated daily. To add or modify categories, edit the category list in server/storage.ts:

const categories = [
  "Things you'd take on a camping trip",
  "Items found in a kitchen",
  "Types of transportation",
  // Add more categories here
];

๐Ÿ“š API Documentation

See API.md for complete API documentation.

Quick API Examples

# Create/get player
curl -X POST http://localhost:5000/api/players \
  -H "Content-Type: application/json" \
  -d '{"name": "Alice"}'

# Submit a word
curl -X POST http://localhost:5000/api/words/submit \
  -H "Content-Type: application/json" \
  -d '{
    "word": "tent",
    "category": "Things you'd take on a camping trip",
    "playerId": "uuid"
  }'

# Get leaderboard
curl http://localhost:5000/api/game/leaderboard

๐Ÿšข Deployment

See DEPLOYMENT.md for detailed deployment instructions.

Quick Deploy to Replit

  1. Fork this repl or import from GitHub
  2. Add OPENAI_API_KEY in Secrets
  3. Click the Deploy button
  4. Your app is live!

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Ways to Contribute

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿ“ Improve documentation
  • ๐ŸŽจ Submit UI/UX improvements
  • ๐ŸŒ Add translations
  • โšก Optimize performance

๐Ÿ“ˆ Roadmap

  • User accounts with persistent stats
  • Custom game rooms
  • Timer-based challenges
  • Achievement system
  • Social sharing features
  • Category suggestions by users
  • Multi-language support
  • WebSocket for real-time updates
  • Mobile app (React Native)

๐Ÿ› Known Issues

  • Composite image generation may take a few seconds
  • Category images are cached for 24 hours
  • In-memory storage resets on server restart (use database for production)

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • OpenAI for GPT-4o and DALL-E 3 APIs
  • shadcn for the beautiful UI components
  • Tailwind CSS for the styling system
  • The React and TypeScript communities

๐Ÿ’ฌ Support

๐ŸŒŸ Star History

Star History Chart


Made with โค๏ธ by the Pictagories Team

If you enjoy Pictagories, please โญ this repository!

About

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages