#!/bin/bash

# VerifyIndia API - Project Setup Script
# This script creates the complete folder structure for the project

echo "🚀 Creating VerifyIndia API project structure..."

# Create directories
mkdir -p src/routes
mkdir -p src/middleware
mkdir -p src/services
mkdir -p src/database
mkdir -p src/cache
mkdir -p data

# Create source files
touch src/index.js

# Create route files
touch src/routes/auth.js
touch src/routes/ifsc.js
touch src/routes/pincode.js
touch src/routes/gst.js
touch src/routes/pan.js
touch src/routes/bank.js
touch src/routes/user.js

# Create middleware files
touch src/middleware/auth.js
touch src/middleware/rateLimit.js
touch src/middleware/errorHandler.js

# Create service files
touch src/services/gstService.js
touch src/services/panService.js
touch src/services/bankService.js
touch src/services/analytics.js

# Create database files
touch src/database/connection.js
touch src/database/setup.js

# Create cache files
touch src/cache/redis.js

# Create data files
touch data/ifsc.json
touch data/pincodes.json

# Create root config files
touch package.json
touch .env.example
touch README.md

echo "✅ Project structure created successfully!"
echo ""
echo "📁 Directory structure:"
find . -type f -name "*.js" -o -name "*.json" -o -name ".env*" -o -name "*.md" | sort
echo ""
echo "📦 Next steps:"
echo "   1. Edit package.json with your dependencies"
echo "   2. Copy .env.example to .env and configure variables"
echo "   3. Run 'npm install' to install dependencies"
echo "   4. Run 'npm start' to start the development server"
