Skip to content

Naveenramgeek/ride-app-client-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ride Matching UI

Angular-based web application for the Ride Matching platform. Supports Admin, Driver, and Rider roles with separate dashboards, authentication, and workflows.

Tech Stack

  • Angular 18
  • Bootstrap 5 & ng-bootstrap
  • Chart.js / ng2-charts for dashboards
  • JWT (@auth0/angular-jwt, jwt-decode) for auth
  • RxJS, Moment.js, UUID

Prerequisites

Getting Started

1. Install dependencies

npm install

2. Start the development server

npm start

Or:

ng serve

Open http://localhost:4200/ in your browser. The app reloads automatically on file changes.

Build

npm run build

Output goes to dist/ride-matching-ui/.

Project Structure

src/app/
├── components/          # UI components
│   ├── admin/           # Admin dashboard, user/rides/bookings management
│   ├── driver/          # Driver dashboard, rides, bookings, earnings, profile
│   ├── rider/           # Rider ride details, bookings, payments, feedback, profile
│   ├── landing-page/    # Home / landing
│   ├── login/           # Login (driver, rider, admin)
│   ├── signup-page/     # Signup flow
│   ├── driver-signup/   # Driver registration
│   └── rider-signup/    # Rider registration
├── guards/              # Auth guard (role-based)
├── interceptors/        # HTTP interceptors (e.g. JWT)
├── models/              # TypeScript models
├── services/            # API client, resolvers
└── app-routing.module   # Routes and role-based access

Features

Admin

  • Dashboard – Metrics and overview
  • User management – View and manage users
  • Rides management – View and manage rides
  • Bookings management – View and manage bookings

Driver

  • Dashboard – Overview of rides and bookings
  • Rides – Create, edit, and manage rides
  • Bookings – View and manage bookings per ride
  • Earnings – Payment history
  • Ratings & feedback – Driver feedback
  • Profile – Edit profile, vehicles

Rider

  • Ride details – Browse and view ride details
  • My bookings – View and manage bookings
  • Payments – Payment history
  • Feedback – Rate and review
  • Profile – Edit profile

Routes Overview

Path Role Description
/ Landing page
/login, /signup Auth
/driver-signup, /rider-signup Role-specific signup
/driver-login, /rider-login, /admin-login Role-specific login
/driver/dashboard Driver Driver dashboard
/driver/rides Driver Manage rides
/driver/bookings/:rideId Driver Bookings for a ride
/driver/earnings Driver Earnings
/driver/profile Driver Driver profile
/rider/ride-details Rider Browse rides
/rider/ride-details/:rideId Rider Ride details
/rider/my-bookings Rider Rider bookings
/rider/payments Rider Payment history
/rider/profile Rider Rider profile
/admin/dashboard Admin Admin dashboard
/admin/usermanagement Admin User management
/admin/ridesmanagement Admin Rides management
/admin/bookingsmanagement Admin Bookings management

Backend API

The UI talks to the Ride Matching backend at http://localhost:8082.
Configure the base URL in src/app/services/auth.service.ts if your API runs elsewhere.

Tests

ng test

Runs unit tests with Karma.

Further Help

=======================================================================================================================================================

Ride Matching Application (Backend)

Spring Boot REST API for the Ride Matching platform. Handles Admin, Driver, and Rider flows: authentication, rides, bookings, payments, vehicles, and user management.

Tech Stack

  • Java 21
  • Spring Boot 3.4
  • Spring Security + JWT (JJWT 0.11.5)
  • Spring Data MongoDB
  • Spring Mail
  • Lombok
  • Maven

Prerequisites

  • JDK 21
  • Maven 3.6+
  • MongoDB (local or Atlas)
  • SMTP config (e.g. Gmail) for emails

Configuration

Edit src/main/resources/application.properties:

MongoDB

spring.data.mongodb.uri=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/database?retryWrites=true&w=majority
spring.data.mongodb.database=rideMatchingApplication

Replace <username>, <password>, and the cluster URL for your MongoDB instance.

Server

server.port=8082

JWT

jwt.secret=your_secret_key
jwt.expiration=3600000

Use a strong, unique jwt.secret in production.

File uploads

file.upload-dir=uploads
spring.web.resources.static-locations=file:uploads/

Profile pictures and similar files are stored under uploads/.

Email (optional)

spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=your-email@gmail.com
spring.mail.password=your-app-password
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

Adjust for your SMTP provider. For Gmail, use an App Password.

Build & Run

Build

mvn clean install

Run

mvn spring-boot:run

Or run the packaged JAR:

java -jar target/rideMatchingApplication-0.0.1-SNAPSHOT.jar

API base: http://localhost:8082

Project Structure

src/main/java/com/adbProject/rideMatchingApplication/
├── RideMatchingApplication.java   # Entry point
├── config/                        # CORS, Security
├── controller/                    # REST endpoints
│   ├── AdminController
│   ├── AuthController
│   ├── BookingController
│   ├── DriverController
│   ├── PaymentController
│   ├── RideController
│   ├── RiderController
│   └── VehicleController
├── dto/                           # Request/response DTOs
├── exception/                     # Custom exceptions
├── filter/                        # JWT filter
├── model/                         # Domain entities
├── repository/                    # MongoDB repositories
└── service/                       # Business logic

API Overview

Area Endpoints Description
Auth /auth/signin, /auth/signup, /auth/users, etc. Login, signup, user CRUD, profile picture upload
Admin /admin/dashboard-metrics Dashboard metrics
Drivers /drivers/* Driver signup, profile, by email/ID
Riders /riders/* Rider signup, profile, by email
Rides /rides CRUD, by driver, by ID, by IDs
Bookings /bookings Create, update, cancel, by rider/ride
Payments /payments Create, update, complete, by driver/rider/ride
Vehicles /vehicles CRUD, by driver

Protected routes use JWT in the Authorization header. The UI expects the backend at http://localhost:8082.

Tests

mvn test

CORS

CORS is configured for the Angular UI (e.g. http://localhost:4200). See CorsConfig and SecurityConfig to adjust origins.

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors