Algorail Frontend is a Vite + React + TypeScript application for a railway traffic control experience. It includes a marketing landing page, an operations dashboard, AI-driven recommendation cards, scheduling views, and a control sidebar for live station management.
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Framer Motion
- React Router
- Sonner for toast notifications
src/pages/Index.tsx- landing page contentsrc/pages/Dashboard.tsx- live operations dashboardsrc/components/sections/- landing page sectionssrc/components/dashboard/- dashboard widgets and panelssrc/components/ui/- shared UI primitivessrc/data/- mock data used by the dashboardsrc/hooks/- reusable hooks
Run all commands from the frontend folder:
cd frontend
npm install
npm run devOpen the local Vite URL printed in the terminal, usually http://localhost:8080.
npm run dev- start the Vite development servernpm run build- type-check and build the production bundlenpm run preview- preview the production build locally
- Railway operations dashboard with live metrics
- AI algorithm recommendations panel
- Quick actions for operational control
- Schedule and network schematic views
- Landing page sections for product overview
- The app is intended to be opened from the
frontenddirectory. - If you see a module error for
src/App.tsx, make sure that file exists and is exported correctly, sincesrc/main.tsxcurrently imports it as the root component. - If you add new UI libraries, install them with npm and commit the updated
package.jsonandpackage-lock.json.
- Keep dashboard data in
src/data/mockData.tsif you want to extend the mock experience. - Place reusable UI changes in
src/components/ui/. - Keep page-level layout in
src/pages/and reusable view logic insrc/components/dashboard/.