🗺️ Comprehensive Coverage — Detailed info on all Indian states, union territories, destinations, and cultural heritage
🔐 Secure Auth — Google OAuth 2.0 with JWT sessions
💾 Cloud Sync — Save favorite places across devices
📱 Responsive — Beautiful UI on any screen size
- Node.js 18+
- MySQL 8+
- Google OAuth credentials
# Clone the repository
git clone https://github.com/aryanjsx/know-India.git
cd know-India
# Install dependencies
cd backend && npm install
cd ../frontend && npm installCreate backend/.env:
DB_HOST=your_mysql_host
DB_USER=your_mysql_user
DB_PASSWORD=your_mysql_password
DB_NAME=knowindia
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
JWT_SECRET=your_jwt_secret# Terminal 1 — Backend
cd backend && npm start
# Terminal 2 — Frontend
cd frontend && npm start| Layer | Technologies |
|---|---|
| Frontend | React 18, Tailwind CSS, Framer Motion |
| Backend | Node.js, Express.js |
| Database | MySQL |
| Auth | Google OAuth 2.0, JWT |
| Data | @aryanjsx/knowindia |
know-India/
├── .github/
│ └── workflows/
│ └── ci.yml # CI/CD pipeline
├── frontend/ # React application
│ ├── .eslintrc.js # ESLint configuration
│ └── src/
│ ├── __tests__/ # Smoke tests
│ ├── __mocks__/ # Test mocks
│ ├── components/
│ ├── pages/
│ ├── context/
│ └── utils/
├── backend/ # Express API server
│ ├── controllers/
│ ├── routes/
│ ├── services/
│ └── utils/
└── README.md
Security Posture: MODERATE (80%) — Production-ready with OWASP Top 10 alignment.
This platform is built with security-first principles:
| Category | Implementation |
|---|---|
| HTTP Security Headers | Helmet.js with CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy |
| Rate Limiting | API protection (200 req/15min) + Auth limits (10 attempts/15min) |
| Authentication | JWT with mandatory secret, 1h expiry, HS256 algorithm, token blacklisting on logout |
| Authorization | Ownership verification for user content, IDOR protection via JWT-based user ID |
| Database | MySQL connection pooling, SSL enforcement in production, parameterized queries |
| Input Validation | Server-side validation on all endpoints, ID validation, string length limits |
| File Uploads | Strict MIME type + extension validation, SVG blocked, path traversal prevention |
| Error Handling | Sanitized responses in production, no internal details leaked |
| Debug Endpoints | Automatically disabled in production (NODE_ENV=production) |
# Authentication (CRITICAL)
JWT_SECRET=your-strong-secret-min-32-chars
# Database
DB_HOST=your_mysql_host
DB_PORT=3306
DB_USERNAME=your_mysql_user
DB_PASSWORD=your_mysql_password
DB_DATABASE=knowindia
# Google OAuth
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Environment
NODE_ENV=production # Enables strict security mode# Check for known vulnerabilities
cd backend && npm audit
# Fix automatically where possible
cd backend && npm audit fix- Multi-language support
- Offline PWA mode
- Community travel stories
- Budget calculator
- Hotel/flight integration
This project uses ESLint to maintain code quality with strict rules for unused imports.
# Run linter
cd frontend && npm run lint
# Auto-fix issues
cd frontend && npm run lint:fix
# Run tests
cd frontend && npm testGitHub Actions automatically runs on every push and PR to main/develop:
| Check | Description |
|---|---|
| ESLint | Catches unused imports/variables as errors |
| Tests | Runs smoke tests for critical pages |
| Build | Ensures production build succeeds |
| Syntax | Validates backend JavaScript syntax |
Contributions make open source amazing. All skill levels welcome!
- 🐛 Bug fixes
- 📝 Documentation improvements
- 🎨 UI/UX enhancements
- 🌐 Adding translations
- Fork the repository
- Create a branch:
git checkout -b feature/amazing-feature - Run lint before committing:
npm run lint - Commit changes:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
Note: CI will fail if there are unused imports or linting errors.
Please read our Contributing Guidelines for details.
Distributed under the MIT License. See LICENSE for details.
- KnowIndia NPM Package — Curated Indian destination data
- All our amazing contributors
