The DATABASE_URL has been provided and configured for your Neon PostgreSQL database.
Generate a secure secret for NextAuth:
```bash
openssl rand -base64 32
```
Add this to your .env.local as NEXTAUTH_SECRET
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Go to "Credentials" → "Create Credentials" → "OAuth 2.0 Client IDs"
- Set application type to "Web application"
- Add authorized redirect URIs:
http://localhost:3000/api/auth/callback/google(development)https://yourdomain.com/api/auth/callback/google(production)
- Copy Client ID and Client Secret to your
.env.local
- Go to Google AI Studio
- Create an API key
- Add it to your
.env.localasGEMINI_API_KEY
-
Install dependencies: ```bash npm install ```
-
Generate Prisma client: ```bash npm run db:generate ```
-
Push database schema: ```bash npm run db:push ```
-
(Optional) Open Prisma Studio to view your database: ```bash npm run db:studio ```
-
Start the development server: ```bash npm run dev ```
-
Open http://localhost:3000 in your browser
- Set
NEXTAUTH_URLto your production domain - Update Google OAuth redirect URIs for production
- Ensure all environment variables are set in your hosting platform
- Run database migrations in production: ```bash npm run db:push ```
-
Database Connection Error
- Verify DATABASE_URL is correct
- Check if Neon database is accessible
- Ensure SSL mode is enabled
-
Google OAuth Error
- Verify redirect URIs match exactly
- Check if Google+ API is enabled
- Ensure client ID and secret are correct
-
NextAuth Session Error
- Generate a new NEXTAUTH_SECRET
- Clear browser cookies and try again
- Check if NEXTAUTH_URL matches your domain
- 🔐 Authentication: Google OAuth integration
- 📊 Dashboard: Overview with charts and analytics
- 💰 Transactions: Add, edit, filter, and categorize expenses
- 🏦 Accounts: Manage multiple bank accounts
- 📈 Budgets: Set and track spending goals
- 📤 Import/Export: CSV and Excel data management
- 👤 Profile: User settings and preferences
- 🎨 Modern UI: Responsive design with dark mode support
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL (Neon)
- Authentication: NextAuth.js with Google OAuth
- State Management: Redux Toolkit
- Charts: Recharts
- Animations: Framer Motion
- UI Components: shadcn/ui ```
Now let me create an API endpoint for the Gemini AI integration that was mentioned in the original requirements: