Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c7a6f2b
Create FUNDING.yml
MIHIR2006 Apr 16, 2025
b0ca2e1
Landing page Optimize
MIHIR2006 May 2, 2025
5f685fd
Update README.md
MIHIR2006 May 14, 2025
724e508
Revert commit Landing page Optimize
MIHIR2006 May 28, 2025
96b670b
Preloader Added
MIHIR2006 May 28, 2025
9180446
Preloader Responsive layout fixed
MIHIR2006 May 28, 2025
ad5bd33
Preloader Theme fixed
MIHIR2006 May 28, 2025
9799979
Data Added in Performance Section
MIHIR2006 May 29, 2025
2bdc16f
Portfolio Value Over Time chart Added
MIHIR2006 May 30, 2025
505ec08
Recent Sales Data Updated
MIHIR2006 Jun 14, 2025
0710741
Migrate app from React to Next.js
MIHIR2006 Jul 18, 2025
c8ad91a
Merge pull request #1 from MIHIR2006/nextjs-migration
MIHIR2006 Jul 18, 2025
61c1440
Update README.md
MIHIR2006 Jul 18, 2025
5583e54
Migrate Project to monorepo structure
MIHIR2006 Jul 27, 2025
d762be3
Merge pull request #3 from MIHIR2006/monorepo
MIHIR2006 Aug 5, 2025
2ee2ac0
Create CODE_OF_CONDUCT.md
MIHIR2006 Aug 5, 2025
8c4fd7e
Create LICENSE
MIHIR2006 Aug 5, 2025
23646ae
Fixes the issue #5 of adding authentication and authorization
BChaitanyaReddy895 Aug 12, 2025
04cb3d2
feat:adds sidebar to landing page
adesh019 Aug 13, 2025
0623d16
Merge pull request #10 from adesh019/add-landing-sidebar
MIHIR2006 Aug 13, 2025
ca692fc
Enhance Powerful Features & Pricing sections with hover and click bul…
abinayagoudjandhyala Aug 13, 2025
8e34d5f
Merge pull request #12 from abinayagoudjandhyala/landing-hover-effects
MIHIR2006 Aug 13, 2025
e9da6a5
Remove .next from tracking and add to .gitignore
BChaitanyaReddy895 Aug 14, 2025
694c29e
Merge upstream/main successfully
BChaitanyaReddy895 Aug 14, 2025
1018c81
Merge pull request #9 from BChaitanyaReddy895/main
MIHIR2006 Aug 14, 2025
43ea128
Prisma generated files remove from tracking.
MIHIR2006 Aug 14, 2025
e53167c
Fixed start script for monorepo and remove bundler generated files fr…
MIHIR2006 Aug 15, 2025
06fa6aa
update start script for monorepo
MIHIR2006 Aug 15, 2025
16d45de
env settings added in turbo.json , prisma build script added.
MIHIR2006 Aug 15, 2025
2bd6bbf
improved UI for login and sign in pages
MIHIR2006 Aug 15, 2025
d3617e4
Add scroll to top button
rajashree0705 Aug 17, 2025
7fb0b27
Merge pull request #23 from rajashree0705/main
MIHIR2006 Aug 17, 2025
9fe9c0c
feat(dashboard): add Screener with filters, sorting, presets, paginat…
BChaitanyaReddy895 Aug 18, 2025
7df14cc
Merge branch 'MIHIR2006:main' into feat/screener
BChaitanyaReddy895 Aug 18, 2025
3d79abb
Merge pull request #24 from BChaitanyaReddy895/feat/screener
MIHIR2006 Aug 18, 2025
37b52fc
Update HomeClient.tsx
rishika174 Aug 21, 2025
187502c
Update HomeClient.tsx
rishika174 Aug 21, 2025
7f50a9a
Merge pull request #25 from rishika174/main
MIHIR2006 Aug 22, 2025
266ee93
Fix light mode UI for signin/signup pages and restore original compon…
rajashree0705 Aug 23, 2025
82aa3fa
Add floating side menu button with responsive design
rajashree0705 Aug 23, 2025
befedf3
Merge pull request #27 from rajashree0705/main
MIHIR2006 Aug 23, 2025
09541ac
Merge pull request #28 from rajashree0705/floating-menu-button
MIHIR2006 Aug 23, 2025
db2425a
fixed:signin and signup reponsiveness
saatvik-10 Aug 25, 2025
ba03b89
Merge pull request #32 from saatvik-10/fix/signin
MIHIR2006 Aug 26, 2025
5446b4a
Update README.md
MIHIR2006 Aug 26, 2025
f5c29c4
Update Backend.md
MIHIR2006 Aug 26, 2025
669059e
Bump nanoid from 3.3.7 to 3.3.11 in /frontend
dependabot[bot] Aug 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: MIHIR2006
buy_me_a_coffee: mihir_goswami
95 changes: 76 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,81 @@
### NEXT.JS + NODE.JS (Frontend)

