diff --git a/index.css b/index.css
new file mode 100644
index 00000000..b9bfd8ec
--- /dev/null
+++ b/index.css
@@ -0,0 +1,8 @@
+ul {
+ list-style: none
+}
+
+.trip {
+ border: 2px solid;
+ display: table
+}
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 00000000..28ee83fc
--- /dev/null
+++ b/index.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+ Trek
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/index.js b/index.js
new file mode 100644
index 00000000..1bf95a2c
--- /dev/null
+++ b/index.js
@@ -0,0 +1,176 @@
+const tripListURL = 'https://trektravel.herokuapp.com/trips';
+
+//
+// Status Management
+//
+const reportStatus = (message) => {
+ $('#status-message').html(message);
+};
+
+const reportError = (message, errors) => {
+ let content = `${message}
`;
+ for (const field in errors) {
+ for (const problem of errors[field]) {
+ content += `${field}: ${problem} `;
+ }
+ }
+ content += " ";
+ reportStatus(content);
+};
+
+//
+// Loading Trips
+//
+const loadTrips = () => {
+ reportStatus('Loading trips...');
+
+ const tripList = $('#trip-list');
+ tripList.empty();
+
+ // sends GET request to endpoint
+ axios.get(tripListURL)
+ .then((response) => {
+ tripList.append(' All Trips ')
+ reportStatus(`Successfully loaded ${response.data.length} trips`);
+ // parses through each response
+ response.data.forEach((trip) => {
+ // adds each trip to list
+ tripList.append(` Trip ${trip.id} : ${trip.name} `);
+ });
+ })
+ .catch((error) => {
+ reportStatus(`Encountered an error while loading trips: ${error.message}`);
+ console.log(error);
+ });
+};
+
+// read into single trip
+const readTrip = (tripID) => {
+ reportStatus('Loading trips...');
+
+ const tripAttributes = $('#trip-attributes');
+ tripAttributes.empty();
+
+ // compiles url for specific trip
+ const tripURL = tripListURL + '/' + tripID;
+
+ // sends GET request to endpoint
+ axios.get(tripURL)
+ .then((response) => {
+ reportStatus(`Successfully loaded Trip ${tripID}`);
+ // add header
+ tripAttributes.append(` Trip Details `);
+
+ // parse through hashy details object
+ for (let [detail, value] of Object.entries(response.data)) {
+ tripAttributes.append(` ${detail.charAt(0).toUpperCase() + detail.slice(1)}: ${value} `);
+ }
+
+ })
+ .catch((error) => {
+ reportStatus(`Encountered an error while loading trips: ${error.message}`);
+ console.log(error);
+ });
+};
+
+const tripForm = (tripID) => {
+ reportStatus('Loading trip form');
+
+ const tripFormContainer = $('#trip-form-container');
+ tripFormContainer.empty();
+
+ const tripURL = tripListURL + '/' + tripID;
+
+
+ const form = `