How praveensaharan/smile-hackathon works
LogiPredict is a logistics booking and pricing application with user and administrator experiences. The principal flow collects shipment details, obtains a distance and route from Ola Maps, requests a predicted price, and submits the booking to the backend; users can also review orders, while administrators view metrics and adjust the experiment split. The backend exposes authenticated order, prediction, and metrics routes, with utility and database layers supporting them. Some frontend and backend implementation details were not sampled, so uncertain connections are omitted.
Main entry points: routes.js API routes · App.jsx React app and routes · FormSubmission.jsx Booking confirmation · FormUser.jsx Booking form
Components 19
Web experience
- React app and routes
frontend/src/App.jsx - Sign-in
frontend/src/components/Signin.jsx - User dashboard
frontend/src/components/User/Dashboard.jsx - Admin dashboard
frontend/src/components/Admin/Dashboard.jsx
Booking and maps
- Booking form
frontend/src/components/UserHome1/FormUser.jsx - Booking steps
frontend/src/components/UserHome1/FormStep1.jsx - Booking data
frontend/src/components/UserHome1/FormData.jsx - Booking confirmation
frontend/src/components/User/FormSubmission.jsx - Route map
frontend/src/components/UserHome1/Map.jsx - Ola Maps
Backend services
- Express API
backend/index.js - API routes
backend/routes.js - Order and pricing services
backend/utils.js - PostgreSQL
backend/db.js - Clerk authentication
backend/clerk.js
Pricing and analytics
- Admin metrics and controls
frontend/src/components/Admin/Content.jsx - Price prediction API
ml-model/main.py - Experiment metrics
backend/utils.js
Other components
- User
Connections 23
- User → React app and routes: uses
frontend/src/App.jsx - React app and routes → Sign-in: routes to
frontend/src/App.jsx - React app and routes → Booking form: routes to
frontend/src/App.jsx - React app and routes → Booking confirmation: routes to
frontend/src/App.jsx - React app and routes → User dashboard: routes to
frontend/src/App.jsx - React app and routes → Admin dashboard: routes to
frontend/src/App.jsx - Booking form → Booking steps: renders
frontend/src/components/UserHome1/FormUser.jsx - Booking form → Booking data: renders
frontend/src/components/UserHome1/FormUser.jsx - Booking confirmation → Route map: renders
frontend/src/components/User/FormSubmission.jsx - Route map → Ola Maps: requests route
frontend/src/components/UserHome1/Map.jsx - Booking confirmation → Ola Maps: requests directions
frontend/src/components/User/FormSubmission.jsx - Booking confirmation → Price prediction API: requests price
frontend/src/components/User/FormSubmission.jsx - Booking confirmation → API routes: submits order
frontend/src/components/User/FormSubmission.jsx - Booking confirmation → API routes: requests prediction
frontend/src/components/User/FormSubmission.jsx - User dashboard → API routes: loads orders
- Admin dashboard → Admin metrics and controls: renders
frontend/src/components/Admin/Dashboard.jsx - Admin metrics and controls → API routes: requests metrics
frontend/src/components/Admin/Content.jsx - Express API → API routes: mounts routes
backend/index.js - API routes → Order and pricing services: calls services
backend/routes.js - API routes → Clerk authentication: authenticates users
backend/routes.js - Order and pricing services → PostgreSQL: queries and updates
backend/utils.js - Order and pricing services → Experiment metrics: calculates metrics
backend/utils.js - API routes → Experiment metrics: requests metrics
backend/routes.js