A comprehensive multi-platform solution for PDF management, document search, and content discovery with advanced authentication and admin management
VayuReader is a powerful, multi-module platform designed for seamless PDF document management, intelligent search capabilities, and comprehensive content organization. The platform combines a mobile-first approach with robust backend services and an intuitive admin dashboard.
- π± Android Mobile App β Built with React Native (Expo) for Android platform
- π Intelligent PDF Search - Advanced search engine with full-text indexing
- π Dictionary Integration - Built-in dictionary with synonyms and antonyms
- π€ Abbreviation Management - Comprehensive abbreviation lookup system
- π Secure Authentication - OTP-based user authentication and JWT-based admin authentication
- π¨βπΌ Admin Dashboard - Web-based content management interface with role-based access
- π₯ Sub-Admin Management - Super admin can create and manage sub-admins
- π Audit Logging - Complete activity tracking for all admin actions
- π Role-Based Access Control - Users (read-only), Admins (full access)
- βοΈ Cloud-Ready - Scalable microservices architecture
βββββββββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββββββββββ
β Mobile App β β Backend APIs β β Admin Dashboard β
β (React Native) βββββΊβ (Node.js/Express) βββββΊβ (React/Tailwind) β
β β β β β β
β β’ PDF Viewer β β β’ PDF Search β β β’ Content Managementβ
β β’ Search Interface β β β’ Authentication β β β’ User Management β
β β’ Dictionary β β β’ Abbreviations β β β’ Sub-Admin Mgmt β
β β’ Abbreviations β β β’ Dictionary API β β β’ Audit Logs β
βββββββββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββ
β MongoDB Atlas β
β (Database) β
βββββββββββββββββββββββ
VayuReader/
βββ π± VayuReader_Frontend/ # Mobile Application
β βββ app/ # File-based routing
β βββ components/ # Reusable UI components
β βββ services/ # API integration
β βββ assets/ # Images, fonts, etc.
β
βββ π₯οΈ VayuReader_Backend/ # Backend Services
β βββ pdf-search-engine/ # PDF management & search (Port 3005)
β βββ abrebiations/ # Abbreviation API (Port 3001)
β βββ dictionary-api/ # Dictionary service (Port 3000)
β βββ auth/ # User OTP authentication (Port 3010)
β βββ admin_auth/ # Admin authentication & management (Port 3012)
β β βββ middleware/ # Unified authentication middleware
β β βββ controllers/ # Sub-admin management
β β βββ models/ # Audit logs, Sub-admins
β β βββ routes/ # Audit routes, Sub-admin routes
β βββ shared/ # Common utilities
β
βββ π VayuReader_AdminDashboard/ # Web Admin Interface
βββ frontend/ # React dashboard
β βββ components/ # Dashboard components
β β βββ ManageAbbreviations.jsx
β β βββ ManagePDFs.jsx
β β βββ ManageDictionaryWords.jsx
β β βββ ManageSubAdmins.jsx
β βββ services/ # Admin API calls
- Node.js 18.x or higher
- MongoDB 6.0+ (or MongoDB Atlas)
- Expo CLI
- Git
- Docker & Docker Compose (optional, for containerized deployment)
-
Clone the repository
git clone https://github.com/yourusername/VayuReader.git cd VayuReader -
Backend Setup
Each service needs to be set up individually:
# 1. Auth Service (User OTP Authentication) cd VayuReader_Backend/auth npm install cp env.sample .env # Edit .env with your MongoDB URI and JWT_SECRET npm run dev # Runs on port 3010 # 2. Admin Auth Service cd ../admin_auth npm install # Create .env file (see Configuration section) npm run dev # Runs on port 3012 # 3. Abbreviations Service cd ../abrebiations npm install # Create .env with MONGODB_URI npm run dev # Runs on port 3001 # 4. PDF Search Engine cd ../pdf-search-engine npm install # Create .env with MONGODB_URI npm run dev # Runs on port 3005 # 5. Dictionary API cd ../dictionary-api npm install # Create .env with MONGODB_URI npm run dev # Runs on port 3000
-
Admin Dashboard Setup
cd VayuReader_AdminDashboard/frontend npm install npm start -
Mobile App Setup See detailed instructions in Mobile App Setup section below.
PORT=3010
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/dbname
JWT_SECRET=your-secret-key-change-this
JWT_EXPIRY_DAYS=1
OTP_EXPIRY_MINUTES=5
OTP_GATEWAY_URL=http://msg.com:8080/smsc/sends msg
SKIP_OTP_SEND=true # Set to true for developmentADMIN_NAME=Himanshu Bhatt
ADMIN_CONTACT=89200 67341
JWT_SECRET=admin-secret-key-change-this
JWT_EXPIRY_DAYS=1
ADMIN_AUTH_PORT=3012
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/dbname
USER_JWT_SECRET=change_me # Should match JWT_SECRET from auth serviceEach service needs:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/dbname
PORT=<service_port>Users authenticate using OTP sent to their phone number:
-
Request OTP
POST http://localhost:3010/api/auth/login/request-otp Body: { "name": "User Name", "phone_number": "9876543210" } -
Verify OTP
POST http://localhost:3010/api/auth/login/verify-otp Body: { "phone_number": "9876543210", "otp": "123456" } Response: { "token": "jwt_token", "user": {...} }
User Permissions: Read-only access (GET requests only)
Admins authenticate with name and contact:
POST http://localhost:3012/api/auth/login
Body: { "name": "Himanshu Bhatt", "contact": "89200 67341" }
Response: { "token": "jwt_token", "admin": {...} }Admin Permissions: Full access (GET, POST, PUT, DELETE)
Super admin can create and manage sub-admins:
# Get all sub-admins (Super admin only)
GET http://localhost:3012/api/sub-admins
Headers: Authorization: Bearer <super_admin_token>
# Create sub-admin (Super admin only)
POST http://localhost:3012/api/sub-admins
Body: { "name": "Sub Admin", "contact": "1234567890" }
# Delete sub-admin (Super admin only)
DELETE http://localhost:3012/api/sub-admins/<id>Sub-Admin Permissions: Same as super admin (full access to content, but cannot manage other admins)
All admin actions are automatically logged:
# Get audit logs
GET http://localhost:3012/api/audit/logs?page=1&limit=50
Headers: Authorization: Bearer <admin_token>
# Get audit statistics
GET http://localhost:3012/api/audit/stats
Headers: Authorization: Bearer <admin_token>Audit logs track:
- Action type (CREATE, UPDATE, DELETE)
- Resource type (ABBREVIATION, PDF, DICTIONARY_WORD)
- Admin information (name, contact)
- Timestamp
- Resource details
| Service | Port | Base URL |
|---|---|---|
| Auth Service | 3010 | http://localhost:3010 |
| Admin Auth Service | 3012 | http://localhost:3012 |
| Abbreviations Service | 3001 | http://localhost:3001 |
| PDF Service | 3005 | http://localhost:3005 |
| Dictionary Service | 3000 | http://localhost:3000 |
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/auth/login/request-otp |
POST | None | Request OTP for user login |
/api/auth/login/verify-otp |
POST | None | Verify OTP and get user token |
/api/auth/login |
POST | None | Admin login |
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/abbreviations/:abbr |
GET | User/Admin | Get abbreviation by name |
/api/abbreviations/all |
GET | User/Admin | Get all abbreviations |
/api/abbreviations |
POST | Admin | Create abbreviation |
/api/abbreviations/:id |
PUT | Admin | Update abbreviation |
/api/abbreviations/:id |
DELETE | Admin | Delete abbreviation |
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/pdfs |
GET | User/Admin | Search PDFs |
/api/pdfs/all |
GET | User/Admin | Get all PDFs |
/api/pdfs/:id |
GET | User/Admin | Get PDF by ID |
/api/pdfs/upload |
POST | Admin | Upload PDF |
/api/pdfs/:id |
PUT | Admin | Update PDF |
/api/pdfs/:id |
DELETE | Admin | Delete PDF |
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/dictionary/word/:word |
GET | User/Admin | Get word definition |
/api/dictionary/words |
GET | User/Admin | Get word list |
/api/dictionary/words/all |
GET | User/Admin | Get all words |
/api/dictionary/search/:term |
GET | User/Admin | Search words |
/api/dictionary |
POST | Admin | Add word |
/api/dictionary/:id |
PUT | Admin | Update word |
/api/dictionary/:id |
DELETE | Admin | Delete word |
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/sub-admins |
GET | Super Admin | Get all sub-admins |
/api/sub-admins |
POST | Super Admin | Create sub-admin |
/api/sub-admins/:id |
DELETE | Super Admin | Delete sub-admin |
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/audit/logs |
GET | Admin | Get audit logs (with filters) |
/api/audit/stats |
GET | Admin | Get audit statistics |
- An Android phone
- A laptop/PC with the project set up
- Both devices on the same Wi-Fi or hotspot
-
Install the App on Your Phone
- Download the APK from the provided link
- Allow installation from unknown sources
- Install the app
-
Start the Development Server
cd VayuReader_Frontend npx expo start --dev-client -
Connect Your Phone
- The app should auto-connect
- If not, manually enter the connection URL from the terminal
-
Update Code
- No need to reinstall
- Just restart the dev server and reopen the app
-
Rebuild App (only when needed)
eas build --platform android --profile development
See POSTMAN_TESTING_GUIDE.md for comprehensive API testing instructions.
- User can request and verify OTP
- User can read data (GET requests)
- User cannot write data (POST/PUT/DELETE - should get 403)
- Admin can login
- Admin can perform all operations
- Super admin can manage sub-admins
- Sub-admins cannot manage other admins
- Audit logs are being recorded
- React Native - Cross-platform mobile development
- Expo - Development platform and tools
- NativeWind - Tailwind CSS for React Native
- React Navigation - Navigation library
- Axios - HTTP client
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- JWT - Authentication tokens
- Multer - File upload handling
- bcrypt - Password hashing (for legacy)
- Docker - Containerization
- React - UI library
- Tailwind CSS - Utility-first CSS framework
- React Router - Client-side routing
- Axios - HTTP client
cd VayuReader_Backend
docker-compose up --buildEach service has its own Dockerfile for independent deployment.
Deploy to cloud providers (AWS, GCP, Azure, Render, etc.)
Build and deploy using Expo EAS
Deploy to Vercel, Netlify, or similar platform
- Full-text search across PDF content
- Advanced query syntax support
- Search result ranking and relevance
- Bulk PDF upload and processing
- Metadata management
- File organization and categorization
- OTP-based user authentication
- Admin and sub-admin management
- Role-based access control
- Complete activity logging
- Admin action tracking
- Statistics and reporting
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For issues, questions, or contributions, please open an issue on GitHub.
- AI-powered content recommendations
- Multi-language support
- Advanced analytics dashboard
- Integration with cloud storage providers
- Voice search capabilities
- Collaborative annotation features
- Real-time notifications
- Advanced search filters
This project is licensed under the ISC License.
Built with β€οΈ for the Indian Air Force community