Ride and Explore with Absolute Certainty
RideCast is a full-stack motorcycle rider companion app that delivers real-time weather safety intelligence, AI-powered briefings, tyre traction analysis, ride logging, and hotspot management β all in a sleek dark-mode interface.
| Layer | Technology |
|---|---|
| Framework | Angular 21 |
| Styling | Tailwind CSS |
| Maps | Leaflet.js |
| Language | TypeScript |
| Layer | Technology |
|---|---|
| Runtime | Node.js + TypeScript |
| Framework | Express.js |
| Database | MongoDB via Mongoose |
| AI | Google Gemini API (@google/genai) |
| Auth | JWT + bcryptjs |
| Nodemailer |
- Rider Safety Dashboard β Real-time weather (temp, wind, humidity, rain), Safety Index score (0β100), Tyre Traction & Tarmac temperature analysis, and ride advisory (Safe / Caution / Dangerous).
- Weather Details β Current conditions + 7-day forecast with daily summaries.
- Saved Hotspots β Save favourite riding locations by coordinates. Interactive Leaflet map shows the active hotspot pin. GPS auto-fill supported.
- Rides Logbook β Log rides with title, distance, duration, notes, and hotspot reference. Auto-captures weather snapshot at time of logging.
- Rider AI Advisor β Gemini-powered chat assistant with context-aware answers about road safety, grip, crosswinds, and optimal ride windows. Includes a Safety Briefing tab with a full-page report.
- Warnings & Alerts β Active road hazard alerts fetched for the current hotspot.
- User Auth β Register, login, forgot password, reset password (email flow).
- Profile Management β Update name, email, password, and profile picture.
- Settings β Toggle distance unit (km / mi), temperature unit (Β°C / Β°F), and notification preferences.
- Admin Console β Manage users, set system-wide announcements, view visitor stats, send broadcast emails, manage all rides.
- System Announcements β Dynamic banner displayed app-wide when an admin activates an announcement.
ridecast/
βββ src/ # Angular frontend
β βββ app/
β β βββ components/ # Navbar, Toast, Spinner
β β βββ guards/ # auth.guard.ts
β β βββ interceptors/ # api.interceptor.ts (JWT + base URL)
β β βββ pages/ # All route pages
β β β βββ landing/
β β β βββ login/
β β β βββ register/
β β β βββ forgot-password/
β β β βββ reset-password/
β β β βββ dashboard/
β β β βββ weather/
β β β βββ locations/
β β β βββ rides/
β β β βββ ai-chat/
β β β βββ profile/
β β β βββ settings/
β β β βββ admin/
β β β βββ not-found/
β β βββ services/ # auth, toast, weather, location, ai, settings
β βββ environments/ # environment.ts / environment.development.ts
β
βββ backend/ # Express API
β βββ src/
β βββ models/ # Mongoose models (User, Ride, Location, etc.)
β βββ routes/ # API route handlers
β β βββ auth.ts # Register, login, password reset
β β βββ dashboard.ts # Weather + safety data aggregation
β β βββ weather.ts # Forecast endpoints
β β βββ locations.ts # Hotspot CRUD
β β βββ rides.ts # Ride log CRUD
β β βββ ai.ts # Gemini AI chat + briefing
β β βββ safety.ts # Safety index calculation
β β βββ admin.ts # Admin management
β β βββ health.ts # Health check
β βββ middleware/ # Auth middleware, rate limiting
β βββ services/ # Gemini AI service, weather service
β βββ utils/ # Helpers
β
βββ public/ # Static assets (favicons, icons)
- Node.js v18+
- MongoDB running locally (
mongodb://127.0.0.1:27017) - Angular CLI v21 (
npm install -g @angular/cli) - Optional: Google Gemini API key for full AI functionality
git clone https://github.com/your-username/ridecast.git
cd ridecastcd backend
npm installCreate a .env file in backend/:
PORT=5000
MONGODB_URI=mongodb://127.0.0.1:27017/ridecast
JWT_SECRET=your_super_secret_jwt_key
GEMINI_API_KEY=your_gemini_api_key
NODE_ENV=development
FRONTEND_URL=http://localhost:4200
# Email (optional β for password reset)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your@email.com
SMTP_PASS=your_app_password
SMTP_FROM=RideCast <your@email.com>Start the dev server:
npm run devBackend runs at http://localhost:5000
# From the project root
npm install
npm startFrontend runs at http://localhost:4200
The Angular
ApiInterceptorautomatically rewrites all/api/calls tohttp://localhost:5000in development β no proxy config needed.
| File | Purpose |
|---|---|
src/environments/environment.ts |
Production API URL |
src/environments/environment.development.ts |
Development API URL (http://localhost:5000) |
File replacement is configured in angular.json so the correct environment is automatically
selected per build configuration.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login and receive JWT |
| POST | /api/auth/forgot-password |
Send password reset email |
| POST | /api/auth/reset-password |
Reset password with token |
| GET | /api/dashboard |
Aggregated weather + safety data |
| GET | /api/weather/forecast |
7-day weather forecast |
| GET/POST | /api/locations |
Get / save hotspots |
| DELETE | /api/locations/:id |
Delete a hotspot |
| GET/POST | /api/rides |
Get / log rides |
| DELETE | /api/rides/:id |
Delete a ride |
| POST | /api/ai/chat |
Gemini AI chat query |
| POST | /api/ai/briefing |
Generate safety briefing report |
| GET | /api/safety |
Get safety warnings & alerts |
| GET | /api/health |
Server health check |
| GET/PUT | /api/admin/* |
Admin management routes |
# Frontend
npm run build
# Backend
cd backend
npm run build
npm startWhen GEMINI_API_KEY is not set, the backend runs in Mock/Demo mode β the AI advisor
returns weather-contextual canned responses. Add a valid key from
Google AI Studio to enable full Gemini-powered responses.
@angular/corev21leafletβ interactive mapsrxjsβ reactive data streams
expressβ HTTP servermongooseβ MongoDB ODMjsonwebtokenβ JWT authbcryptjsβ password hashing@google/genaiβ Gemini AI SDKnodemailerβ transactional emailhelmet+express-rate-limitβ security
MIT