This project uses environment variables for configuration. Before running the application, you need to set up these variables.
-
Copy the example environment file:
cp .env.example .env
-
Edit the
.env
file and fill in your specific values:DATABASE_URL
: Your MySQL database connection stringGEMINI_API_KEY
: Your Google Gemini AI API keyNODE_ENV
: Set to "development" for local developmentVITE_API_URL
: The URL for your API (usually "http://localhost:5000/api" for local development)
DATABASE_URL
: Required for database connectionGEMINI_API_KEY
: Required for AI chat functionalityNODE_ENV
: Sets the environment mode (development/production)
VITE_API_URL
: Base URL for API requests
This project uses MySQL as the database backend. The connection string format is:
mysql://username:password@hostname:3306/database_name
If you're migrating from PostgreSQL to MySQL, make sure to:
- Update your DATABASE_URL to the MySQL format
- Run database migrations to create the tables in MySQL:
npm run db:push
Always keep your .env
file private and never commit it to version control.