An interactive web application that presents users with historical ethical dilemmas powered by AI. The game challenges players to make moral decisions in different historical contexts, helping them understand the complexity of ethical decision-making across different time periods.
- 🎮 Interactive ethical dilemmas from various historical periods
- 🤖 AI-powered scenario generation using Google's Gemini AI
- 👤 User authentication and session management
- 📊 Score tracking and decision history
- 🎨 Modern, responsive UI built with React and Tailwind CSS
- 🔒 Secure backend built with FastAPI and PostgreSQL
- React with TypeScript
- Tailwind CSS for styling
- Vite for build tooling
- Axios for API communication
- FastAPI (Python)
- PostgreSQL database
- SQLAlchemy ORM
- JWT authentication
- Google Gemini AI integration
- Python 3.x
- PostgreSQL
- Node.js and npm
- Clone the repository:
git clone <your-repository-url>
cd <repository-name>- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt
npm install- Environment Variables:
- Copy
.env.exampleto create your own.envfile:
cp .env.example .env- Open
.envand update the values with your actual credentials:- DB_HOST: Your database host
- DB_NAME: Your database name
- DB_USER: Your database username
- DB_PASSWORD: Your database password
- JWT_SECRET_KEY: Your JWT secret key
- GEMINI_API_KEY: Your Google Gemini AI API key
- Make sure PostgreSQL is running
- Create a database named 'ethics_game' (or your preferred name)
- Update the
.envfile with your database credentials
- Start the backend server:
uvicorn main:app --reload- Start the frontend development server:
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Create a new branch for your feature
- Make your changes
- Submit a pull request
- Never commit the
.envfile - Keep your credentials secure
- Regularly update your dependencies
[Add your chosen license here]