Prompt Clash Game is an innovative interactive game that leverages generative AI to create a competitive and creative experience.
The application allows up to 5 players to compete in image generation rounds using OpenAI's DALL-E model.
In each round, players are given a specific theme and time limit. They must craft creative text prompts that generate images related to the theme. These AI-generated images are then evaluated by an admin, which selects the most creative and thematically appropriate submission as the winner.
We welcome contributions from the community! Whether you want to fix a bug, add a new feature, or improve documentation, your help is appreciated. Please check our CONTRIBUTING.md guide for future improvements listing, details on how to get started, coding standards, and the pull request process.
demo.mp4
See INSTALLATION.md for detailed setup instructions.
- Participants compete in image generation rounds using OpenAI's DALL-E
- Each round accommodates up to 5 simultaneous participants
- Players receive a specific theme and time limit at the start of each round
- Participants write creative prompts to generate images related to the assigned theme (prompt examples)
- An admin evaluates and selects the most creative image at the end of each round
The application consists of several microservices:
- Chat Service: Handles user interactions and image generation via OpenAI's DALL-E
- Round Manager Service: Manages game rounds, themes, and timing
- Admin Service: Provides backend functionality for the admin interface
- User Interface: React-based frontend for players
- Admin Interface: Streamlit-based dashboard for game administrators
- Database Service: MySQL database for persistent storage
While this implementation uses Oracle Cloud Infrastructure (OCI) for image storage, Chainlit natively supports multiple storage clients:
- Amazon S3: Can be used by configuring AWS credentials
- Google Cloud Storage (GCS): Can be used with GCP credentials
- Azure Blob Storage: Can be used with Azure credentials
To use an alternative storage provider, update the relevant environment variables in your configuration files and modify the storage client initialization in the code.
The current implementation uses MySQL with a custom data layer, but Chainlit natively supports PostgreSQL. If you prefer PostgreSQL:
- Replace the MySQL container in docker-compose.yml with PostgreSQL
- Update the database connection string in your environment variables
- You can use Chainlit's built-in PostgreSQL data layer instead of the custom MySQL data layer
This would simplify the implementation as you wouldn't need to create a custom data layer like the one in chat_service/data/mysql_data_layer.py.