Skip to content

pauloricardomg/TaxiRider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

******************
    TaxiRider
******************

- Simple geographical information system that help users locate nearby taxis and request them.
- Toy project to learn the CakePHP framework

*** Requirements

* CakePHP v1.3.X
* PostgreSQL 9.1 + PostGIS

*** How to set up the App:

1. Download app: on the linux terminal, execute: "git clone git://github.com/pauloricardomg/TaxiRider.git" (or manually, from here: https://github.com/pauloricardomg/TaxiRider/downloads)

2. Create user 'taxirider' on postgresql 9.1, with password 'taxirider' (if you want to use another user, you will have to change the configuration on /app/config/database.php and update the SQL scripts)

3. Create a database named 'taxirider' based on the postgis template, and assign the owner to the user 'taxirider'.
   3.1 Alternatively, you can simply run the SQL script: '/app/config/schema/taxirider-db.sql' with postgres super-user - this script assumes the postgis template database is named 'postgistemplate', change it if necessary. To execute, run on the postgres linux admin terminal: "psql -f taxirider-db.sql".

4. With user 'taxirider', execute SQL script '/app/config/schema/taxirider-tables.sql' - On the linux terminal, execute: "psql -f taxirider-tables.sql taxirider"

5. Copy the 'app' folder to your CakePHP 1.3 directory - if your cakephp is configured, the application should be app and running!

*** How to access the App:

- Passengers view: <server_address>/taxirider/passengers/ (eg. http://localhost/taxirider/passengers/)

- Taxi view: <server_address>/taxirider/taxis/ (eg. http://localhost/taxirider/passengers/)

*** Use cases

- Passenger view
  	- Register passenger
  	- Remove passenger
  	- Change position
	- Search for nearby taxis
	- Request a taxi
	- Cancel request
	- Retrieve requests
	- Retrieve taxi position
	- Board taxi
	- Leave taxi
	- Write review
	- Get Reviews

- Taxi View
	- Register taxi
	- Remove taxi
	- Change position
	- Retrieve requests
	- Accept request
	- Reject request
	- Pick up passenger
    - Drop passenger
	
*** Relational Entities

SQL schema files available at: config/schema/taxirider*.sql

- Passenger
	- id  : SERIAL (primary_key)
	- name : VARCHAR(128)
	- position : POINT(2)
	
- Taxi
	- id  : SERIAL (primary_key)
	- name : VARCHAR(128)
	- position : POINT(2)
	- status : BOOLEAN //possible statuses free=True, busy=False

- Request
	- id : SERIAL (primary key)
	- id_passenger references Passenger(id)
	- id_taxi references Taxi(id) // indexed column to make review queries more efficient
	- status : SHORTINT // possible statuses: open=0, accepted=1, rejected=2, cancelled=3, active=4, closed=5
	- passenger_boarded : BOOLEAN DEFAULT NULL // Two boolean variables to maintain passenger and taxi views consistent
	- passenger_picked : BOOLEAN DEFAULT NULL
	- created_ts : TIMESTAMP
	- closed_ts : TIMESTAMP DEFAULT NULL
	- review: TEXT DEFAULT NULL // For simplicity, keeping the review associated to a request (1-1), instead of a separate entity.
	- anonymous_review: BOOLEAN DEFAULT False
	- start_position : POINT(2)
	- end_position : POINT(2) DEFAULT NULL
	- Trigger:
		- When passenger_boarded=false && passenger_picked=false: set status to "closed" and set closed_ts		

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages