Professional resume building and optimization platform powered by AI
Dreen.ai is a comprehensive AI-powered resume building and optimization platform that helps users create professional resumes with intelligent suggestions, ATS optimization, and real-time analysis.
- Production: Heroku (main branch) - https://dreen-ai-prod.herokuapp.com
- Staging: Vercel (dev branch) - Automatic deployments from dev branch
- Database: PostgreSQL on Heroku for production, separate staging database on Vercel
# Clone repository
git clone https://github.com/mradeybee/dreen-ai.git
cd dreen-ai
# Install dependencies
npm install
# Set up environment variables
cp env.example .env.local
# Run database migrations
npm run db:migrate:dev
# Start development server
npm run dev# Setup Heroku (first time only)
bash scripts/setup-heroku.sh
# Deploy to production
git push heroku main
# Check deployment status
bash scripts/deployment-status.sh# Deploy to staging
git push origin dev
# Vercel automatically deploys from dev branchThis project uses Git hooks to ensure code quality before pushing. A pre-push hook automatically runs linting and tests to prevent broken code from being pushed to the repository.
The pre-push hook runs automatically when you try to push code and ensures:
- ESLint Check: Runs
npm run lintto check for code style and potential issues - Test Suite: Runs
npm run test:cito ensure all tests pass - Block Push: If either check fails, the push is blocked until issues are resolved
Hooks are automatically installed when you run:
npm installOr manually with:
npm run husky:installIf you absolutely need to bypass the pre-push hook (not recommended), use:
git push --no-verifyThis project includes comprehensive test coverage for both utility functions and React hooks.
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run tests for CI/CD
npm run test:ci-
__tests__/lib/- Tests for utility functionsutils.test.ts- Tests for utility functions likecnenv-check.test.ts- Tests for environment variable checkingapi-utils.test.ts- Tests for API utility functionssession-utils.test.ts- Tests for session management utilitiesstripe-config.test.ts- Tests for Stripe configuration
-
__tests__/hooks/- Tests for React hooksuse-mobile.test.tsx- Tests for mobile detection hookuse-guided-tour.test.tsx- Tests for guided tour functionalityuse-session-expiration.test.tsx- Tests for session expiration handlinguse-toast.test.tsx- Tests for toast notification system
The project aims for 70% test coverage across all files. Tests cover:
- ✅ Happy path scenarios
- ✅ Error handling and edge cases
- ✅ Component state management
- ✅ API interactions
- ✅ Utility functions
The application supports multiple environment configurations through the NODE_ENV environment variable.
development- Full console logging enabled, MongoDB logging disabledstaging- Console logging enabled, MongoDB logging enabled (for testing production-like behavior)production- Console logging disabled, MongoDB logging enabledvercel- Console logging enabled, MongoDB logging enabled (with Vercel-optimized connection pooling)
Copy env.example to .env.local and configure the following variables:
# Environment
NODE_ENV="development" # Options: development, staging, production
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/dreen_ai"
# MongoDB (for logging)
MONGODB_URI="mongodb://localhost:27017/dreen-ai-logs"
# Note: MongoDB logging now works on Vercel with optimized connection pooling
# NextAuth
NEXTAUTH_SECRET="your-nextauth-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"
# Additional configuration...| Environment | Console Logging | MongoDB Logging | Use Case |
|---|---|---|---|
development |
✅ Enabled | ❌ Disabled | Local development |
staging |
✅ Enabled | ✅ Enabled | Testing production features |
production |
❌ Disabled | ✅ Enabled | Live production |
vercel |
✅ Enabled | ✅ Enabled | Vercel deployment with MongoDB logging |
The application now supports MongoDB logging on Vercel deployments:
- Optimized Connection Pooling: Uses connection pooling optimized for serverless environments
- Automatic Reconnection: Handles Vercel's cold starts and connection timeouts
- Non-blocking Logging: All logging operations are asynchronous and won't affect response times
- Fallback Handling: Gracefully falls back to console logging if MongoDB is unavailable
To enable MongoDB logging on Vercel:
- Set
MONGODB_URIin your Vercel environment variables - Set
NODE_ENVtoproductionorstagingfor MongoDB logging - The system will automatically detect Vercel and use optimized connection settings
The project uses GitHub Actions for continuous integration and deployment:
- Test Job: Runs tests on Node.js 18.x and 20.x
- Lint Job: Ensures code quality with ESLint
- Build Job: Builds the application
- Deploy Job: Deploys to Vercel (main/dev branches only)
- Push to
mainordevbranches - Pull requests to
mainordevbranches
Your project is live at:
https://vercel.com/adebayo-adepojus-projects/v0-dreen-ai-design
Continue building your app on:
https://v0.dev/chat/projects/0UccLxG6CwM
- Create and modify your project using v0.dev
- Deploy your chats from the v0 interface
- Changes are automatically pushed to this repository
- Vercel deploys the latest version from this repository
- Tests run automatically on every push and pull request