Sarathi is a progressive web application intended to connect a group of people taking the same journey at the same time for sharing cabs.
Maintained by Arib Alam
IIT Kharagpur has a facebook page named Travel KGP! where students would post their journey details with a prospect of finding other students with similar journey to share rides. The process however was quite disorganized due to the following reasons
- The users were unable to search for posts matching with their travel timings. The only way was to scroll through all posts and look for the required one.
- The above point would lead to multiple posts for the same journey.
- There was no way to know whether the creator of the post is still open to accepting people without commenting on their posts asking about the status.
Sarathi Web app aims at solving all the above problems by -
- Letting users search for groups matching their journey details as well have the option of creating a new one.
- Having a well defined procedure of joining groups through sending requests to its creators.
- Creating an option for changing the status of the group between open/closed to allow/deny users to join the group.
- Implementing push notifications to notify user regarding updates of their joined/created groups.
Backend: NodeJS using the Express framework
Database: MongoDB connected to backend using mongoose driver
Frontend: ReactJS
- Searching for groups matched by the journey details entered by the user
- Creating a group for a given journey
- Approving or rejecting requests by a user to join a group
- Changing the status or the departure time of the group by the creator
- Reading notifications recieved regarding updates of the group
Make sure MongoDB is installed and its running in your machine.
-
Clone the repository and switch to
develop
branch
git clone https://github.com/aribalam/sarathi.git
git checkout develop
-
Install dependencies
cd sarathi
npm install
cd client && npm install
-
Create a new Facebook developer app. Find the procedure here.
-
Generate webpush VAPID keys and copy the private and public keys
./node_modules/.bin/web-push generate-vapid-keys
-
Add the following properties to
config.js
in the root directory
{
...
appId: <your-facebook-app-id>
appSecret: <your-facebook-app-secret>
publicKey: <webpush-generated-public-keys>
privateKey: <web-push-generated-private-keys>
}
-
Add your webpush public key in
client/src/registerPush.js
const vapidPublicKey = <webpush-generated-public-key>
-
Launch the servers.
DEBUG=api:* npm start
cd client and npm start
The development server will be hosted in http://localhost:3000/
The api server will be hosted in http://localhost:5000/api/