96 lines
3.0 KiB
Markdown
96 lines
3.0 KiB
Markdown
# VerifyIndia API
|
|
|
|
A comprehensive verification API for Indian documents and data including IFSC codes, PIN codes, GST numbers, PAN cards, and bank account verification.
|
|
|
|
## Tech Stack
|
|
|
|
- **Runtime**: Node.js
|
|
- **Framework**: Express.js
|
|
- **Database**: PostgreSQL
|
|
- **Cache**: Redis
|
|
- **Authentication**: JWT (JSON Web Tokens)
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
verify-india-api/
|
|
├── src/
|
|
│ ├── index.js # Application entry point
|
|
│ ├── routes/ # API route handlers
|
|
│ │ ├── auth.js # Authentication routes
|
|
│ │ ├── ifsc.js # IFSC code lookup
|
|
│ │ ├── pincode.js # PIN code lookup
|
|
│ │ ├── gst.js # GST verification
|
|
│ │ ├── pan.js # PAN verification
|
|
│ │ ├── bank.js # Bank account verification
|
|
│ │ └── user.js # User management
|
|
│ ├── middleware/ # Express middleware
|
|
│ │ ├── auth.js # Authentication middleware
|
|
│ │ ├── rateLimit.js # Rate limiting
|
|
│ │ └── errorHandler.js # Error handling
|
|
│ ├── services/ # Business logic services
|
|
│ │ ├── gstService.js # GST verification service
|
|
│ │ ├── panService.js # PAN verification service
|
|
│ │ ├── bankService.js # Bank verification service
|
|
│ │ └── analytics.js # Analytics service
|
|
│ ├── database/ # Database configuration
|
|
│ │ ├── connection.js # Database connection
|
|
│ │ └── setup.js # Database setup scripts
|
|
│ └── cache/ # Caching layer
|
|
│ └── redis.js # Redis configuration
|
|
├── data/ # Static data files
|
|
│ ├── ifsc.json # IFSC code database
|
|
│ └── pincodes.json # PIN code database
|
|
├── package.json
|
|
├── .env.example
|
|
└── README.md
|
|
```
|
|
|
|
## Getting Started
|
|
|
|
### Prerequisites
|
|
|
|
- Node.js >= 18.0.0
|
|
- PostgreSQL
|
|
- Redis
|
|
|
|
### Installation
|
|
|
|
1. Clone the repository
|
|
2. Install dependencies:
|
|
```bash
|
|
npm install
|
|
```
|
|
3. Copy `.env.example` to `.env` and configure your environment variables:
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
4. Start the development server:
|
|
```bash
|
|
npm start
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
| Variable | Description | Example |
|
|
|----------|-------------|---------|
|
|
| `PORT` | Server port | `3000` |
|
|
| `DATABASE_URL` | PostgreSQL connection string | `postgresql://user:pass@localhost:5432/db` |
|
|
| `REDIS_URL` | Redis connection string | `redis://localhost:6379` |
|
|
| `JWT_SECRET` | Secret key for JWT signing | `your_secret_key` |
|
|
| `API_KEY_PREFIX` | Prefix for API keys | `vi_` |
|
|
|
|
## API Endpoints
|
|
|
|
- `/api/auth` - Authentication endpoints
|
|
- `/api/ifsc` - IFSC code lookup
|
|
- `/api/pincode` - PIN code lookup
|
|
- `/api/gst` - GST verification
|
|
- `/api/pan` - PAN verification
|
|
- `/api/bank` - Bank account verification
|
|
- `/api/user` - User management
|
|
|
|
## License
|
|
|
|
ISC
|