How skarthik12321/trekking-management-application-23f2000278 works
TrekFlow is a role-based trekking management application: trekkers discover routes, book and manage reservations, while staff manage assigned treks and administrators oversee the platform. Its Vue SPA calls a Flask API backed by SQLAlchemy/SQLite; the API handles authentication, catalog, booking, admin and staff workflows. Celery adds scheduled reminders, monthly reports and user-triggered exports, with Redis used for caching and job infrastructure. The README documents capabilities beyond the sampled excerpts; links for those are attributed to it rather than implying unsampled code was inspected.
Main entry points: app.py Flask application · booking_routes.py Booking API · database.py SQLAlchemy layer · index.js Role portals
Components 34
Vue client
- Vue application
frontend/src/App.vue - Role portals
frontend/src/router/index.js - Trek discovery
frontend/src/views/UserTreksView.vue - Booking interface
frontend/src/components/BookingModal.vue - User portal
frontend/src/views/UserDashboardView.vue - Admin portal
frontend/src/views/AdminTreksView.vue - Staff portal
frontend/src/views/StaffDashboardView.vue - Analytics charts
frontend/src/components/StatsChart.vue - Auth state
frontend/src/store/auth.js
Flask API
- Flask application
backend/app.py - Authentication
backend/routes/auth_routes.py - Trek catalog API
backend/routes/trek_routes.py - Booking API
backend/routes/booking_routes.py - Admin API
backend/routes/admin_routes.py - Staff API
backend/routes/staff_routes.py
Trek domain
- User accounts
backend/models/user.py - Staff profile
backend/models/staff_profile.py - Trek records
backend/models/trek.py - Booking records
backend/models/booking.py - Notifications
backend/models/notification.py
Async services
- Batch jobs
backend/tasks/celery_app.py - Trek cache
backend/utils/cache.py - Email delivery
backend/utils/email_service.py - Email templates
backend/utils/email_templates.py - PDF reports
backend/utils/pdf_generator.py
Runtime foundation
- JWT and RBAC
backend/utils/auth.py - SQLAlchemy layer
backend/database.py - SQLite database
- Redis
- Initial seeding
backend/init_db.py
Other components
- Trekker
- Trek staff
- Administrator
- SMTP service
Connections 48
- Trekker → Vue application: uses
- Trek staff → Vue application: uses
- Administrator → Vue application: uses
- Vue application → Role portals: routes views
frontend/src/main.js - Role portals → Trek discovery: routes to
- Role portals → User portal: routes to
- Role portals → Admin portal: routes to
- Role portals → Staff portal: routes to
- Trek discovery → Booking interface: opens
- Admin portal → Analytics charts: visualizes
- Vue application → Flask application: calls API
- Flask application → Authentication: registers
backend/app.py - Flask application → Trek catalog API: registers
backend/app.py - Flask application → Booking API: registers
backend/app.py - Flask application → Admin API: registers
backend/app.py - Flask application → Staff API: registers
backend/app.py - Flask application → SQLAlchemy layer: initializes
backend/app.py - Flask application → Initial seeding: seeds on startup
backend/app.py - Authentication → JWT and RBAC: authenticates with
backend/routes/auth_routes.py - JWT and RBAC → User accounts: loads user
backend/utils/auth.py - Trek catalog API → Trek records: queries and updates
backend/routes/trek_routes.py - Trek catalog API → Booking records: checks bookings
backend/routes/trek_routes.py - Trek catalog API → Trek cache: invalidates
backend/routes/trek_routes.py - Booking API → Trek records: loads trek
backend/routes/booking_routes.py - Booking API → Booking records: creates booking
backend/routes/booking_routes.py - Booking API → Notifications: creates alert
backend/routes/booking_routes.py - Booking API → Trek cache: invalidates
backend/routes/booking_routes.py - Booking API → Email delivery: sends receipt
backend/routes/booking_routes.py - Booking API → PDF reports: generates receipt
backend/routes/booking_routes.py - Booking API → Batch jobs: queues export
backend/routes/booking_routes.py - Admin API → User accounts: manages accounts
backend/routes/admin_routes.py - Admin API → Trek records: assigns staff
backend/routes/admin_routes.py - Admin API → Booking records: lists bookings
backend/routes/admin_routes.py - Admin API → Batch jobs: triggers report
backend/routes/admin_routes.py - Staff API → Trek records: manages assigned treks
backend/routes/staff_routes.py - Staff API → Booking records: manages roster
backend/routes/staff_routes.py - Batch jobs → Notifications: records alerts
backend/tasks/celery_app.py - Batch jobs → Email delivery: sends messages
backend/tasks/celery_app.py - Batch jobs → PDF reports: generates report
backend/tasks/celery_app.py - Email delivery → SMTP service: sends mail
backend/utils/email_service.py - Authentication → Email templates: renders messages
backend/routes/auth_routes.py - SQLAlchemy layer → SQLite database: persists data
- User accounts → SQLAlchemy layer: maps entities
backend/models/user.py - Staff profile → SQLAlchemy layer: maps entities
backend/models/staff_profile.py - Trek records → SQLAlchemy layer: maps entities
backend/models/trek.py - Booking records → SQLAlchemy layer: maps entities
backend/models/booking.py - Notifications → SQLAlchemy layer: maps entities
backend/models/notification.py - Trek cache → Redis: caches listings