Skip to content

cyrixninja/PersonaForge

Repository files navigation

PersonaForge

Image

Create, customize, and chat with your own AI personalities powered by Google Gemini.
PersonaForge is a web application built with PHP that lets you design unique AI personalities, chat with them, and manage your conversations—all in your browser.

Features

  • User registration and login
  • Create, edit, and delete AI personalities with custom avatars and prompts
  • Chat with your personalities in a conversational interface
  • View and manage conversation history
  • Powered by Google Gemini API
  • Built with PHP for easy deployment and customization

Setup

1. Update and Install Dependencies

sudo apt-get update
sudo apt-get upgrade -y
sudo apt install -y php-curl php-cli phpunit composer php-mysqli mysql-server

2. Configure MySQL

sudo systemctl start mysql.service
sudo mysql

Then run:

CREATE DATABASE IF NOT EXISTS ai_personality;
CREATE USER 'chatphp_user'@'localhost' IDENTIFIED BY 'a_strong_password';
GRANT ALL PRIVILEGES ON ai_personality.* TO 'chatphp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

3. Configure the Application

  • Copy your Google Gemini API key into config.php:
define('GEMINI_API_KEY', 'YOUR_GEMINI_API_KEY');
  • Ensure your database credentials in config.php match what you set above.

4. Set Permissions

cd /path/to/your/project
mkdir -p images/avatars
chmod 775 images/avatars

Running the Application

From your project directory, run:

screen -d -m php -S 0.0.0.0:8000

The app will be available at:
http://your-server-ip:8000/

Screenshots

Image Image Image Image Image

Troubleshooting

  • PHP code is shown instead of running: Make sure php and required extensions are installed.
  • Database errors: Double-check your credentials and that the database/tables exist.
  • API errors: Ensure your Gemini API key is valid and has sufficient quota.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

Demo

Demo

About

Create, customize, and chat with your own AI personalities powered by Google Gemini and PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published