Skip to content

Commit b13724f

Browse files
committed
Add AI Financial Advisor and Forensic CPA AI services with unified launch method
- Created ai-financial-advisor: FastAPI-based financial advisory service - Created Forensic_CPA_AI: FastAPI-based forensic accounting service - Both services use identical launch method: uvicorn app.main:app --host {HOST} --port {PORT} - Added import bundle configuration for LocalNexusController integration - Configured ports: AI Financial Advisor (5020), Forensic CPA AI (5021) - Added requirements.txt, README.md, and .env.example for both services https://claude.ai/code/session_01Lvgk37LxTgVRTf3Tw7RnZm
1 parent 695720d commit b13724f

File tree

11 files changed

+230
-0
lines changed

11 files changed

+230
-0
lines changed

Forensic_CPA_AI/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PORT=5021
2+
HOST=127.0.0.1
3+
OPENAI_API_KEY=your_openai_key_here

Forensic_CPA_AI/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.env
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
venv/
8+
env/
9+
ENV/
10+
.venv
11+
*.log
12+
.DS_Store

Forensic_CPA_AI/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Forensic CPA AI
2+
3+
A FastAPI-based forensic accounting and fraud detection service.
4+
5+
## Setup
6+
7+
1. Install dependencies:
8+
```bash
9+
pip install -r requirements.txt
10+
```
11+
12+
2. Copy `.env.example` to `.env` and configure:
13+
```bash
14+
cp .env.example .env
15+
```
16+
17+
3. Run the service:
18+
```bash
19+
uvicorn app.main:app --host 127.0.0.1 --port 5021 --reload
20+
```
21+
22+
## API Endpoints
23+
24+
- `GET /` - Service info
25+
- `GET /health` - Health check
26+
- `GET /api/analyze` - Perform forensic analysis

Forensic_CPA_AI/app/main.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from fastapi import FastAPI
2+
from fastapi.middleware.cors import CORSMiddleware
3+
4+
app = FastAPI(title="Forensic CPA AI")
5+
6+
# Enable CORS
7+
app.add_middleware(
8+
CORSMiddleware,
9+
allow_origins=["*"],
10+
allow_credentials=True,
11+
allow_methods=["*"],
12+
allow_headers=["*"],
13+
)
14+
15+
16+
@app.get("/")
17+
async def root():
18+
return {"message": "Forensic CPA AI API", "status": "running"}
19+
20+
21+
@app.get("/health")
22+
async def health():
23+
return {"status": "healthy"}
24+
25+
26+
@app.get("/api/analyze")
27+
async def analyze():
28+
return {
29+
"analysis": "Sample forensic analysis endpoint",
30+
"capabilities": [
31+
"Financial fraud detection",
32+
"Transaction anomaly detection",
33+
"Compliance monitoring"
34+
]
35+
}

Forensic_CPA_AI/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fastapi==0.104.1
2+
uvicorn[standard]==0.24.0

ai-financial-advisor/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PORT=5020
2+
HOST=127.0.0.1
3+
OPENAI_API_KEY=your_openai_key_here

ai-financial-advisor/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.env
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
venv/
8+
env/
9+
ENV/
10+
.venv
11+
*.log
12+
.DS_Store

ai-financial-advisor/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AI Financial Advisor
2+
3+
A FastAPI-based AI financial advisor service.
4+
5+
## Setup
6+
7+
1. Install dependencies:
8+
```bash
9+
pip install -r requirements.txt
10+
```
11+
12+
2. Copy `.env.example` to `.env` and configure:
13+
```bash
14+
cp .env.example .env
15+
```
16+
17+
3. Run the service:
18+
```bash
19+
uvicorn app.main:app --host 127.0.0.1 --port 5020 --reload
20+
```
21+
22+
## API Endpoints
23+
24+
- `GET /` - Service info
25+
- `GET /health` - Health check
26+
- `GET /api/advice` - Get financial advice

ai-financial-advisor/app/main.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from fastapi import FastAPI
2+
from fastapi.middleware.cors import CORSMiddleware
3+
4+
app = FastAPI(title="AI Financial Advisor")
5+
6+
# Enable CORS
7+
app.add_middleware(
8+
CORSMiddleware,
9+
allow_origins=["*"],
10+
allow_credentials=True,
11+
allow_methods=["*"],
12+
allow_headers=["*"],
13+
)
14+
15+
16+
@app.get("/")
17+
async def root():
18+
return {"message": "AI Financial Advisor API", "status": "running"}
19+
20+
21+
@app.get("/health")
22+
async def health():
23+
return {"status": "healthy"}
24+
25+
26+
@app.get("/api/advice")
27+
async def get_advice():
28+
return {
29+
"advice": "Sample financial advice endpoint",
30+
"tips": [
31+
"Diversify your portfolio",
32+
"Save for emergencies",
33+
"Invest for the long term"
34+
]
35+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fastapi==0.104.1
2+
uvicorn[standard]==0.24.0

0 commit comments

Comments
 (0)