A modern expense tracking application built with Next.js, Firebase, and Tailwind CSS.
-
A Firebase project with the following services enabled:
- Firebase Authentication (Google provider)
- Cloud Firestore
- Firebase Storage
-
A Google Cloud project with OAuth 2.0 credentials
Set up the following environment variables in your Vercel project settings:
# Firebase Config
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
# Firebase Admin SDK
FIREBASE_PROJECT_ID=
FIREBASE_PRIVATE_KEY_ID=
FIREBASE_PRIVATE_KEY=
FIREBASE_CLIENT_EMAIL=
FIREBASE_CLIENT_ID=
FIREBASE_CERT_URL=
# NextAuth.js
NEXTAUTH_URL=https://your-domain.com
NEXTAUTH_SECRET=your-secret-key # Generate with: openssl rand -base64 32
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=-
Prepare Your Repository
- Make sure your code is pushed to a GitHub repository
- Ensure all environment variables are documented (but not committed)
- Verify
next.config.tsincludes necessary configuration
-
Connect to Vercel
- Go to Vercel
- Import your GitHub repository
- Configure the project:
- Framework Preset: Next.js
- Root Directory: ./
- Build Command: next build
- Output Directory: .next
-
Configure Environment Variables
- Add all environment variables in Vercel project settings
- For
FIREBASE_PRIVATE_KEY, make sure to replace\nwith actual newlines - Set
NEXTAUTH_URLto your production domain
-
Deploy
- Deploy your project
- Vercel will automatically build and deploy your application
-
Firebase Security Rules
- Ensure Firestore rules are properly configured
- Deploy Storage rules for image uploads
- Review Authentication settings
-
NextAuth.js Configuration
- Update Google OAuth callback URLs in Google Cloud Console
- Add your production domain to authorized domains in Firebase Console
-
Image Optimization
- Verify
next.config.tsincludes Firebase Storage domain - Check image upload limits in Storage rules
- Verify
- Clone the repository
- Copy
.env.exampleto.env.local - Fill in environment variables
- Install dependencies:
npm install - Run development server:
npm run dev
- Google Authentication
- Expense tracking with image receipts
- Squad management
- Balance calculations
- Western-themed UI
- Responsive design
- Next.js 14
- Firebase (Auth, Firestore, Storage)
- NextAuth.js
- Tailwind CSS
- shadcn/ui
- TypeScript