A comprehensive platform for Indian monument booking and tourism promotion
Itihaas is a Flask-based web application designed to promote tourism in India by enabling monument bookings, tour guide services, merchandise shopping, and interactive features like chatbots and reviews. Built for the Colloquium 2025 IT for Society project.
- 🏛️ Monument Booking System - Book visits to UNESCO heritage sites and monuments across India
- 🗺️ Interactive Maps - Explore monuments with Google Maps integration
- 👨🏫 Tour Guide Services - Connect with verified local guides and book tour packages
- 🛍️ Merchandise Store - Shop for cultural souvenirs, clothing, and accessories
- 💬 AI Chatbot - Get instant information about monuments and travel tips
- ⭐ Reviews & Ratings - Share experiences and read reviews from other travelers
- 🪙 Itihaas Coins - Loyalty rewards system for bookings and activities
- 📧 Email Verification - Secure account registration with email verification
- 🌐 Multi-language Support - Interface available in multiple languages
- 📱 WhatsApp Notifications - Booking confirmations via WhatsApp
- Backend: Flask (Python 3.12+)
- Database: SQLite with SQLAlchemy ORM
- Authentication: Flask-Login
- Email: Flask-Mail with Gmail SMTP
- NLP: spaCy for natural language processing
- Frontend: HTML, CSS, JavaScript (Jinja2 templates)
- Maps: Google Maps API
- Migrations: Flask-Migrate (Alembic)
Itihaas/
├── __init__.py # Flask app factory and configuration
├── run.py # Application entry point
├── config.py # Configuration settings
├── models.py # Database models (User, Booking, Guide, etc.)
├── views.py # Main application routes
├── auth.py # Authentication routes (login, signup)
├── merchandise.py # Merchandise/shop routes
├── chatbot.py # Chatbot functionality
├── email_utils.py # Email sending utilities
├── whatsapp.py # WhatsApp integration
├── translations.py # Multi-language support
├── website/ # Package shim for imports
├── templates/ # HTML templates
├── static/ # Static files (CSS, JS, images)
├── instance/ # Database file
├── requirements.txt # Python dependencies
└── .env.example # Environment variables template
- Python 3.12 or higher
- pip and virtualenv
- Gmail account with App Password (for email features)
- Google Maps API key (for map features)
-
Clone the repository
git clone https://github.com/stashlop/Itihaas.git cd Itihaas -
Create and activate a virtual environment
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Download spaCy language model
python -m spacy download en_core_web_sm
-
Set up environment variables
Copy the example environment file:
cp .env.example .env
Edit
.envand add your credentials:EMAIL_USER=your-email@gmail.com EMAIL_PASSWORD=your-gmail-app-password GOOGLE_MAPS_API_KEY=your-google-maps-api-key FLASK_DEBUG=1 FLASK_RUN_HOST=127.0.0.1 FLASK_RUN_PORT=5000
Important Notes:
- For Gmail, you must use an App Password, not your regular password
- Enable 2-Step Verification in your Google Account first
- Get a Google Maps API key from Google Cloud Console
-
Initialize the database
python run.py
The database will be created automatically on first run at
instance/database.db
python run.pyThe app will start at http://127.0.0.1:5000 by default.
export FLASK_APP=Itihaas:create_app # On Windows: set FLASK_APP=Itihaas:create_app
flask run --port 5000The app runs in debug mode by default when FLASK_DEBUG=1 is set in .env. This enables:
- Auto-reloading on code changes
- Detailed error pages
- Debug toolbar
| Variable | Description | Required | Default |
|---|---|---|---|
EMAIL_USER |
Gmail address for sending emails | No* | None |
EMAIL_PASSWORD |
Gmail App Password | No* | None |
GOOGLE_MAPS_API_KEY |
Google Maps API key | No* | None |
FLASK_DEBUG |
Enable debug mode (1 or 0) | No | 1 |
FLASK_RUN_HOST |
Host to bind the server | No | 127.0.0.1 |
FLASK_RUN_PORT |
Port to bind the server | No | 5000 |
SECRET_KEY |
Flask secret key for sessions | No | Auto-generated |
*Not required to run, but features will be limited without them.
- Go to your Google Account settings
- Enable 2-Step Verification
- Generate an App Password:
- Go to Security → 2-Step Verification → App passwords
- Select "Mail" and your device
- Copy the generated 16-character password
- Use this App Password in your
.envfile
-
Sign Up / Login
- Create an account with email verification
- Login with existing credentials
-
Browse Monuments
- Explore UNESCO heritage sites
- View details, images, and locations on map
-
Book Tickets
- Select monument, date, and number of visitors
- Choose tour guide (optional)
- Receive confirmation via email/WhatsApp
-
Hire Tour Guides
- Browse verified tour guides
- View guide profiles, ratings, and specializations
- Book tour packages
-
Shop Merchandise
- Browse clothing, accessories, and souvenirs
- Add items to cart and checkout
- Track order history
-
Write Reviews
- Share your experiences
- Rate monuments and guides
- Upload photos
-
Earn Itihaas Coins
- Earn coins through bookings and activities
- Use coins for discounts on future bookings
-
Register as Guide
- Sign up with guide credentials
- Add experience, languages, and specializations
- Get verified by admin
-
Create Tour Packages
- Design custom tour packages
- Set pricing and duration
- Manage bookings
-
View Dashboard
- Track bookings and earnings
- Manage availability
- View ratings and reviews
- Manage users, guides, and bookings
- Verify tour guides
- Monitor transactions
- Manage merchandise inventory
POST /sign-up- User registrationPOST /login- User loginPOST /logout- User logoutPOST /verify-email- Email verification
GET /booking- Booking formPOST /booking- Create bookingGET /booking-history- View booking history
GET /shop- Browse productsGET /shop/<id>- Product detailsPOST /cart/add- Add to cartGET /cart- View cartPOST /checkout- Checkout
POST /chatbot/chat- Send message to chatbotGET /chatbot/get_monuments- Get monument list
- User - User accounts and authentication
- Booking - Monument visit bookings
- Guide - Tour guide profiles
- TourPackage - Guided tour packages
- Merchandise - Shop products
- Order - Purchase orders
- Review - User reviews and ratings
- ItihaasCoins - Loyalty points system
- Transaction - Payment transactions
Error: "Error sending verification email. Please try again."
Solution:
- Check that
EMAIL_USERandEMAIL_PASSWORDare set in.env - Ensure you're using a Gmail App Password, not your regular password
- Check
email.logfor detailed error messages - Verify 2-Step Verification is enabled on your Google Account
Error: ModuleNotFoundError: No module named 'Itihaas'
Solution:
- Run
python run.pyfrom the project root directory - Or set
PYTHONPATH=/workspacesbefore running
Error: Database tables not found
Solution:
- Delete
instance/database.db - Restart the app to recreate tables
- Or run Flask-Migrate commands:
flask db init flask db migrate flask db upgrade
Solution:
- Set
GOOGLE_MAPS_API_KEYin.env - Enable Maps JavaScript API in Google Cloud Console
- Check browser console for API errors
# Coming soon
python -m pytest# Create migration
flask db migrate -m "Description of changes"
# Apply migration
flask db upgrade
# Rollback migration
flask db downgrade- Create new routes in
views.pyor create a new blueprint - Add database models in
models.py - Create templates in
templates/ - Update this README with new features
- Fork the repository
- Create a 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
This project is part of the Colloquium 2025 IT for Society initiative.
- Built for Colloquium 2025 - IT for Society Project
- UNESCO World Heritage Sites data
- Indian tourism and cultural heritage promotion
For questions or support, please open an issue on GitHub.
- Payment gateway integration (Stripe/Razorpay)
- Mobile app (React Native)
- Advanced analytics dashboard
- Social media integration
- AR/VR monument tours
- Multi-currency support
- Advanced search and filters
- Blog/news section
- Push notifications
- Offline mode support