This web application, developed as part of the Credex internship assignment, aims to tackle the common issue of teams overspending on AI tools. Many organizations subscribe to multiple AI services monthly without a clear understanding of whether they're on the most cost-effective plans or if their current subscriptions align with their actual needs.
The core functionality of the app allows users to input details about their AI tools, including their monthly expenses, the number of user seats, and the specific use cases. Based on this information, the application then generates a comprehensive audit report. This report not only highlights potential areas of overspending but also provides actionable recommendations for optimization and estimates the potential savings.
https://ai-spend-audit-eight-nu.vercel.app/
https://www.loom.com/share/c8860030acd04b99be1806e7fa9d4109
- The ability to catalog AI tools, their associated plans, seat counts, and monthly costs.
- Persistent storage of user input via
localStorageto prevent data loss upon page refresh. - A rule-based system for generating audit recommendations, ensuring predictability and ease of verification.
- Calculations for estimated monthly and annual cost savings.
- Integration with the Anthropic API to generate concise, personalized AI summaries.
- The creation of shareable pages for audit results.
- A lead capture mechanism that stores data in Supabase.
- Cursor
- GitHub Copilot
- Claude
- ChatGPT
- Anthropic API
- OpenAI API
- Gemini
- Windsurf
- Next.js App Router
- TypeScript
- Tailwind CSS
- Supabase for backend services
- Anthropic API for AI capabilities
- Vitest for testing
- GitHub Actions for CI/CD
- Vercel for deployment
npm installNEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# AI summary — at least one required; tried in order: Gemini → Anthropic → OpenAI
# Gemini is free at aistudio.google.com (recommended)
GEMINI_API_KEY=your-gemini-api-key
# Anthropic (optional fallback) — console.anthropic.com
ANTHROPIC_API_KEY=your-anthropic-api-key
# OpenAI (optional fallback) — platform.openai.com
OPENAI_API_KEY=your-openai-api-key
# Email notifications (optional) — resend.com free tier
RESEND_API_KEY=your-resend-api-keynpm run devnpm run test -- --runnpm run lintStores details about each audit, such as:
- tool name
- current plan
- monthly spend
- seats
- team size
- use case
- audit output payload
Captures information from users interested in the service, including:
- audit ID
- name
- company
- Role
- Audit calculations were intentionally kept rule-based to ensure recommendations are consistent and easy to validate.
- AI was specifically utilized for generating personalized summary content, rather than for core audit logic.
localStoragewas implemented to preserve user input, enhancing the user experience by preventing data loss.- The focus was placed on usability and clarity, prioritizing a clean interface over excessive animations or visual effects.
- Much of the core logic was modularized within the
lib/audit/directory to simplify debugging and maintenance.
The project includes automated tests covering:
- Savings calculations
- Recommendation logic
- Overspend detection
- Audit generation edge cases
Run tests using:
npm run test -- --runGitHub Actions automatically runs:
- Lint checks
- Automated tests
on every push to main.
app/— App Router pages and API routescomponents/— Reusable UI componentsconstants/— Static pricing and tool datalib/— Core business logic and utilitiestypes/— Shared TypeScript typestests/— Vitest test filespublic/— Static assets
Built as part of the Credex Web Development Internship Assignment.