Welcome to Traveler’s Tea, an intuitive and personalized travel planning web app that turns your travel dreams into detailed itineraries.
Built around user preferences, the app delivers curated plans comprising places to visit, descriptions, and more, all at your fingertips.
Alongside its planning capabilities, TravelersTea thrives on the collective wisdom of its user community, featuring plan sharing with others, and shaping a dynamic and interactive travel planning experience.
Unit 1: HTML CSS JS: Our frontend consists of appropriately sized components, where each one involved writing JSX using Tailwind CSS. Since these JS language extensions are based on HTML and CSS, we utilized knowledge from all three languages to build our app.
Unit 2: React and Redux: Our front end was built using React and Redux. We followed best practices by using thunks to handle asynchronous events, segregated the API calls into their own service.js files, and used state hooks to manage frontend states.
Unit 3: Node/Express: Our backend uses Node and Express. We followed design patterns such as the Model Route Controller pattern in order to separate the responsibilities of handling the business logic, route exposure, and database models. Express also allowed us to build middlewares for error handling, error logging, general logging, authentication, and IP based rate limiting.
Unit 4: MongoDB: Our data is stored in collections inside an Atlas Cluster. We followed model schema design best practices such as choosing to not go with the common embedded document pattern by considering how frequently documents may be accessed and changed.
Unit 5: GitHub Action to format the code before any pushes to main. Two-stage Docker, one to build all dependencies for the server and client, then the second to copy over only necessary built-artifacts and run the server that serves the client. Deployed using Render with docker.
We would like to add improved budget considerations when generating trips and implement Global Share Board and Voting System between friends and families for itineraries. We would also like to improve popups for markers on the map to have more details about the place, such as opening hours and images, and retry Logic for failed stages and trips
Andy My responsibilities were mainly centered around the backend as I implemented the user system, auth middleware, error handling and logging middlewares, share itinerary backend, postman regression tests. I was also responsible for the initial implementation and investigation for mapbox-gl, which is the map in our app.
Noreen: Most of my tasks were creating UI views in the frontend (React / Redux / Tailwind CSS). To chronologically name a few large features, I created the wireframe draft of the app, the regular trip view which includes teacups and the side panel, the “see more” drawer, the day view, the compact view, and finally light mode. I also styled and placed markers on the map.
Lymeng: I set up the mono-repo structure and redux with thunks. Create frontend components such as modals, loaders, forms, etc. Engineer the connection between the client and server. Containerized using Docker to ensure the environment is the same for the mono-repo and deployed with Render.
Vaishnavi: mainly responsible for the integration of Google Places API to fetch coordinates and ratings based on the names of the places generated by OpenAI’s returned trip plan response. Helped create UI for sign in page and added routing. Helped add the spinning feature on Mapbox globe and add FE and BE logic for tea cup ratings for each place on the plan. Also improved UI for map marker popups.
Rithin: I worked on the complete end to end implementation of the edit stage feature and also worked with Andy to deliver the share itinerary feature. I was also responsible for driving team discussions and was involved in code reviews. As I had the most experience with GPT, I was also responsible for developing the interfacing logic for GPT API.
User input
With sidebar closed
With sidebar open: Specific details about a day in the plan
This is a MERN stack project using JavaScript, with auto-linting and formatting set up using ESLint and Prettier. We use Yarn Workspaces to simplify installation and running scripts.
git clone https://github.com/cpsc455-bugstorm/TravelersTea.git
yarn install
Now, you will need .env
files, one in server and one in client.
.env
in the server
folder:touch server/.env
<value>
for the following in
discord's secret channel.The content of server/.env
file should look like this (with the <value>
replaced with the correct constant) :
server/.env.example
provides a template for this file.
ENV=<value>
MONGO_USERNAME=<value>
MONGO_PASSWORD=<value>
JWT_SECRET=<value>
OPEN_AI_ORG_ID=<value>
OPEN_AI_API_KEY=<value>
GPT_MODEL=<value>
DB_USER_FLAG=<value>
GOOGLE_PLACES_API_KEY=<value>
CLIENT_URL=<value>
.env
in the client
folder:touch client/.env
<value>
for the following in
discord's secret channel.The content of client/.env
file should look like this (with the <value>
replaced with the correct constant) :
client/.env.example
provides a template for this file.
REACT_APP_MAPBOX_TOKEN=<value>
REACT_APP_API_URL=<value>
yarn start
Alternatively, you can start either server or client using the commands below:
# starting only server
yarn start:server
# starting only client
yarn start:client
follow the client
link here: http://localhost:3000
follow the server
link here: http://localhost:5001/api/user
# run linter
yarn lint:fix
# check for linting errors
yarn lint
# run formatter
yarn format
# check for formatting errors
yarn format:check
We use Husky to run pre-commit hooks
with lint-staged to run linters on git staged files. This ensures that our code
is formatted correctly when we commit our codes and when we open a pull-request on main
branch.
yarn install
in the root directory.client/src
components
: where react elements go.
common
: reusable components, such as Button
, Dropdown
, Alert
etc.reducers
: put redux reducers here.App.js
: the top-level React app.index.css
: imports tailwind. Try not to modify this.store.js
: configures redux; link any new reducers here.client/public
This is where assets (e.g. images) go, as well as the index.html
.
Configure tailwind and add custom tailwind keywords.
To see some particular database, whether it is the shared one, of your own, follow the steps below.
Log in to Mongo Atlas (press Sign In on the top right)
Press Database
-> Browse Collection
Here is our database! Our collections (think of SQL Tables), along with other helpful buttons, can be found here:
To use your own database. Navigate to config.js
in the server
folder.
DB_USER_FLAG
to your name in all capital letters.