# Node modules
# Ignore all node_modules folders recursively

**/node_modules/

# Yarn Plug'n'Play
.pnp.*
.pnpm-debug.log*

# Build output
/.next/
/out/
/dist/
/build/

# Test coverage
/coverage/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea

# Local environment files
.env.local
.env.*.local

# OS files
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# SSL keys
*.pem

# Vercel
.vercel/

# TypeScript build info
*.tsbuildinfo
next-env.d.ts

---

### PYTHON + FASTAPI (Backend)

# Bytecode and cache
__pycache__/
*.py[cod]
*$py.class

# Virtual environment
backend/venv/
backend/.env
backend/.env.*
backend/.DS_Store

# Python tooling caches
backend/.pytest_cache/
backend/.mypy_cache/
backend/.coverage
backend/.cache/

# IDE/editor configs
backend/.vscode/
backend/.idea/

# FastAPI or project-level generated files (optional, adjust as needed)
backend/.ruff_cache/
backend/.ipynb_checkpoints/
backend/.benchmarks/
frontend/.env.local
frontend/.env.local


# Prisma generated files
**/generated/

packages/*/generated/

.turbo/daemon/ad84a52ed504153f-turbo.log.2025-08-15
1 change: 1 addition & 0 deletions .turbo/cache/588e3fe13db7eb5b-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"588e3fe13db7eb5b","duration":473}
Binary file added .turbo/cache/588e3fe13db7eb5b.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/cache/de612ec379145aa7-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"hash":"de612ec379145aa7","duration":57742}
Binary file added .turbo/cache/de612ec379145aa7.tar.zst
Binary file not shown.
1 change: 1 addition & 0 deletions .turbo/daemon/8783c342a6f6f30d-turbo.log.2025-08-23
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-08-23T06:41:58.444832Z WARN daemon_server: turborepo_lib::commands::daemon: daemon already running
1 change: 1 addition & 0 deletions .turbo/daemon/ad84a52ed504153f-turbo.log.2025-07-27
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-07-27T11:51:45.467967Z WARN daemon_server: turborepo_lib::commands::daemon: daemon already running
Empty file.
1 change: 1 addition & 0 deletions .turbo/daemon/d743fe4ced1596e4-turbo.log.2025-08-17
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-08-17T15:16:13.487759Z WARN daemon_server: turborepo_lib::commands::daemon: daemon already running
213 changes: 213 additions & 0 deletions Backend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# Backend Structure & Frontend Integration Guide

## Backend Architecture

### **File Structure:**
```
backend/
├── main.py # FastAPI app entry point
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── env.example # Environment variables template
├── package.json # NPM scripts (monorepo integration)
├── README.md # Backend documentation
└── app/ # Application package
├── __init__.py # Package initialization
├── models.py # Pydantic data models
└── routers/ # API route handlers
├── __init__.py # Router package init
├── stocks.py # Stock data endpoints
└── market.py # Market data endpoints
```

## **Core Files Explanation**

### 1. **`main.py`** - Application Entry Point
```python
# Key Features:
- FastAPI app initialization
- CORS middleware configuration
- Router inclusion (stocks & market)
- Health check endpoints
- Error handlers
```

**CORS Configuration:**
```python
app.add_middleware(
CORSMiddleware,
allow_origins=[
"http://localhost:3000", # Next.js dev server
"http://localhost:3001",
"https://stockvision.vercel.app", # Production
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
```

### 2. **`app/models.py`** - Data Models
```python
# Pydantic Models:
- StockData: Complete stock information
- StockRequest: API request structure
- StockResponse: API response wrapper
- MarketSummary: Market overview data
- MarketTrends: Market trends and indicators
```

### 3. **`app/routers/stocks.py`** - Stock API Endpoints
```python
# Available Endpoints:
GET /api/stocks # Get all available stocks
GET /api/stocks/{symbol} # Get specific stock data
POST /api/stocks/search # Search for stock data
GET /api/stocks/{symbol}/price # Get stock price only
```

### 4. **`app/routers/market.py`** - Market API Endpoints
```python
# Available Endpoints:
GET /api/market/summary # Market summary data
GET /api/market/trends # Market trends
GET /api/market/sectors # Sector performance
GET /api/market/indicators # Market indicators
GET /api/market/volume # Volume data
```

## **Frontend-Backend Integration**

### **Connection Flow:**
```
Frontend (Next.js) ←→ Backend (FastAPI)
Port 3000 Port 8000
```

### **CORS Setup:**
- Backend allows requests from frontend origins
- Frontend can make API calls to backend endpoints
- Credentials and headers are properly configured

### **API Communication Example:**
```javascript
// Frontend API call example
const fetchStockData = async (symbol) => {
try {
const response = await fetch(`http://localhost:8000/api/stocks/${symbol}`);
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching stock data:', error);
}
};

// Usage in React component
const [stockData, setStockData] = useState(null);

useEffect(() => {
fetchStockData('AAPL').then(setStockData);
}, []);
```

## **Available API Endpoints**

### **Health & Status:**
- `GET /` - Root endpoint
- `GET /health` - Health check

### **Stock Data:**
- `GET /api/stocks` - List all stocks
- `GET /api/stocks/AAPL` - Get Apple stock data
- `POST /api/stocks/search` - Search stocks
- `GET /api/stocks/AAPL/price` - Get Apple price only

### **Market Data:**
- `GET /api/market/summary` - Market overview
- `GET /api/market/trends` - Market trends
- `GET /api/market/sectors` - Sector performance
- `GET /api/market/indicators` - Market indicators
- `GET /api/market/volume` - Volume data

### **Documentation:**
- `GET /docs` - Swagger UI documentation
- `GET /redoc` - ReDoc documentation

## **Data Models**

### **StockData Model:**
```python
{
"symbol": "AAPL",
"price": 150.25,
"change": 2.15,
"change_percent": 1.45,
"volume": 50000000,
"market_cap": 2500000000000,
"high": 152.30,
"low": 148.90,
"open": 149.50,
"previous_close": 148.10
}
```

### **MarketSummary Model:**
```python
{
"total_market_cap": 6700000000000,
"active_stocks": 5000,
"market_sentiment": "bullish",
"top_gainers": ["AAPL", "MSFT", "NVDA"],
"top_losers": ["GOOGL", "TSLA", "NFLX"]
}
```

## **Development Workflow**

### **Starting the Backend:**
```bash
# From root directory
npm run dev:backend

# Or directly
cd backend
python -m uvicorn main:app --reload --host 127.0.0.1 --port 8000
```

### **Testing API Endpoints:**
1. Start backend server
2. Visit http://localhost:8000/docs
3. Use Swagger UI to test endpoints
4. Or use curl/Postman for direct testing

### **Frontend Integration Steps:**
1. Replace mock data in frontend with API calls
2. Update fetch URLs to point to backend
3. Handle loading states and errors
4. Test integration thoroughly

## **Next Steps for Integration**

1. **Update Frontend API Calls:**
- Replace hardcoded data with backend API calls
- Add error handling and loading states
- Implement real-time data updates

2. **Add Real Stock Data:**
- Integrate with Alpha Vantage or Yahoo Finance APIs
- Implement caching and rate limiting
- Add real-time data streaming

3. **Enhance Features:**
- User authentication and portfolios
- Advanced charting and analytics
- Real-time notifications

## **Current Status**

- [x] Backend API fully functional
- [x] CORS properly configured
- [x] All endpoints documented
- [x] Ready for frontend integration
- [x] Mock data available for testing

Loading