A modern, all-in-one Islamic platform bui## Project Structure
├── Controllers/ # Business logic handlers
│ ├── authController # Authentication & authorization logic
│ ├── prayTimeController # Prayer times calculations
│ ├── weatherController # Weather data handling
│ ├── userController # User management
│ ├── emergencyController # Emergency services
│ └── cronJobController # Scheduled tasks
│
├── Model/ # Database schemas & models
│ ├── userModel # User profile schema
│ ├── emergencyModel # Emergency contacts schema
│ └── aroundYouModel # Local amenities schema
│
├── Routes/ # API route definitions
│ ├── authRoute # Authentication routes
│ ├── prayTimesRoute # Prayer times endpoints
│ ├── weatherRoute # Weather data endpoints
│ ├── emergencyRoute # Emergency services routes
│ └── userRoutes # User management endpoints
│
├── Middleware/ # Custom middleware functions
│ ├── errorMiddleware # Error handling
│ ├── uploadMiddleware # File upload handling
│ └── validatorMiddleware # Input validation
│
├── Utils/ # Helper functions & utilities
│ ├── appError # Error handling utilities
│ ├── generateToken # JWT token management
│ ├── geocode # Location services
│ ├── sendEmail # Email notification system
│ └── validator/ # Input validation rules
│
├── locales/ # Internationalization files
│ ├── ar/ # Arabic translations
│ └── en/ # English translations
│
├── views/ # Template files
│ └── profile.pug # Profile page template
│
├── app.js # Application entry point
├── config.env # Environment configuration
├── i18n.js # Internationalization setup
├── vercel.json # Vercel deployment config
└── package.json # Project dependencies
Tech Stack and Express.js, designed to empower Hajj and Umrah pilgrims with essential digital tools, real-time information, and local support services for a safe and fulfilling journey.
Tawaaf App offers a comprehensive suite of features to enhance the pilgrimage experience:
- Location-based, precise prayer times (Umm Al-Qura method)
- Real-time weather updates for Saudi Arabia
- Digital identity profiles with QR codes for easy verification
- Health status monitoring and instant visa validity checks
- Emergency contacts, nearby hospitals, pharmacies, restaurants, and hotels for quick access to local support
- Multi-language support (Arabic & English)
- Accurate prayer times based on user location (Umm Al-Qura method)
- Automatic timezone detection and 12-hour formatted times
- Real-time weather via Tomorrow.io API
- Current conditions, daily and hourly forecasts
- Temperature, wind, humidity, and weather icons
- Smart caching for fast performance
- Secure JWT authentication and registration
- Email verification and password reset
- QR code digital profiles for identity and passport info
- Photo upload and profile management
- Health and visa info tracking
- Emergency contacts and tourism company details
- Password hashing (bcrypt)
- JWT with expiration
- Rate limiting (500 req/5min/IP)
- Secure file upload and input validation
- Helmet.js, CORS, trust proxy
- Automated email notifications
- Cloudinary image storage
- MongoDB (Mongoose ODM)
- RESTful API
- Error handling and logging
- Cron jobs for visa expiration
- Emergency services by city
- Location-based amenities (restaurants, hotels, pharmacies, etc.)
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose)
- Auth: JWT, bcrypt
- File Storage: Cloudinary
- APIs: Tomorrow.io, Adhan.js
- Security: Helmet.js, CORS, Rate Limiting
- Docs: Postman
- Node.js v14+
- npm
- MongoDB
- Cloudinary account
- Tomorrow.io API key
- Gmail (for email notifications)
-
Clone the repo:
git clone https://github.com/ADIMYY/Tawaf.git cd Tawaf -
Install dependencies:
npm install
-
Configure environment variables in
config.env:PORT=3000 NODE_ENV=development DATA_BASE=your_mongodb_connection_string DB_PASSWORD=your_mongodb_password JWT_SECRET_KEY=your_jwt_secret JWT_EXPIRE_TIME=90d CLOUD_NAME=your_cloudinary_cloud_name API_KEY=your_cloudinary_api_key API_SECRET=your_cloudinary_api_secret WEATHER_API_KEY=your_tomorrow_io_api_key
-
Start the server:
# Development npm run start:dev # Production npm start
Full API docs: Postman Collection
- Auth:
/api/v1/auth(signup, login, password reset) - Users:
/api/v1/users(profile, update, delete) - Weather:
/api/v1/weather/:lat/:lon - Prayer Times:
/api/v1/prayTimes/:lat/:lon - Data Access:
/api/v1/get-data(QR code, passport lookup) - Emergency:
/api/v1/emergency(city filter, contacts) - Cron Jobs:
/api/v1/cronJob/deleteExpiredVisaUsers
- Comprehensive error responses (validation, auth, not found, server)
- 500 requests/5min/IP (X-RateLimit headers)
- Run tests:
npm test - Code style: Airbnb JavaScript Style Guide
- Fork the repo
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit (
git commit -m 'Add YourFeature') - Push (
git push origin feature/YourFeature) - Open a Pull Request
- Tomorrow.io (weather)
- Adhan.js (prayer times)
- Cloudinary (image hosting)
- MongoDB Atlas (database)