Skip to content

Commit 7789db3

Browse files
committed
feat: add README.md
1 parent 5c502ca commit 7789db3

1 file changed

Lines changed: 323 additions & 0 deletions

File tree

README.md

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
<h1 align="center"> Audit AI </h1>
2+
<p align="center"> High-Performance AI-Driven SaaS Optimization and Strategic Lead Intelligence Engine </p>
3+
4+
<p align="center">
5+
<img alt="Build" src="https://img.shields.io/badge/Build-Passing-brightgreen?style=for-the-badge">
6+
<img alt="Issues" src="https://img.shields.io/badge/Issues-0%20Open-blue?style=for-the-badge">
7+
<img alt="Contributions" src="https://img.shields.io/badge/Contributions-Welcome-orange?style=for-the-badge">
8+
<img alt="License" src="https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge">
9+
</p>
10+
11+
## 🌟 Overview
12+
13+
**Audit AI** is a sophisticated, full-stack intelligence platform designed to revolutionize how businesses perceive and manage their SaaS ecosystems. By merging the analytical power of Google's Generative AI with a robust TypeScript-driven architecture, Audit AI provides organizations with an automated, high-fidelity audit engine. It doesn't just list tools; it evaluates spend, identifies inefficiencies, and transforms raw operational data into strategic growth opportunities.
14+
15+
---
16+
17+
### The Problem
18+
19+
> Modern enterprises struggle with "SaaS sprawl"—an unmanaged proliferation of software subscriptions that leads to budget leakage, redundant functionality, and security vulnerabilities. Manually auditing these stacks is a labor-intensive process, often resulting in outdated reports and missed optimization opportunities. Furthermore, converting the interest in these audits into high-quality business leads remains a fragmented and inefficient process.
20+
21+
---
22+
23+
### The Solution
24+
25+
---
26+
27+
#### Audit AI eliminates the manual burden of software stack evaluation through a coordinated full-stack architecture:
28+
29+
- **_Interactive Frontend:_** Provides a high-performance React-based interface where users can submit their current software stack for immediate, real-time analysis.
30+
31+
- **_Robust Backend Orchestration:_** Built on Node.js and Express, the server manages the entire data workflow, ensuring seamless communication between the client and the processing engine.
32+
33+
- **_Multi-Layered Security:_** Implements rigorous protection including Zod-based data validation, honeypot anti-spam triggers, and rate limiters to defend against automated abuse and DOS attacks.
34+
35+
- **_AI-Powered Intelligence:_** Leverages the Gemini AI engine to analyze user inputs and generate deep-context summaries that identify cost-saving opportunities and stack optimizations.
36+
37+
- **_Actionable Visualization:_** Delivers a comprehensive Results Dashboard that transforms raw data into immediate business value and clear visual insights.
38+
39+
- **_Lead Optimization:_** Closes the loop by capturing and nurturing high-intent leads through integrated email services and automated lead management systems.
40+
41+
---
42+
43+
### Architecture Overview
44+
45+
---
46+
47+
Built on a **Component-based Architecture** (Frontend) and a **RESTful API** (Backend), ensuring modularity && scalability.
48+
49+
- **Frontend:** A Vite-powered React application focusing on high-performance rendering and a seamless user journey.
50+
- **Backend:** A TypeScript Express server emphasizing type-safe operations, secure middleware integration, and AI service orchestration.
51+
52+
---
53+
54+
## ✨ Key Features
55+
56+
### 🚀 Intelligent Audit Engine
57+
58+
Transform complex software lists into actionable insights. The core engine analyzes SaaS spend and tool utility, providing users with a clear path toward optimization.
59+
60+
- **User Benefit:** Stop wasting budget on redundant tools and identify gaps in your tech stack in seconds.
61+
62+
### 📊 Results Dashboard
63+
64+
A high-fidelity visualization interface that presents audit findings in a clear, professional format. It breaks down complex AI-generated data into digestible metrics.
65+
66+
- **User Benefit:** Gain immediate executive-level clarity on your operational efficiency without sifting through spreadsheets.
67+
68+
### 🛡️ Multi-Layered Security
69+
70+
Audit AI is fortified with enterprise-grade security protocols, including custom rate limiting, honeypot fields to trap malicious bots, and HCaptcha integration.
71+
72+
- **User Benefit:** Ensure your data and the platform remain secure from automated attacks and spam.
73+
74+
### 📧 Automated Lead Nurturing
75+
76+
Integrated lead management systems capture user information via conversion-optimized modals and deliver immediate value through automated email responses.
77+
78+
- **User Benefit:** Seamlessly transition from a casual audit to a deep-dive business relationship with zero manual overhead.
79+
80+
### 🧠 AI-Powered Summaries
81+
82+
Leveraging the `@google/generative-ai` package, the system generates human-like summaries of audit results, providing context that standard algorithmic tools miss.
83+
84+
- **User Benefit:** Receive personalized recommendations that understand the nuance of your specific business needs.
85+
86+
---
87+
88+
## 🛠️ Tech Stack & Architecture
89+
90+
Audit AI utilizes a modern, type-safe stack designed for reliability and developer productivity.
91+
92+
| Technology | Purpose | Why it was Chosen |
93+
| :----------------------- | :----------------- | :--------------------------------------------------------------------------------------- |
94+
| **TypeScript** | Primary Language | Provides robust type safety across the entire stack, reducing runtime errors. |
95+
| **React** | Frontend Framework | Enables a reactive, component-based UI for complex state management in the dashboard. |
96+
| **Express** | Backend Framework | A lightweight, flexible Node.js framework ideal for building high-performance REST APIs. |
97+
| **Mongoose** | Database ODM | Simplifies data modeling and interaction with MongoDB for audit and lead persistence. |
98+
| **Google Generative AI** | AI Orchestration | Harnesses Gemini for advanced natural language processing and audit summarization. |
99+
| **Zod** | Schema Validation | Ensures 100% data integrity for all incoming API requests and internal configurations. |
100+
| **Resend** | Email Service | Provides reliable, developer-friendly transactional email delivery for lead alerts. |
101+
102+
---
103+
104+
## 📁 Project Structure
105+
106+
```
107+
vikasingh0897-AuditAI-5c502ca/
108+
├── 📁 frontend/ # React Client Application
109+
│ ├── 📁 public/ # Static assets (Logos, Icons)
110+
│ │ ├── 📄 AuditAI-Logo.svg # Primary Brand Identity
111+
│ │ └── 📄 favIcon.svg # Browser favicon
112+
│ ├── 📁 src/ # Frontend source code
113+
│ │ ├── 📁 components/ # Shared UI components
114+
│ │ │ ├── 📄 Footer.tsx # Global footer navigation
115+
│ │ │ └── 📄 Header.tsx # Global header and brand bar
116+
│ │ ├── 📁 pages/ # View-level components
117+
│ │ │ ├── 📄 AuditForm.tsx # SaaS data entry interface
118+
│ │ │ ├── 📄 AuditSummary.tsx # AI result visualization
119+
│ │ │ ├── 📄 LandingPage.tsx # Conversion-optimized entry point
120+
│ │ │ ├── 📄 LeadModal.tsx # Lead capture interface
121+
│ │ │ └── 📄 ResultsDashboard.tsx # Data visualization hub
122+
│ │ ├── 📄 App.tsx # Main application router
123+
│ │ ├── 📄 main.tsx # Application entry point
124+
│ │ └── 📄 index.css # Global styling
125+
│ ├── 📄 vite.config.ts # Vite build configuration
126+
│ └── 📄 package.json # Frontend dependencies
127+
128+
├── 📁 backend/ # Node.js Express Server
129+
│ ├── 📁 src/ # Backend source code
130+
│ │ ├── 📁 controllers/ # Request handling logic
131+
│ │ │ ├── 📄 audit.controller.ts # Audit processing logic
132+
│ │ │ ├── 📄 lead.controller.ts # Lead management logic
133+
│ │ │ └── 📄 pricing.controller.ts # Pricing data logic
134+
│ │ ├── 📁 middlewares/ # Express request interceptors
135+
│ │ │ ├── 📄 honeypot.middleware.ts # Anti-spam security
136+
│ │ │ ├── 📄 rateLimiter.ts # DOS protection
137+
│ │ │ └── 📄 validator.middleware.ts # Zod validation logic
138+
│ │ ├── 📁 models/ # Database schemas
139+
│ │ │ ├── 📄 audit.model.ts # Audit data structure
140+
│ │ │ └── 📄 pricing.model.ts # Tool pricing structure
141+
│ │ ├── 📁 routes/ # API endpoint definitions
142+
│ │ │ ├── 📄 audit.route.ts # Audit-related endpoints
143+
│ │ │ └── 📄 lead.route.ts # Lead-related endpoints
144+
│ │ ├── 📁 utils/ # Shared utility functions
145+
│ │ │ ├── 📄 apiResponse.ts # Standardized response wrapper
146+
│ │ │ ├── 📄 captcha.ts # HCaptcha verification
147+
│ │ │ ├── 📄 emailService.ts # Resend/SMTP integration
148+
│ │ │ └── 📄 summaryEngine.ts # AI-logic wrapper
149+
│ │ ├── 📄 db.ts # Database connection logic
150+
│ │ ├── 📄 app.ts # Express app configuration
151+
│ │ └── 📄 index.ts # Server entry point
152+
│ ├── 📁 test/ # Backend testing suite
153+
│ │ └── 📄 auditEngine.test.ts # Core engine unit tests
154+
│ ├── 📄 jest.config.js # Test runner configuration
155+
│ └── 📄 package.json # Backend dependencies
156+
157+
├── 📄 .env.example # Environment template
158+
├── 📄 PRICING_DATA.md # Curated SaaS pricing reference
159+
└── 📄 DEVLOG.md # Project evolution and updates
160+
161+
```
162+
163+
---
164+
165+
## 🔐 Environment Variables
166+
167+
The application requires several environment variables to function correctly. These should be defined in a `.env` file in the respective directories or at the root level as per your deployment strategy.
168+
169+
| Variable | Description | Required |
170+
| :----------------------- | :--------------------------------------------- | :------- |
171+
| `VITE_API_URL` | Base URL for the backend API (Frontend) | Yes |
172+
| `VITE_HCAPTCHA_SITE_KEY` | Site key for HCaptcha integration | Yes |
173+
| `MONGO_URI` | Connection string for MongoDB | Yes |
174+
| `PORT` | The port the backend server listens on | Yes |
175+
| `BREVO_API_KEY` | API Key for email service delivery | Yes |
176+
| `EMAIL_FROM` | The sender email address for notifications | Yes |
177+
| `SMTP_HOST` | Host for SMTP fallback services | Yes |
178+
| `CLIENT_URL` | The URL of the frontend application (for CORS) | Yes |
179+
| `APP_URI` | The primary application URI | Yes |
180+
| `NODE_ENV` | Environment state (development/production) | Yes |
181+
182+
---
183+
184+
## 🔑 API Keys Setup
185+
186+
### 1. Database Setup (MongoDB)
187+
188+
Audit AI uses Mongoose to interact with MongoDB.
189+
190+
- **Action:** Create a cluster on [MongoDB Atlas](https://www.mongodb.com/cloud/atlas).
191+
- **Configuration:** Obtain your connection string. Ensure the network access whitelist includes your deployment IP.
192+
- **Environment:** Assign this to `MONGO_URI`.
193+
194+
### 2. Email Service (Resend/Brevo)
195+
196+
Automated lead notifications and audit summaries are delivered via transactional email.
197+
198+
- **Action:** Sign up at [Brevo](https://www.brevo.com/) or [Resend](https://resend.com/).
199+
- **Configuration:** Create an API Key and verify your sending domain.
200+
- **Environment:** Assign the key to `BREVO_API_KEY` and set `EMAIL_FROM`.
201+
202+
### 3. AI Engine (Google Gemini)
203+
204+
The `@google/generative-ai` package requires a valid Google AI SDK key.
205+
206+
- **Action:** Visit the [Google AI Studio](https://aistudio.google.com/).
207+
- **Configuration:** Generate an API Key for Gemini Pro.
208+
- **Environment:** Ensure the backend has access to this key (standardized as a service key in `summaryEngine.ts`).
209+
210+
---
211+
212+
## 🚀 Getting Started
213+
214+
### Prerequisites
215+
216+
- **Node.js:** v18.0.0 or higher
217+
- **TypeScript:** v6.0.3+ (installed via devDependencies)
218+
- **MongoDB:** A running instance or Atlas URI
219+
220+
### Installation
221+
222+
1. **Clone the Repository**
223+
224+
```bash
225+
git clone https://github.com/vikasingh0897/AuditAI.git
226+
cd AuditAI
227+
```
228+
229+
2. **Backend Setup**
230+
231+
```bash
232+
cd backend
233+
npm install
234+
cp .env.example .env # Update with your verified API keys
235+
npm run build
236+
```
237+
238+
3. **Frontend Setup**
239+
240+
```bash
241+
cd ../frontend
242+
npm install
243+
# Ensure VITE_API_URL in .env points to your local backend
244+
```
245+
246+
4. **Running the Development Environment**
247+
- **Start Backend:**
248+
```bash
249+
cd backend
250+
npm run dev
251+
```
252+
- **Start Frontend:**
253+
```bash
254+
cd frontend
255+
npm run dev
256+
```
257+
258+
---
259+
260+
## 🔧 Usage
261+
262+
### Running the Audit
263+
264+
1. Navigate to the `LandingPage`.
265+
2. Interact with the `AuditForm` to input your current SaaS tools and estimated monthly spend.
266+
3. Complete the HCaptcha challenge (verified by `captcha.ts`).
267+
4. The `summaryEngine.ts` will process the input using Google Generative AI.
268+
269+
### Viewing Results
270+
271+
- Upon completion, you will be redirected to the `ResultsDashboard`.
272+
- The dashboard displays a high-level `AuditSummary`, highlighting potential savings and tool redundancies.
273+
- If the system detects high-value optimization opportunities, the `LeadModal` will appear to capture contact details for a professional consultation.
274+
275+
### API Interaction
276+
277+
The backend exposes a health-check and primary orchestration endpoint:
278+
279+
- **`GET /`**: Returns the current status of the Express API and ensures connectivity with the underlying Node.js runtime.
280+
281+
---
282+
283+
## 🤝 Contributing
284+
285+
We welcome contributions to improve Audit AI! Your input helps make this project better for everyone.
286+
287+
### How to Contribute
288+
289+
1. **Fork the repository** - Click the 'Fork' button at the top right of this page
290+
2. **Create a feature branch**
291+
292+
```bash
293+
git checkout -b feature/amazing-feature
294+
```
295+
296+
3. **Make your changes** - Improve code, documentation, or features
297+
4. **Test thoroughly** - Ensure all functionality works as expected
298+
```bash
299+
npm test
300+
```
301+
5. **Commit your changes** - Write clear, descriptive commit messages
302+
```bash
303+
git commit -m 'Add: Amazing new feature that improves AI summary accuracy'
304+
```
305+
6. **Push to your branch**
306+
```bash
307+
git push origin feature/amazing-feature
308+
```
309+
7. **Open a Pull Request** - Submit your changes for review
310+
311+
---
312+
313+
<div align="center">
314+
315+
### ⭐ If this repository helps you, please give it a star! ⭐
316+
317+
**Happy Coding! 🚀**
318+
319+
---
320+
321+
_Created with ❤️ by Vikas Singh_
322+
323+
</div>

0 commit comments

Comments
 (0)