This is a Next.js project bootstrapped with create-next-app
and prototyped in Firebase Studio.
Follow these instructions to get the development environment running on your local machine.
- Node.js (version 20 or later recommended)
- npm (usually comes with Node.js)
- A Google AI API Key.
-
Download the Code: Download the project source code as a ZIP file from Firebase Studio and unzip it.
-
Navigate to the Project Directory: Open your terminal and change into the project directory:
cd path/to/your/project
-
Install Dependencies: Run the following command to install all the necessary packages:
npm install
-
Set Up Environment Variables: Create a new file named
.env
in the root of your project directory. Open it and add your Google AI API key like this:GEMINI_API_KEY=YOUR_API_KEY_HERE
Replace
YOUR_API_KEY_HERE
with the actual key you obtained from Google AI Studio.
This project requires two processes to run concurrently: the Next.js web server and the Genkit AI server.
-
Start the Genkit Server: In your terminal, run the following command to start the Genkit development server, which powers the AI features:
npm run genkit:watch
-
Start the Web Server: Open a second terminal window, navigate to the same project directory, and run this command to start the Next.js development server:
npm run dev
-
View Your App: Open your web browser and go to http://localhost:9002 to see your application running.
npm run dev
: Runs the Next.js app in development mode.npm run build
: Builds the application for production usage.npm run start
: Starts a Next.js production server.npm run lint
: Runs ESLint to find and fix problems in the code.npm run genkit:watch
: Starts the Genkit development server in watch mode.npm run typecheck
: Runs the TypeScript compiler to check for type errors.